1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-19 03:00:25 +02:00
guile/module/ice-9
Andy Wingo e809758a7e 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.
2010-01-05 15:33:46 +01:00
..
debugger local-eval will go away 2009-12-01 21:00:26 +01:00
debugging clean up macros.[ch] 2010-01-05 15:33:46 +01:00
and-let-star.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
arrays.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
boot-9.scm (syntax foo) -> #'foo in boot-9 2009-12-28 11:44:06 +01:00
buffered-input.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
calling.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
ChangeLog-2008 move ice-9/ and oop/ under module/ 2008-11-01 12:44:21 +01:00
channel.scm Fix typos leading to wrong argument counts. 2009-11-07 19:24:49 +01:00
common-list.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
compile-psyntax.scm pretty-print psyntax-pp.scm 2009-06-08 22:44:01 +02:00
debug.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
debugger.scm Incorporate ice-9-debugger-extensions properly 2009-08-27 22:21:20 +01:00
deprecated.scm eval.c closures are now applicable smobs, not tc3s 2009-12-04 19:20:11 +01:00
documentation.scm eval.c closures are now applicable smobs, not tc3s 2009-12-04 19:20:11 +01:00
emacs.scm local-eval will go away 2009-12-01 21:00:26 +01:00
eval.scm primitive-eval passes first N args on stack directly, not via apply 2009-12-13 17:19:59 +01:00
expect.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
format.scm ~:@y allows for truncation to an absolute maximum width 2009-12-29 21:15:08 +01:00
ftw.scm "filesystem" -> "file system" 2009-11-24 23:16:08 +01:00
gap-buffer.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
gds-client.scm local-eval will go away 2009-12-01 21:00:26 +01:00
gds-server.scm Merge branch 'ossau-gds-dev' 2009-08-27 22:52:20 +01:00
getopt-long.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
hcons.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
history.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
i18n.scm Improved support for Unicode title case in Guile's string and character APIs. 2009-12-22 00:19:56 -05:00
lineio.scm remove (ice-9 lineio)'s dependency on (ice-9 readline) 2009-08-18 17:52:46 +02:00
list.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
ls.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
mapping.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
match.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
networking.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
null.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
occam-channel.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
optargs.scm fix defmacro* 2009-12-28 11:50:45 +01:00
poe.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
popen.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
posix.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
pretty-print.scm add truncated-print to (ice-9 pretty-print) 2009-12-29 13:29:02 +01:00
psyntax-pp.scm clean up macros.[ch] 2010-01-05 15:33:46 +01:00
psyntax.scm clean up macros.[ch] 2010-01-05 15:33:46 +01:00
q.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
quasisyntax.scm add quasisyntax 2009-11-14 17:25:12 +01:00
r4rs.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
r5rs.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
rdelim.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
README move ice-9/ and oop/ under module/ 2008-11-01 12:44:21 +01:00
receive.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
regex.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
runq.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
rw.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
safe-r5rs.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
safe.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
serialize.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
session.scm eval.c closures are now applicable smobs, not tc3s 2009-12-04 19:20:11 +01:00
slib.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
stack-catch.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
streams.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
string-fun.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
syncase.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
test.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
threads.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
time.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
weak-vector.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00

This directory contains various bits of Guile Scheme code.
Most of these are packaged as modules, with foo.scm implementing
the module `(ice-9 foo)'.

The non-module files are:

boot-9.scm	-- loaded on guile startup
		   implements module system + lots of other stuff
arrays.scm	-- loaded by boot-9.scm
networking.scm	-- loaded by boot-9.scm
posix.scm	-- loaded by boot-9.scm
r4rs.scm	-- loaded by boot-9.scm