Commit Graph

16 Commits

Author SHA1 Message Date
Matthew Flatt
278f090e83 generalized `begin-for-syntax'
original commit: d3c56c9f13
2011-09-08 14:06:00 -06:00
Matthew Flatt
053734c4c8 fix compiler handling of top-/module-level constants
The JIT and bytecode compiler disagreed on the definition of
"constant". Now there are two levels: "constant" means constant across
all instantiations, and "fixed" means constant for a given instantation.
The JIT uses this distinction to generate direct-primitive calls
or not. (Without the distinction, a direct jump to `reverse' could
be wrong, because `racket/base' might get instantiated with the
JIT disabled or not.)

Also, fixed a bug in the JIT's `vector-set!' code in the case that
the target vector is a top-/module-level reference that is ready,
fixed, or constant.

original commit: 7eb2042bd9
2011-08-19 06:32:44 -06:00
Matthew Flatt
eec721ff4c generalize #%variable-reference' and add variable-reference-constant?'
Use the new functions to make the expansion of keyword applications
to known procedure work  with mutation.

original commit: 5352d670c4
2011-08-09 16:33:17 -06:00
Matthew Flatt
32d8828ab5 improve decompiler handling of syntax object
original commit: 5e49e0adea
2011-07-08 06:22:40 -06:00
Matthew Flatt
1f9a6339e4 fix decompile of define-values-for-syntax
original commit: 5bc8b67eba
2011-07-07 07:25:48 -06:00
Matthew Flatt
ee407d6610 fix varref' in compiler/zo-structs', etc.
and sync docs better with implementation

original commit: a4da2a3f4c
2011-05-09 09:43:32 -06:00
Matthew Flatt
13e715ef44 fix decompiler's listing of captured top- and module-level variables
original commit: db75dddf87
2011-05-08 17:01:23 -06:00
Matthew Flatt
1955c935ff 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.

original commit: 2ada6d0e89
2011-05-03 06:57:49 -06:00
Matthew Flatt
9f2fba9625 safe-for-space repairs for functions with rest args
original commit: 0754ad0114
2011-04-22 15:59:33 -06:00
Blake Johnson
d2ad91ae38 removing indirects from zo handling
original commit: c88eb704c7
2010-09-16 12:45:37 -06:00
Matthew Flatt
03593e433b teach decompiler about literal prims from `#%futures'
original commit: 9be0559936
2010-08-25 14:58:27 -06:00
Matthew Flatt
b6a4c4ed65 extend decompiler to handle #%variable-reference
original commit: 5cc0baa01e
2010-07-20 06:35:58 -06:00
Matthew Flatt
d19d9eb8f7 tweak decompiler to use a different name for boxed locals
original commit: 535c8e0a09
2010-06-10 07:32:11 -04:00
Jay McCarthy
f0add80ef2 Do not read the entire zo at once
original commit: 2a934cb053
2010-05-24 13:14:36 -06:00
Matthew Flatt
fc1a05de68 fix decompiler
original commit: 6cfc0b481d
2010-05-08 07:37:07 -06:00
Matthew Flatt
0fcf163a4d rename all files .ss -> .rkt
original commit: 28b4043077
2010-04-27 16:50:15 -06:00