Commit Graph

310 Commits

Author SHA1 Message Date
Matthew Flatt
3c01f128b9 raco exe: yet another submodule repair
Closes PR 13410

original commit: e66cd6f9c7
2013-01-05 09:12:47 -07:00
Matthew Flatt
3b9e13b38f fix to bytecode compiler's propoagation of local-type info
This is another old bug that could have caused validation failures
with flonums, but it showed up with fixnum tracking because fixnums
are more common (e.g., from `string-length').

There were really two bugs: information installed at the
wrong offet in one place, and a failure to detect that information
should be propagated in a different place. Fixing both avoids
a validation problem with `html/sgml-reader'.

original commit: afca33b78b
2012-11-18 10:31:20 -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
d003549257 bytecode compiler: generalize local-type tracking for unboxing
Track fixnum results in the same way as flonum results to enable
unboxing, if that turns out to be useful. The intent of the change,
though, is to support other types in the future, such as "extnums".

The output `raco decompile' no longer includes `#%in', `#%flonum',
etc., annotations, which are mostly obvious and difficult to
keep in sync with the implementation. A local-binding name now
reflects a known type, however.

The change includes a bug repair for he bytecode compiler that
is independent of the generalization (i.e., the new test case
triggered the old problem using flonums).

original commit: bdf1c3e165
2012-11-14 19:37:01 -07:00
Matthew Flatt
85715ca473 fix demod for submodules
original commit: 623265d1e8
2012-11-12 07:47:30 -07:00
Matthew Flatt
03c5a46331 fix `lazy-require' in phase levels other than 0
The `lazy-require' form expands to `define-runtime-module-path-index',
whch doesn't work right at phase levels other than 0. Work around the
problem by generating a submodule to hold the
`define-runtime-module-path-index' form.

This repair fixes `raco exe' on certain uses of `match', which in turn
uses `lazy-require' at compile time.

Also, use `register-external-module' to generate appropriate
dependencies on lazily loaded modules.

original commit: 6b16679b39
2012-11-11 09:38:16 -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
ad98dc0ddf track import "shapes" as procedure or structure type
Shape information allows the linker to check the importing
module's compile-time expectation against the run-time
value of its imports. The JIT, in turn, can rely on that
checking to better inline structure-type predicates, etc.,
and to more directy call JIT-generated code across
module boundaries.

In addition to checking the "shape" of an import, the import's
JITted vs. non-JITted state must be consistent. To prevent shifts
in JIT state, the `eval-jit-enabled' parameter is now restricted
in its effect to top-level bindings.

original commit: d7bf677645
2012-10-30 13:29:28 -06: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
Matthew Flatt
5eaf286081 fix raco exe' for module+' submodules
Closes PR 13116

Merge to v5.3.1

original commit: e1a6d2b07d
2012-10-17 16:28:41 -06:00
Matthew Flatt
639af63b3f fix planet `raco exe' tests
Merge ot v5.3.1

original commit: bd146e2d8d
2012-10-17 16:28:41 -06:00
Matthew Flatt
f6441369d9 raco exe: handle failing submodule search correctly
An attempt to detect a submodule could trigger the original module
name resolver when the would-be enclosing module would be handled
by the embedding-specific resolver. When a submodule is not found
but its would-be enclosing module is embedded, then assume that
the default resolver wouldn't find the submodule, eithe --- and
therefore avoid a potential "collection not found" error.

original commit: 3fb12b4ff4
2012-09-23 10:47:24 -05:00
Matthew Flatt
841bbb465d compiler/zo-marshal: repair mashaling of import info in syntax
original commit: 0bd53a3549
2012-08-06 15:32:27 -06:00
Matthew Flatt
462f389bb2 normalize module rename info to vector in ".zo" format
This is related to the receent repairs for submodules and
`variable-reference->namespace'.

Merge to v5.3

original commit: 5a1bc5ad40
2012-07-24 07:22:57 -05:00
Matthew Flatt
3c46e5fdc6 fixes for submodules and `variable-reference->namespace'
Closes PR 12925

Merge to 5.3

original commit: d95ec4d454
2012-07-22 11:54:46 -05:00
Matthew Flatt
3fcc8dc945 more submodule repairs for `raco exe'
original commit: a605183a0a
2012-07-16 10:02:13 -06:00
Matthew Flatt
a8aec864b9 `raco decompile' fix
original commit: c69ea5569f
2012-07-01 09:25:12 -06:00
Matthew Flatt
4be962e720 fix problems with references to bindings at higher phases
original commit: 577cf4592e
2012-06-27 09:57:50 -06:00
Matthew Flatt
359eb87abb fix zo-parse, zo-struct, etc. for context in whole-module import
original commit: 6173b7eb05
2012-06-23 05:21:53 -07:00
Matthew Flatt
fd364dc2de raco exe: checks on source and destination paths
Disallow creating a launcher whose source is the launcher itself,
for example.

original commit: 2fcb635790
2012-05-28 20:30:58 -06:00
Matthew Flatt
767cae7e20 raco decompile: show `require's
original commit: 68029b4ade
2012-05-16 07:12:26 -06:00
Matthew Flatt
c9f62c0bc5 fix `compiler/zo-parse', etc. for phase-shift addition
original commit: d93f4214a4
2012-05-13 09:00:28 -06:00
Matthew Flatt
95e0451656 zo-parse update for phase-shift syntax object marshaling
original commit: 92db2b4fb3
2012-05-13 06:57:44 -06:00
Matthew Flatt
5139f5e8d6 allow #f as shift for `syntax-shift-phase-level'
original commit: dbd940611e
2012-05-12 00:55:12 -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
ac6210c42e save modidx submodule path in bytecode form
This change should have been part of 9ba663aa77.

original commit: f099eec2af
2012-04-26 21:45:00 -06:00
Matthew Flatt
7afd70f96e fix Planet resolver for submodule tests
For example, `(module-declared? '(submod (planet dyoo/bf) reader) #t)'
shouldn't fail if there's no "main.rkt" to hold a `reader' submodule;
it should return #f.

Merge to 5.3, but updating cstartup.inc will require a manual merge.

original commit: 862e1628a6
2012-04-19 08:15:11 -06: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
Danny Yoo
197004495a Optimize cpt-table-lookup
(Tweaked by Eli.)

original commit: 8f2ea07ec5
2012-04-04 02:52:51 -04:00
Matthew Flatt
5868d51521 make --run-if-absent' the default mode for raco test'
This convention makes it easier to deal with a set
of ".rkt" files that implement tests, while a `test'
module implements a `main'-like split for some of the
files.

original commit: 63a4414863
2012-03-29 14:55:14 -06:00
Matthew Flatt
6a69441d84 promote raco test'; demote raco unpack'
original commit: 96e4fa0d13
2012-03-29 14:55:14 -06:00
Matthew Flatt
32da9b50bb doc corrections and improvements related to submodules
In particular, add `module+' to the Guide.

original commit: 876bc6f02b
2012-03-22 15:12:55 -06:00
Matthew Flatt
95ed87abd4 decompiler repairs related to changes for submodules
original commit: 5dc08cbe03
2012-03-12 09:04:37 -06:00
Jay McCarthy
98fa97ae26 racket/slice, expand raco test, remove begin-for-testing
original commit: f8325776cf
2012-03-09 19:51:42 -07:00
Jay McCarthy
9741ae6d98 Adding module**, when-testing, and raco test
original commit: b73444a0f3
2012-03-09 15:54:18 -07:00
Matthew Flatt
f2dbacc73f raco exe' uses a main' submodule, if any
original commit: 85802f45f2
2012-03-09 10:34:57 -07:00
Matthew Flatt
a0837b2453 first cut at submodules
original commit: 3d69dfab86
2012-03-09 10:34:56 -07:00
Matthew Flatt
02d466aec0 add --launcher'/-l' flag to `raco exe' to create launchers
This addition triggered several other changes:

 * -k for a Mac OS X embedding is now relative to the __PLTSCHEME
   segment (which means that executables won't break if you strip
   them, for example)

 * the command-line no longer has a limited size for Mac OS X
   launchers and embedding executables

 * Mac OS X GUI and Windows launchers record the creation-time
   collection path, unless they are created as "relative" launchers

original commit: 2c479683d1
2012-02-13 16:27:51 -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
90583ce572 adjust `raco ctool --c-mods' and related to work with places
That is, the generated declare_modules() function registers the
module-declaration code so that it is run in any new place, too.

Merge to 5.2.1

original commit: 481e061440
2012-01-19 13:14:02 -07:00
Matthew Flatt
aae4950f02 fix raco ctool --c-mods' for racket'
Merge to 5.2.1

original commit: 6c4cd0e9c2
2012-01-19 13:14:02 -07:00
Matthew Flatt
f751553b48 document raco make' flags; add --disable-constant' flag
original commit: 6b6d281dee
2012-01-19 13:14:02 -07:00
Matthew Flatt
cd5e01e03c fix `raco make --no-deps'
original commit: b87a7c0ec9
2011-12-13 06:13:17 -07:00
Matthew Flatt
1963cc91b7 fix demod for inline-variant
original commit: 788e8bb5f4
2011-12-03 06:15:58 -07:00
Matthew Flatt
52fa72bd6b 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).

original commit: 779b419c03
2011-11-30 07:39:36 -07:00
Matthew Flatt
9d2461bca5 more `raco exe' cycle repairs
original commit: b6a9330bf1
2011-10-07 10:32:49 -06:00
Matthew Flatt
7d7888d2ba fix compiler bug related to lifting and unbox flonums
As variables are dropped for lifted functions, the bitmap
for flonum closure variables was not shifted down by the
number of dropped variables.

Closes PR 12259

original commit: 7680adf486
2011-10-05 19:25:59 -06:00
Matthew Flatt
a849681b7d remove `raco exe' plot test
original commit: fe1909581b
2011-10-05 09:40:27 -06:00
Matthew Flatt
701a815db1 remove obsolete and unused Racket-to-C compiler
Removes `raco ctool -e/-c', `mzc -e/-c', `compile-extensions',
`compile-extensions-to-c', `compile-c-extensions', `compiler/cffi',
`compiler/comp-unit', `compiler:inner^', and most options in
`compiler/option'.

original commit: 0ab6637539
2011-09-20 15:26:39 -06:00