summaryrefslogtreecommitdiff
path: root/libguile/macros.c
AgeCommit message (Collapse)AuthorFilesLines
2005-05-23The FSF has a new address.Marius Vollmer1-1/+1
2004-07-06* deprecated.h, boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOL,Marius Vollmer1-3/+3
SCM_NEGATE_BOOL, SCM_BOOLP): Deprecated by moving into "deprecated.h". Replaced all uses with scm_is_false, scm_is_true, scm_from_bool, and scm_is_bool, respectively.
2004-06-27 * backtrace.c (display_expression, display_frame): CallDirk Herrmann1-1/+1
scm_i_unmemoize_expr for unmemoizing a memoized object holding a single memoized expression. * debug.c (memoized_print): Don't try to unmemoize the memoized object, since we can't know whether it holds a single expression or a body. (scm_mem_to_proc): Removed check for lambda expression, since it was moot anyway. Whoever uses these functions for debugging purposes should know what they do: Creating invalid memoized code will cause crashes, independent of whether this check is present or not. (scm_proc_to_mem): Take the closure's code as it is and don't append a SCM_IM_LAMBDA isym. To allow easier debugging, the memoized code should not be modified. * debug.[ch] (scm_unmemoize, scm_i_unmemoize_expr): Removed scm_unmemoize from public use, but made scm_i_unmemoize_expr available as a guile internal function instead. However, scm_i_unmemoize_expr will only work on memoized objects that hold a single memoized expression. It won't work with bodies. * debug.c (scm_procedure_source), macros.c (macro_print), print.c (scm_iprin1): Call scm_i_unmemocopy_body for unmemoizing a body, i. e. a list of expressions. * eval.c (unmemoize_exprs): Drop internal body markers from the output during unmemoization. * eval.[ch] (scm_unmemocopy, scm_i_unmemocopy_expr, scm_i_unmemocopy_body): Removed scm_unmemocopy from public use, but made scm_i_unmemocopy_expr and scm_i_unmemocopy_body available as guile internal functions instead. scm_i_unmemoize_expr will only work on a single memoized expression, while scm_i_unmemocopy_body will only work on bodies.
2004-05-06Use SCM_SMOB_* instead of SCM_CELL_* as appropriate. UseMarius Vollmer1-6/+14
SCM_SMOB_FLAGS and SCM_SET_SMOB_FLAGS instead of accessing the zeroth word directly. Use SCM_SMOB_PREDICATE as appropriate.
2003-05-04 The purpose of this patch is to make guile's internal memoizersDirk Herrmann1-19/+35
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.
2003-04-05Changed license terms to the plain LGPL thru-out.Marius Vollmer1-36/+12
2002-07-21* macros.c: include deprecation.hHan-Wen Nienhuys1-0/+1
* vectors.c (s_scm_vector_move_right_x): remove side effect in macro arg. (s_scm_vector_move_left_x): idem. * net_db.c, posix.c, socket.c: variable naming: change ans to result. * sort.c (scm_merge_vector_x): accept vector as argument iso. SCM*. This is needed for full GC correctness. * gc.h: undo previous undocumented changes related to #ifdef GENGC.
2002-07-202002-07-20 Han-Wen <hanwen@cs.uu.nl>Han-Wen Nienhuys1-5/+5
* *.c: add space after commas everywhere. * *.c: use SCM_VECTOR_SET everywhere, where a vector is written. Document cases where SCM_WRITABLE_VELTS() is used. * vectors.h (SCM_VELTS): prepare for write barrier, and let SCM_VELTS() return a const pointer (SCM_VECTOR_SET): add macro. * autogen.sh (mscripts): find and check version number of autoconf. Complain if 2.53 is not found.
2002-07-15* eval.c (SCM_CEVAL), macros.c (macro_print, scm_makmacro,Dirk Herrmann1-2/+17
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.
2002-03-15Small docstring fixes.Neil Jerram1-14/+7
2002-03-14Retire inclusion guard macro SCM_MAGIC_SNARFER.Thien-Thi Nguyen1-2/+0
2001-11-16* Adding C function declarations from the SCM interface to theNeil Jerram1-1/+1
reference manual documentation.
2001-07-09Remove "face-lift" comment.Thien-Thi Nguyen1-2/+0
2001-06-14replace "scm_*_t" with "scm_t_*".Marius Vollmer1-1/+1
2001-05-20(scm_c_make_gsubr, scm_c_define_gsubr, scm_c_make_gsubr_with_generic,Marius Vollmer1-1/+1
scm_c_define_gsubr_with_generic): New functions. They replace scm_make_gsubr and scm_make_gsubr_with_generic. The `make' variants only create the gsubr object, while the `define' variants also put it into the current module. Changed all callers. (scm_make_gsubr, scm_make_gsubr_with_generic): Deprecated. (scm_c_make_subr, scm_c_define_subr, scm_c_make_subr_with_generic, scm_c_define_subr_with_generic): New functions. They replace scm_make_subr, scm_make_subr_opt and scm_make_subr_with_generic. The `make' variants only create the subr object, while the `define' variants also put it into the current module. Changed all callers. (scm_make_subr, scm_make_subr_opt, scm_make_subr_with_generic): Deprecated.
2001-05-15Merge from mvo-vcell-cleanup-1-branch.Marius Vollmer1-3/+3
2001-04-19* Fixed scm_thunk_p's results when applied to closures.Dirk Herrmann1-2/+48
* Extracted macro printing code from print.c to macros.c. * Minor cleanups.
2001-04-03Correct, update, improve and clean up a lot of docstrings in order to makeMartin Grabmüller1-27/+31
the documentation much more consistent.
2001-02-09* macros.c (scm_macro_name, scm_macro_transformer): UseMarius Vollmer1-4/+5
SCM_SMOB_DATA instead of SCM_CDR. Provided by Martin Grabmueller. Thanks!
2000-12-08Smob-related creanup.Keisuke Nishida1-5/+5
2000-11-17* alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,Marius Vollmer1-0/+2
continuations.c, debug-malloc.c, debug.c, dynl.c, dynwind.c, environments.c, eq.c, error.c, eval.c, evalext.c, feature.c, filesys.c, fluids.c, fports.c, gc.c, goops.c, guardians.c, hash.c, hashtab.c, hooks.c, ioext.c, iselect.c, keywords.c, lang.c, list.c, load.c, macros.c, modules.c, net_db.c, numbers.c, objects.c, objprop.c, options.c, pairs.c, ports.c, posix.c, print.c, procprop.c, procs.c, properties.c, ramap.c, random.c, read.c, regex-posix.c, root.c, scmsigs.c, script.c, simpos.c, socket.c, sort.c, srcprop.c, stackchk.c, stacks.c, stime.c, strings.c, strop.c, strorder.c, strports.c, struct.c, symbols.c, tag.c, threads.c, throw.c, unif.c, variable.c, vectors.c, version.c, vports.c, weaks.c: Makes sure the snarfer output inclusion is disabled when the snarfer is run on the file. Thanks to Lars J. Aas! * Makefile.am: Install guile-procedures.txt in version-specific directory to enable multiple installed guile versions. Suggested by Karl M. Hegbloom <karlheg@debian.org, patch by Matthias Koeppe.
2000-08-11 * macros.c: Remove surplus newlines from end of docstrings.Neil Jerram1-12/+12
* list.c (scm_list_tail): Add @deffnx line to docstring for list-cdr-ref. * keywords.c: Docstring improvements in conjunction with new reference manual doc on keywords. * error.c (scm_error_scm): Fix texinfo syntax error in docstring. (@code(~S) should be @code{~S}.) * dynl.c: Remove surplus newlines from end of docstrings.
2000-06-12Updated copyrightsMikael Djurfeldt1-1/+1
2000-05-23* Replace SCM_UNPACK_CAR appropriately.Dirk Herrmann1-1/+1
2000-04-21* Makefile.am (DEFS): Added. automake adds -I options to DEFS,Mikael Djurfeldt1-6/+6
and we don't want that. (INCLUDES): Removed all -I options except for the root source directory and the root build directory. * *.*: Change includes so that they always use the "prefixes" libguile/, qt/, guile-readline/, or libltdl/. (Thanks to Tim Mooney.)
2000-04-03Lots of fixes to make guile (at some time) compile with strict typing.Dirk Herrmann1-3/+3
2000-03-19 * *.[hc]: add Emacs magic at the end of file, to ensure GNUMichael Livshin1-0/+6
indentation style.
2000-03-18Only include root.h where it is actually needed.Dirk Herrmann1-0/+1
2000-03-12*** empty log message ***Mikael Djurfeldt1-1/+1
2000-03-12* async.c, boolean.h, debug.c, dynl.c, dynwind.c, eval.c, eval.h,Mikael Djurfeldt1-1/+1
feature.h, filesys.h, fluids.h, fports.c, fports.h, gc.c, gc.h, hash.c, keywords.h, macros.c, numbers.c, numbers.h, objects.c, objects.h, options.c, pairs.h, ports.c, ports.h, print.c, procs.h, ramap.c, read.c, smob.c, smob.h, srcprop.h, stacks.c, stacks.h, strports.c, struct.c, struct.h, tag.c, tags.h, throw.c, unif.c, unif.h, variable.h, vectors.h, weaks.c, weaks.h (SCM_SCM, SCM_BITS, SCM_CARBITS): Renamed from SCM_ASSCM, SCM_ASWORD, SCM_CARW).
2000-03-09*.[ch]: make a distinction between SCM as a genericGreg J. Badros1-1/+1
name for a Scheme object (now a void*), and SCM as 32 bit word for storing tags and immediates (now a long int). Introduced SCM_ASWORD and SCM_ASSCM for conversion. Fixed various dubious code in the process: arbiter.c (use macros), unif.c (scm_array_p),
2000-03-03* error.h, error.c: Added `scm_wrong_type_arg_msg' to supportGreg J. Badros1-1/+1
displaying the expected type. Use SCM_LISTn in a couple places instead of scm_cons-ing by hand. * __scm.h: Added SCM_ASSERT_TYPE macro. * validate.h, scm_validate.h: Added the former, as a renamed version of the latter with SCM_ASSERT_TYPE used in SCM_MAKE_VALIDATE (instead of just SCM_ASSERT) * Makefile.am: Rename scm_validate.h to validate.h. * *.c, *.h: Include validate.h, not scm_validate.h (old name's prefix was superfluous).
2000-02-07* macros.c: Doc patches from Richard Kim. Pasted from scm.texi.Greg J. Badros1-3/+27
2000-01-18* alist.c, chars.c, debug.c, dynl.c, dynwind.c, error.c, eval.c,Mikael Djurfeldt1-11/+11
evalext.c, filesys.c, gc.c, hash.c, hashtab.c, ioext.c, keywords.c, list.c, load.c, macros.c, net_db.c, numbers.c, objprop.c, ports.c, posix.c, print.c, procprop.c, procs.c, ramap.c, regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c, stacks.c, stime.c, strings.c, strop.c, strports.c, struct.c, symbols.c, throw.c, unif.c, vectors.c, version.c, vports.c, weaks.c: Converted docstrings to ANSI C format.
2000-01-05* *.[ch]: Whitespace changes -- added space after SCM_VALIDATE_*Greg J. Badros1-7/+7
macros and SCM_DEFINE macros to match GNU coding standards.
2000-01-05*.[ch]: Replace GUILE_PROC w/ SCM_DEFINE.Greg J. Badros1-7/+7
1999-12-21* macros.c (scm_make_synt): Use scm_make_subr_opt to make theMikael Djurfeldt1-8/+2
transformer subr. (Thanks to Bill Schottstaedt.)
1999-12-13* Makefile.am: Fix ETAGS_ARGS to recognize GUILE_PROC,Greg J. Badros1-2/+6
GUILE_PROC1. Build guile-procedures.txt, and add that file to pkgdata_DATA. * load.c: Added `pkgdata-dir', `site-dir', `library-dir' primitives. * guile-doc-snarf.awk: Drop trailing space when no arguments: e.g., "(foo )" is now "(foo)". * *.c: moved all the documentation for primitives from guile-doc/ref/{appendices,posix,scheme}.texi into the source code. This leaves about half of the primitives undocumented. Also, all the markup is currently still texinfo. I don't have a problem with texinfo per se, but the markup is not very descriptive or accurate.
1999-12-12* *.c: Pervasive software-engineering-motivated rewrite ofGreg J. Badros1-57/+48
function headers and argument checking. Switched SCM_PROC, SCM_PROC1 macros to be GUILE_PROC, GUILE_PROC1 (may change names later, but was useful to keep old versions around while migrate) that has docstrings and argument lists embedded in the GUILE_PROC macro invocations that expand into a function header. Use lots of new SCM_VALIDATE_* macros to simplify error checking and reduce tons of redundancy. This is very similar to what I did for Scwm. Note that none of the extraction of the docstrings, nor software engineering checks of Scwm is yet added to Guile. I'll work on that tomorrow, I expect. * Makefile.am: Added scm_validate.h to modinclude_HEADERS. * chars.c: Added docstrings for the primitives defined in here. * snarf.h: Added GUILE_PROC, GUILE_PROC1. Added SCM_REGISTER_PROC to be like old SCM_PROC, though old SCM_PROC still remains for now. Changed naming convention for the s_foo string name of the primitive to be s_scm_foo for ease of use with the macro. * scm_validate.h: Lots of new SCM_VALIDATE macros to simplify argument checking through guile. Maybe some of these should be folded into the header file for the types they check, but for now it was easiest to just stick them all in one place.
1999-07-07Greg's smob patchMikael Djurfeldt1-18/+5
1999-02-06* chars.c (scm_lowers, scm_uppers, scm_charnames, scm_charnums),Jim Blandy1-2/+2
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.
1998-12-19* macros.c (scm_makacro, scm_makmacro, scm_makmmacro): AddedMikael Djurfeldt1-0/+6
argument checking.
1998-10-31* macros.c, macros.h: New files.Mikael Djurfeldt1-0/+178
(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.