racket/collects/compiler
Matthew Flatt 2ada6d0e89 break link to namespaces from from closures over top-/module-level vars
- the `lam' structure from `compiler/zo-struct' changed to include a
   `toplevel-map' field

 This change helps solve a finalization problem in `racket/draw',
 which in turn sigificantly reduces the peak memory use of `raco setup'
 during the doc-building phase (because some documents load `racket/draw'
 to render images, and multiple copies of `racket/draw' were retained
 before finalization was fixed).

 The change is an extreme way to solve a specific finalization
 problem, but it's a kind of space-safety improvement; space safety
 almost never matters, but when it does, then working around a lack of
 space safety is practically impossible. In this case, it's not clear
 how to otherwise solve the `racket/draw' finalization problem.

 The improvement doesn't change the representation of closures, but it
 requires special cooperation with the GC. All closures in a module
 continue to share the same array of globals (plus syntax objects);
 that is, instead of completely flat closures, Racket uses a two-level
 environment where top-/module-level variables are grouped
 together. The code half of a closure now records which
 top-/module-level variables the body code actually uses, and the mark
 phase of GC consults this information to retain only parts of the
 top-/module-level environment frame that are actually used by some
 closure (or all of the frame if it is accessible through some other
 route).  In other words, the GC supports a kind of "dependent
 reference" to an array that is indexed by positions into the array
 --- except that the code is more in the "Racket" directory instead of
 the "GC" directory, since it's so specific to the closure
 representation.
2011-05-03 06:57:49 -06:00
..
commands Use proper raco command name in make and pack. 2011-02-09 21:13:55 -05:00
demodularizer break link to namespaces from from closures over top-/module-level vars 2011-05-03 06:57:49 -06:00
private write proper ELF section for Unix launchers/executables 2011-04-17 18:04:00 -06:00
tests added lots of new tests that our documentation is complete 2011-04-25 13:24:43 -05:00
bundle-dist.rkt rename all files .ss -> .rkt 2010-04-27 16:50:15 -06:00
cffi.rkt Lots of "~e" to "~.s" changes. 2010-08-25 17:17:01 -04:00
cffi.scrbl rackety misc docs 2010-05-07 09:13:51 -06:00
cm-accomplice.rkt rename all files .ss -> .rkt 2010-04-27 16:50:15 -06:00
cm.rkt cache loaded compiled modules 2011-04-16 13:24:58 -06:00
comp-unit.rkt rename all files .ss -> .rkt 2010-04-27 16:50:15 -06:00
compiler-unit.rkt share a timestamp cache across all collections during `raco setup' 2011-04-27 19:02:08 -06:00
compiler.rkt rename all files .ss -> .rkt 2010-04-27 16:50:15 -06:00
decompile.rkt break link to namespaces from from closures over top-/module-level vars 2011-05-03 06:57:49 -06:00
distribute.rkt fix problem with `raco exe' 2011-02-01 08:01:16 -07:00
embed-sig.rkt rename all files .ss -> .rkt 2010-04-27 16:50:15 -06:00
embed-unit.rkt fix mistakes uncovered by optimizer warnings 2011-05-03 06:57:48 -06:00
embed.rkt restore and document #:collects-dest arg to create-embedding-exe 2010-06-05 17:59:41 -06:00
find-exe.rkt moved find-exe to its own top-level file 2011-02-08 15:38:11 -06:00
info.rkt rename all files .ss -> .rkt 2010-04-27 16:50:15 -06:00
main.rkt 2010 -> 2011 2010-12-31 15:59:39 -05:00
mzc.h break link to namespaces from from closures over top-/module-level vars 2011-05-03 06:57:49 -06:00
mzclink.h Adding collects, with all the right properties (except eoln-style). 2005-05-27 18:56:37 +00:00
option-unit.rkt rename all files .ss -> .rkt 2010-04-27 16:50:15 -06:00
option.rkt rename all files .ss -> .rkt 2010-04-27 16:50:15 -06:00
sig.rkt Parallel collects build (process-based) "raco setup -u" 2010-07-02 14:27:08 -06:00
src2src.rkt Change a bunch of "~%" and "~n" in format strings to "\n". 2010-08-25 17:17:01 -04:00
to-core.rkt rename all files .ss -> .rkt 2010-04-27 16:50:15 -06:00
xform.rkt rename all files .ss -> .rkt 2010-04-27 16:50:15 -06:00
zo-marshal.rkt break link to namespaces from from closures over top-/module-level vars 2011-05-03 06:57:49 -06:00
zo-parse.rkt break link to namespaces from from closures over top-/module-level vars 2011-05-03 06:57:49 -06:00
zo-structs.rkt break link to namespaces from from closures over top-/module-level vars 2011-05-03 06:57:49 -06:00