| Commit message (Expand) | Author | Age | Files | Lines |
* | clean up macros.[ch]...There are some incompatible changes here, but only to interfaces that
were introduced earlier in 1.9, or interfaces which have been broken
since early in 1.9.
* libguile/_scm.h (SCM_OBJCODE_MINOR_VERSION): Bump, as the macro
changes affect the interface that is called by psyntax-generated macro
definitions.
* libguile/inline.h (scm_words): New function, allocates a variable
number of contiguous scm_t_bits locations, with a given value in the
0th word, and 0 in the rest of the words.
* libguile/macros.h: Rework interface to correspond more closely, and
minimally, to the needs of memoize.c and psyntax.
(SCM_ASSYNT, SCM_MACRO_TYPE_BITS, SCM_MACRO_TYPE_MASK)
(SCM_F_MACRO_EXTENDED, SCM_MACROP, SCM_MACRO_TYPE)
(SCM_MACRO_IS_EXTENDED, SCM_BUILTIN_MACRO_P, SCM_SYNCASE_MACRO_P)
(SCM_MACRO_CODE, scm_tc16_macro): Remove CPP macros related to the
representation of Scheme macros.
(scm_i_make_primitive_macro): Renamed from scm_i_makbimacro.
(scm_i_macro_primitive): New accessor so that memoize.c can get to the
primitive syntax transformer.
(scm_make_syncase_macro, scm_make_extended_syncase_macro)
(scm_syncase_macro_type, scm_syncase_macro_binding): Removed these
functions, replaced by make-syntax-transformer and its accessors.
(scm_macro_binding): New accessor, the same as what
scm_syncase_macro_binding was.
* libguile/macros.c: All representation details of syntax transformers
are private to this file now.
(macro_print): Print macros as #<syntax-transformer ...>, or
#<primitive-syntax-transformer ...> if psyntax has not attached a
transformer of its own.
(scm_i_make_primitive_macro): Represent macros as 5-word smobs.
(scm_make_syntax_transformer): New constructor for syntax transformers
(macros), exported to scheme. Takes a name, and looks it up in the
current module to determine the previous primitive transformer, if
any.
(scm_macro_type): Instead of returning 'builtin-macro!, etc, return
the type as set by psyntax, or #f if it's a primitive.
(scm_macro_name): Return the stored macro name.
(scm_macro_transformer): Return the psyntax-set syntax transformer.
Hacky, but should help introspection somewhat.
* libguile/memoize.c (memoize_env_ref_transformer): Use the new
scm_i_macro_primitive, and adapt to other macro API changes.
* module/ice-9/psyntax.scm (put-global-definition-hook)
(get-global-definition-hook, chi-install-global): Call (and generate
calls to) the new macro constructors and accessors.
* module/ice-9/psyntax-pp.scm: Doubly regenerated.
* module/ice-9/debugging/traps.scm (trap-here): Comment out this
definition and export, while it's not working.
| Andy Wingo | 2010-01-05 | 1 | -21/+9 |
* | remove mmacros, SCM_SYNTAX snarf macro...* libguile/snarf.h (SCM_SYNTAX): Remove snarf macro, users can't define
primitive syntax any more.
* libguile/memoize.c (SCM_SYNTAX): Define locally, and just call
scm_i_makbimacro as there's no difference between that and
scm_makmmacro. Alter invocations to suit.
* libguile/macros.h:
* libguile/macros.c (scm_i_makmmacro): Remove; users can't define
primitive syntax any more. Use define-syntax instead.
(scm_make_synt): Remove, this was only used by the SCM_SYNTAX snarf
macro.
(scm_i_makbimacro): Change prototype of this internal function to make
the gsubr on behalf of the caller.
(macro_print, scm_macro_type): Remove cases for mmacros.
| Andy Wingo | 2010-01-05 | 1 | -5/+1 |
* | remove scm_makacro and scm_makmacro...* libguile/macros.h:
* libguile/macros.c (scm_makacro): Remove this function for making
"acros", as it is unused and won't work with the compiler.
(scm_makmacro): Remove this deprecated function for making
non-memoizing macros, as they won't work with the compiler.
(macro_print, scm_macro_type): Remove a couple of cases for macros
that can't be created any more.
| Andy Wingo | 2010-01-05 | 1 | -5/+1 |
* | Use `SCM_DEPRECATED' in declarations of deprecated functions/variables....* libguile/deprecated.c (SCM_BUILDING_DEPRECATED_CODE): New macro.
* libguile/async.c (SCM_BUILDING_DEPRECATED_CODE): Likewise.
* libguile/macros.c (SCM_BUILDING_DEPRECATED_CODE): Likewise.
* libguile/async.h, libguile/deprecated.h, libguile/eval.h,
libguile/gc.h, libguile/gc.h, libguile/macros.h, libguile/ports.h,
libguile/srfi-4.h, libguile/strings.h: Change declarations of
deprecated functions and variables to use `SCM_DEPRECATED' instead of
`SCM_API'.
| Ludovic Courtès | 2009-10-02 | 1 | -2/+2 |
* | Change Guile license to LGPLv3+...(Not quite finished, the following will be done tomorrow.
module/srfi/*.scm
module/rnrs/*.scm
module/scripts/*.scm
testsuite/*.scm
guile-readline/*
)
| Neil Jerram | 2009-06-17 | 1 | -6/+7 |
* | a different tack for syncase macro representation...* libguile/macros.c (macro_print): Show syntax-case bindings, if present.
(macro_mark): Mark the extra two words if they're there.
(scm_make_syncase_macro, scm_make_extended_syncase_macro): OK! A new
take at the "how do we represent syncase macros in Guile" problem.
Whereas we need a disjoint type, but would like it to be compatible
with old predicates (e.g. `macro?'), and need to be able to extend
existing syntax definitions (e.g. `cond'), let's add a bit to macros to
indicate whether they have syncase macro bindings or not, and a fourth
macro type for native syncase macros.
(scm_macro_type): Return 'syntax-case for native syntax-case macros.
Note that other macro types may have syntax-case bindings.
(scm_macro_name): Return #f if the transformer is not a procedure.
(scm_syncase_macro_type, scm_syncase_macro_binding): New accessors for
the syncase macro bindings.
* libguile/macros.h: Add API for syncase macros.
* module/ice-9/boot-9.scm (module-define-keyword!): Adapt to use syncase
macros, though they are not yet used. Reorder other syncase API.
* module/ice-9/psyntax.scm (chi-expr): Fix syntax-violation invocation.
| Andy Wingo | 2009-04-29 | 1 | -1/+12 |
* | Add `SCM_INTERNAL' macro, use it. | Ludovic Courtès | 2008-05-31 | 1 | -3/+3 |
* | merge from 1.8 branch | Kevin Ryde | 2006-04-17 | 1 | -1/+1 |
* | The FSF has a new address. | Marius Vollmer | 2005-05-23 | 1 | -1/+1 |
* | Use SCM_SMOB_* instead of SCM_CELL_* as appropriate. Use...SCM_SMOB_FLAGS and SCM_SET_SMOB_FLAGS instead of accessing the
zeroth word directly. Use SCM_SMOB_PREDICATE as appropriate.
| Marius Vollmer | 2004-05-06 | 1 | -3/+3 |
* | The purpose of this patch is to make guile's internal memoizers... distinguishable from memoizing macros created on the scheme level
or from user provided primitive memoizing macros. The reason is,
that the internal memoizers are the only ones that are allowed to
transform their scheme input into memoizer byte code, while all
other memoizing macros may only transform scheme code into new
scheme code.
To achieve this, a new macro type 'builtin-macro!' is introduced.
Currently, 'builtin-macro!'s are handled as memoizing macros, but
this will change when the memoizer and executor are separated.
* macros.[ch] (scm_i_makbimacro): New.
* macros.h (SCM_BUILTIN_MACRO_P): New.
* macros.c (macro_print, scm_macro_type): Support builtin-macro!s.
* eval.c, goops.c: All of guile's primitive memoizing macros are
primitive builtin-macros now.
* eval.c (scm_macroexp, SCM_CEVAL): Make sure the primitive
builtin-macros are handled equally to memoizing macros.
| Dirk Herrmann | 2003-05-04 | 1 | -2/+4 |
* | Changed license terms to the plain LGPL thru-out. | Marius Vollmer | 2003-04-05 | 1 | -35/+11 |
* | * eval.c (SCM_CEVAL), macros.c (macro_print, scm_makmacro,...scm_sym_macro, scm_macro_type), macros.h (scm_makmacro):
Deprecated the special kind of built-in dynamic syntax transformer
that was inaccurately named "macro". Note: The built-in syntax
transformers that are named "mmacro" or "memoizing-macro" still
exist, and it is these which come much closer to what one would
call a macro.
| Dirk Herrmann | 2002-07-15 | 1 | -2/+5 |
* | Prefixed each each exported symbol with SCM_API. | Marius Vollmer | 2001-11-02 | 1 | -12/+12 |
* | * Renamed header macros to the SCM_<filename>_H format. | Dirk Herrmann | 2001-08-31 | 1 | -4/+6 |
* | replace "scm_*_t" with "scm_t_*". | Marius Vollmer | 2001-06-14 | 1 | -1/+1 |
* | * Replaced a lot of calls to SCM_C[AD]R with more appropriate macros....* Minor cleanups to hashtable implementation.
* Minor code beautifications.
| Dirk Herrmann | 2001-03-30 | 1 | -4/+8 |
* | * Removed unused object parameter from SCM_ASSYNT. | Dirk Herrmann | 2001-03-15 | 1 | -1/+1 |
* | * Cleaned up uses and definition of SCM_ASSYNT. | Dirk Herrmann | 2001-03-12 | 1 | -1/+2 |
* | Smob-related creanup. | Keisuke Nishida | 2000-12-08 | 1 | -1/+1 |
* | Updated copyrights | Mikael Djurfeldt | 2000-06-12 | 1 | -1/+1 |
* | * *.[hc]: add Emacs magic at the end of file, to ensure GNU... indentation style.
| Michael Livshin | 2000-03-19 | 1 | -0/+6 |
* | * list.c: Moved append docs to append! Thanks Dirk Hermann. Also,...added append docs from R4RS.
* strings.c: Docstring typo fix, + eliminate unneeded IMP tests.
Thanks Dirk Hermann!
* chars.h: Provide SCM_CHARP, SCM_CHAR, SCM_MAKE_CHAR and
deprecate SCM_ICHRP, SCM_ICHR, SCM_MAKICHR. Thanks Dirk Hermann!
* *.h, *.c: Use SCM_CHARP, SCM_CHAR, SCM_MAKE_CHAR throughout.
Drop use of SCM_P for function prototypes... assume an ANSI C
compiler. Thanks Dirk Hermann!
| Greg J. Badros | 2000-03-02 | 1 | -11/+11 |
* | * chars.c (scm_lowers, scm_uppers, scm_charnames, scm_charnums),...eval.c (s_expression, s_test, s_body, s_bindings, s_variable,
s_clauses, s_formals): Variables now const.
* eval.c (promsmob): Now const.
* macros.c (macrosmob): Now const.
* smob.c (scm_newsmob): Smobfuns argument now points to const.
(freecell, flob, bigob): Now const.
* dynl.c (scm_make_argv_from_stringlist, scm_coerce_rostring),
error.c (scm_error, scm_syserror, scm_syserror_msg,
scm_num_overflow, scm_out_of_range, scm_wrong_type_arg,
scm_memory_error, scm_misc_error, scm_wta), macros.c
(scm_make_synt), feature.c (scm_add_feature), filesys.c
(scm_input_waiting_p), gc.c (scm_gc_start, scm_igc,
scm_must_malloc, scm_must_realloc), gsubr.c (scm_make_gsubr),
numbers.c (scm_num2dbl, scm_two_doubles, scm_num2long,
scm_num2long_long, scm_num2ulong),
options.c (scm_options), posix.c (scm_convert_exec_args,
environ_list_to_c), procs.c (scm_make_subr_opt, scm_make_subr),
ramap.c (scm_ramapc), read.c (scm_flush_ws), socket.c
(scm_sock_fd_to_port, scm_fill_sockaddr, scm_addr_vector), stime.c
(setzone, restorezone, bdtime2c), strop.c (scm_i_index),
strports.c (scm_mkstrport), symbols.c (scm_intern_obarray_soft,
scm_intern_obarray, scm_intern, scm_intern0,
scm_sysintern0_no_module_lookup, scm_sysintern, scm_sysintern0,
scm_symbol_value0), unif.c (scm_aind, scm_shap2ra): Argument
indicating calling subr, error message text, reason for error,
symbol name or feature name are now pointer to const.
* snarf.h (SCM_PROC, SCM_PROC1): String variables are now const.
* procs.c (scm_init_iprocs): iproc argument now points to const.
* pairs.c (cxrs): Now const.
* chars.h, error.h, feature.h, filesys.h, gc.h, gsubr.h, macros.h,
numbers.h, options.h, procs.h, ramap.h, read.h, smob.h,
strports.h, symbols.h, unif.h: Update variable declarations and
function prototypes for above changes.
* dynl.c, dynl-dld.c, dynl-dl.c, dynl-shl.c (sysdep_dynl_link,
sysdep_dynl_unlink, sysdep_dynl_func): Arguments FNAME, SUBR, and
SYMB now point to const.
| Jim Blandy | 1999-02-06 | 1 | -1/+1 |
* | * macros.c, macros.h: New files....(procedure->syntax, procedure->macro, procedure->memoizing-macro,
macro?, macro-type, macro-name, macro-transformer): Moved from
eval.c
(scm_make_synt): Moved from eval.c
* Makefile.am: Added evalext.c, evalext.h, macros.c, macros.h.
| Mikael Djurfeldt | 1998-10-31 | 1 | -0/+67 |