add `compile-time-environment'
authorAndy Wingo <wingo@pobox.com>
Fri, 24 Oct 2008 09:36:59 +0000 (11:36 +0200)
committerAndy Wingo <wingo@pobox.com>
Sat, 25 Oct 2008 20:58:48 +0000 (22:58 +0200)
commit20bdc71054e6917442097e18de208ca8db89b5fd
tree74510b2b0b9fc4dece7fd492a190d15c12ae341c
parent1086fabdc9452846f1b269da7faf2022b5cc7472
add `compile-time-environment'

* ice-9/boot-9.scm (compile-time-environment): New function, with
  documentation. The trick is that the compiler recognizes calls to
  (compile-time-environment) and replaces it with a representation of the
  *available* lexicals. Note that this might not be all the lexicals;
  only the heap-allocated ones are returned.

* module/language/scheme/translate.scm (custom-transformer-table):
  Compile `compile-time-environment' to <ghil-reified-env>.

* module/system/il/compile.scm (codegen): Add <ghil-reified-env> clause,
  which calls ghil-env-reify.

* module/system/il/ghil.scm (ghil-env-reify): New procedure, returns a
  list of (NAME . EXTERNAL-INDEX).
  (<ghil>): Add <ghil-reified-env> object.
ice-9/boot-9.scm
module/language/scheme/translate.scm
module/system/il/compile.scm
module/system/il/ghil.scm