1.0.27.32: implement and use SB!XC:GENSYM
authorChristophe Rhodes <csr21@cantab.net>
Fri, 24 Apr 2009 10:44:08 +0000 (10:44 +0000)
committerChristophe Rhodes <csr21@cantab.net>
Fri, 24 Apr 2009 10:44:08 +0000 (10:44 +0000)
commit08d05510b51708853ca998154d8096b21d85edab
treef5614fca764ed5e57bb0113613bbabce075024ea
parenta160917364f85b38dc0826a5e3dcef87e3c4c62c
1.0.27.32: implement and use SB!XC:GENSYM

We need a gensym variant that doesn't share state with *GENSYM-COUNTER*,
so that host macroexpansions don't affect us.  (We also need to bind our
counter variant in the INFO compiler macro, because compiler macros
might or might not be expanded...)

11 individual commit messages follow:

Implement SB!XC:GENSYM

Host implementations can, even during cross-compilation, expand macros
(including arbitrary host macros such as CL:DEFUN) in :compile-toplevel
function definitions different numbers of times.  This is a problem
because some gensyms end up in function arglists (e.g. from
MULTIPLE-VALUE-BIND as well as from explicit FLETs or LAMBDAs in macro
expansions).  Our own SB!XC:GENSYM allows us to control the gensym
counter we use and hence the symbol names that are dumped.

Use SB!XC:GENSYM in BLOCK-GENSYM

remove a needless gensym

Nothing wrong with a regular symbol here.

Bind SB!XC:*GENSYM-COUNTER* in DEFINE-COMPILER-MACRO INFO

The compiler-macro for INFO now uses SB!XC:GENSYM, which is OK except
that the compiler macro gets used during cross-compilation; some
implementations expand compiler macros, while others (e.g. clisp)
interpret the relevant code and so don't.  Binding the counter
variable renders the effect of the compiler macro on the counter
invariant.

various reworks of macros to use SB!XC:GENSYM

In some cases radically decrease vertical space use by judicious use of
MAKE-GENSYM-LIST or WITH-UNIQUE-NAMES, both of which go through
BLOCK-GENSYM.

more reworks of macros to use SB!XC:GENSYM

Nothing vastly interesting here.

yet more reworks of macros to use SB!XC:GENSYM

Nothing much of interest.

even more reworks of macros to use SB!XC:GENSYM

more reworks of macros for SB!XC:GENSYM goodness.

one more SB!XC:GENSYM fix

Use WITH-UNIQUE-NAMES in FD-FOO macros.

One more gensym
32 files changed:
src/code/backq.lisp
src/code/bignum.lisp
src/code/cross-misc.lisp
src/code/defboot.lisp
src/code/defstruct.lisp
src/code/early-cl.lisp
src/code/early-extensions.lisp
src/code/early-pprint.lisp
src/code/early-print.lisp
src/code/early-setf.lisp
src/code/interr.lisp
src/code/late-format.lisp
src/code/macros.lisp
src/code/package.lisp
src/code/parse-defmacro.lisp
src/code/primordial-extensions.lisp
src/code/target-alieneval.lisp
src/code/target-format.lisp
src/code/typedefs.lisp
src/code/unix.lisp
src/cold/defun-load-or-cload-xcompiler.lisp
src/compiler/assem.lisp
src/compiler/constraint.lisp
src/compiler/globaldb.lisp
src/compiler/ir1report.lisp
src/compiler/ir1tran.lisp
src/compiler/locall.lisp
src/compiler/macros.lisp
src/compiler/main.lisp
src/compiler/meta-vmdef.lisp
src/compiler/x86/static-fn.lisp
version.lisp-expr