1.0.17.24: refactor handling of constants in the compiler
authorNikodemus Siivola <nikodemus@random-state.net>
Wed, 4 Jun 2008 12:39:38 +0000 (12:39 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Wed, 4 Jun 2008 12:39:38 +0000 (12:39 +0000)
commit45bc305be4e269d2e1a477c8e0ae9a64df1ccd1c
tree3ce3b354506b4ea2e533471c5549e54b8d22c23e
parent8ee41eac134a552e07e966dd16d681e8216147fc
1.0.17.24: refactor handling of constants in the compiler

 * Coalesce non-circular lists, bit-vectors, and non-base-strings in the
   file-compiler. (We could do more, but these are the "easy" ones.) Takes
   care of OPTIMIZATIONS #34 in practice: outside the file compiler one can
   still trick the system into similar behaviour, but that seems a fairly
   academic concern.

 * Never go through SYMBOL-VALUE at runtime to fetch the value of a constant
   variable in compiled code.

 * Use (SYMBOL-VALUE <NAME>) as the load-form to dump references to named
   constants into fasls.

 * Signal a continuable error if an attempt to change the SYMBOL-VALUE of a
   constant variable is made.

 * Assignments to undefined variables go through SET, so that one
   cannot accidentally modify a constant by doing something like:

    (defun set-foo (x) (setq foo x))
    (defconstant foo 42)
    (set-foo 13)

 * Gets rid of INFO :VARIABLE :CONSTANT-VALUE, and just uses SYMBOL-VALUE to
   store constant values.

 * Move definition of SB!XC:LAMBDA-LIST-KEYWORDS to be beginning of the build,
   and use it instead of the host LAMBDA-LIST-KEYWORDS where appropriate.

 * Tests.
30 files changed:
NEWS
OPTIMIZATIONS
build-order.lisp-expr
package-data-list.lisp-expr
src/code/defboot.lisp
src/code/early-constants.lisp [new file with mode: 0644]
src/code/early-extensions.lisp
src/code/eval.lisp
src/code/late-extensions.lisp
src/code/symbol.lisp
src/code/target-alieneval.lisp
src/code/target-package.lisp
src/compiler/constantp.lisp
src/compiler/defconstant.lisp
src/compiler/early-c.lisp
src/compiler/generic/genesis.lisp
src/compiler/generic/vm-macs.lisp
src/compiler/globaldb.lisp
src/compiler/ir1-translators.lisp
src/compiler/ir1tran.lisp
src/compiler/ir1util.lisp
src/compiler/ir2tran.lisp
src/compiler/ltn.lisp
src/compiler/main.lisp
src/compiler/node.lisp
src/compiler/proclaim.lisp
src/pcl/walk.lisp
tests/compiler.impure.lisp
tests/info.before-xc.lisp
version.lisp-expr