Commit Graph

27 Commits

Author SHA1 Message Date
Matthew Flatt
e97bb74005 add experimental support for "phaseless" modules
The intent is to support phase-crossing data such as the `exn:fail:syntax'
structure type that is instantiaed by macros and recognized by contexts
that use `eval' or `expand'. Phaseless modules are highly constrained,
however, to avoid new cross-phase channels, and a module is inferred to
be phaseless when it fits syntactic constraints.

I've adjusted `racket/kernel' and improved its documentation a little
so that it can be used to implement a phaseless module (which can
import only from other phaseless modules).

This change also adds a `flags' field to the `mod' structure type
from `compiler/zo-structs'.

original commit: 899a3279c2
2013-02-26 14:55:28 -07:00
Matthew Flatt
bbc7d243e9 fix compiler/zo-marshal
Missed some updates for recent local-type changes. Also, fix up a
few field names in the demodularizer.

original commit: d7eddb91ef
2012-11-15 06:18:05 -07:00
Matthew Flatt
85715ca473 fix demod for submodules
original commit: 623265d1e8
2012-11-12 07:47:30 -07:00
Eli Barzilay
0dd947ab15 #lang racket' -> #lang racket/base' conversions in demodularizer.
original commit: 4c8d1f67b2
2012-11-07 08:03:45 -05:00
Matthew Flatt
4807353e8d bytecode validator: check "constant" annotations on variable references
Bytecode changes in two small ways to help the validator:
 * a cross-module variable reference preserves the compiler's
   annotation on whether the reference is constant, fixed, or other
 * lifted procedures now appear in the module body just before the
   definitions that use them, instead of at the beginning of the
   module body

original commit: e59066debe
2012-10-19 11:27:52 -06:00
Eli Barzilay
ae29015ee7 A bunch of fprintf' -> eprintf' conversions (and a few related things).
original commit: 17090fca4f
2012-05-06 12:06:00 -04:00
Eli Barzilay
d0f469f166 Fix command-line for the demodularizer.
Closes PR 12731.

original commit: 16d40c3170
2012-04-28 05:23:43 -04:00
Matthew Flatt
4b4a17b3c6 fix `raco demod' for new submodule fields in zo structs
original commit: 16d65ed251
2012-04-04 07:37:30 -06:00
Matthew Flatt
a0837b2453 first cut at submodules
original commit: 3d69dfab86
2012-03-09 10:34:56 -07:00
Matthew Flatt
ee5fdf3771 change `raco demod' test to write to temporary drectory
Also add `-o' option to `raco demod'.

original commit: 577f38f649
2012-02-10 14:02:12 -07:00
Matthew Flatt
1963cc91b7 fix demod for inline-variant
original commit: 788e8bb5f4
2011-12-03 06:15:58 -07:00
Matthew Flatt
c663b1e957 fix demod for `begin-for-syntax' changes
original commit: b1eab296f4
2011-09-08 19:19:14 -06:00
Matthew Flatt
278f090e83 generalized `begin-for-syntax'
original commit: d3c56c9f13
2011-09-08 14:06:00 -06:00
Matthew Flatt
b5181ff032 adapt demodularizer to `compiler/zo-struct' change
original commit: 98740390fa
2011-07-01 22:46:20 -06:00
Eli Barzilay
f90858601d A long overdue scan to eliminate files without terminating newlines.
(DrRacket should really do that.)

original commit: 40124a0619
2011-06-28 02:01:41 -04: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
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
Jay McCarthy
c428f6cafe Exposing more values to GC by not making them toplevels
original commit: 26c7625c79
2010-10-30 09:14:58 -06:00
Jay McCarthy
5f064063f5 Saving time by only reading zos once and saving space by limiting the extent of the hash tables
original commit: 255489e0af
2010-10-30 08:54:13 -06:00
Jay McCarthy
e5b1e20529 Removing newlines from debug messages
original commit: 46e2e7931a
2010-10-30 08:31:23 -06:00
Blake Johnson
8ae1cd0c3e only creating zo file
original commit: 783418ce37
2010-10-29 19:50:12 -06:00
Blake Johnson
969c0f4d58 replacing self modidx refs and tests
original commit: b2b5875e3e
2010-10-29 19:50:12 -06:00
Blake Johnson
8392dd8fa4 fixing logging and running code in zo-exs
original commit: 0688c18593
2010-10-29 19:50:11 -06:00
Blake Johnson
6b8a9b0861 Avoiding cycles in everything but closures
original commit: 7bffbc31a2
2010-10-29 19:50:11 -06:00
Blake Johnson
7aac10e938 offset calculation fix
original commit: d84b78daab
2010-10-29 19:50:11 -06:00
Blake Johnson
e0e144e210 changed eprintfs to log-debug
original commit: 3ddda200e8
2010-10-29 19:50:11 -06:00
Blake Johnson
1f2e1c6647 moved demodularizer from github to collects and added it to raco
original commit: 4676662e4b
2010-10-29 19:50:10 -06:00