Commit Graph

21 Commits

Author SHA1 Message Date
Matthew Flatt
dbd940611e allow #f as shift for `syntax-shift-phase-level' 2012-05-12 00:55:12 -06:00
Matthew Flatt
3d69dfab86 first cut at submodules 2012-03-09 10:34:56 -07:00
Matthew Flatt
779b419c03 first cut at cross-module function inlining
Inline only trivial functions, such as `(empty? x)' -> `(null? x)',
to avoid generating too much code.

Bytecode includes a new `inline-variant' form, which records a
version of a function that is suitable for cross-module inlining.
Mostly, the variant let the run-time system to retain a copy
of the bytecode while JITting (and dropping the bytecode of)
the main variant, but it may be different from the main variant
in other ways that make it better for inlining (such a less loop
unrolling).
2011-11-30 07:39:36 -07:00
Matthew Flatt
d3c56c9f13 generalized `begin-for-syntax' 2011-09-08 14:06:00 -06:00
Matthew Flatt
5352d670c4 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.
2011-08-09 16:33:17 -06:00
Matthew Flatt
69ad39d45c fix `compiler/zo-parse' & co. 2011-06-30 08:24:41 -06:00
Matthew Flatt
a4da2a3f4c fix varref' in compiler/zo-structs', etc.
and sync docs better with implementation
2011-05-09 09:43:32 -06:00
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
Matthew Flatt
0754ad0114 safe-for-space repairs for functions with rest args 2011-04-22 15:59:33 -06:00
Blake Johnson
c88eb704c7 removing indirects from zo handling 2010-09-16 12:45:37 -06:00
Blake Johnson
3433af0a30 fixing pr11175, added only-rest-arg-not-used flag 2010-09-10 14:46:04 -06:00
Blake Johnson
170ab47dc2 fixing pr11036 by adding plain certificates 2010-09-10 14:46:04 -06:00
Blake Johnson
ecc9ceb842 zo-marshal fixes and switching back to prefabs 2010-09-10 14:46:03 -06:00
Blake Johnson
893294674a quoting parameter and not prefab structs 2010-09-10 14:46:02 -06:00
Blake Johnson
b062c900a1 cases for more complicated lexical renames 2010-08-03 15:40:41 -06:00
Blake Johnson
7653ce037b another all-from-module fix 2010-08-02 19:26:32 -06:00
Blake Johnson
80c6ba482d better certificate handling in zo-parse and zo-marshal 2010-07-30 14:37:17 -06:00
Blake Johnson
8df94dd746 handling top-level-renames and mark-barriers 2010-07-15 15:53:02 -06:00
Jay McCarthy
035ee93911 Using placeholders in zo-parse for more cyclic datums 2010-05-27 12:35:26 -06:00
Matthew Flatt
6cfc0b481d fix decompiler 2010-05-08 07:37:07 -06:00
Matthew Flatt
28b4043077 rename all files .ss -> .rkt 2010-04-27 16:50:15 -06:00