Commit Graph

373 Commits

Author SHA1 Message Date
Matthew Flatt
d728e9118d try "phase-collapsing" instead of "phaseless"
original commit: 2646ff6895
2013-02-26 19:01:36 -07:00
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
Robby Findler
0deb045dde tweak raco test output, yet again
original commit: 86b1f276eb
2013-02-07 10:16:16 -06:00
Robby Findler
12592019cd change raco test's announcements to say "raco test"
original commit: 7750cf9800
2013-02-07 06:58:11 -06:00
Matthew Flatt
cde0a28779 make raco test' more like racket'
Instad of `(dynamic-require .. #f)', use `(dynamic-require .. 0)', which
has the effect of making compile-time code "available" (see docs) in
case the loaded module uses `eval' on syntax objects that refer to
non-kernel syntax.

original commit: 0aaf6b8086
2013-02-06 18:09:03 +01:00
Robby Findler
55edebebbd adjust raco test so it test the command-line
arguments to the empty vector before running anything

original commit: 2b7c6e32a9
2013-02-04 20:38:34 -06:00
Robby Findler
80dd8d58f7 change printouts from raco test to be slightly more informative
original commit: 44e91ea961
2013-02-03 15:31:40 -06:00
Robby Findler
81b3b34895 adjust raco test so that it accepts multiple -s arguments on the command-line
This is, afaict, a completely backwards compatible way to add this
functionality in the sense that any of the non-error command-line
arguments passed to raco test before still do precisely the same
things

original commit: 9fd4698be9
2013-02-03 13:14:55 -06:00
Matthew Flatt
06eb0e67e2 repairs to extflonum changes
original commit: 28493dcc88
2013-01-29 05:53:30 -07:00
Michael Filonenko
cb9baa4f4d extflonums
An extflonum is like a flonum, but with 80-bit precision and
not a number in the sense of `number?': only operations such as
`extfl+' work on extflonums, and only on platforms where extflonums
can be implemented by hardware without interefering with flonums
(i.e., on platforms where SSE instructions are used for
double-precision floats).

[Patch provided by Michael Filonenko and revised by Matthew.]

The compiler tracks information about bindings that are known to
hold extflonums, but the JIT does not yet exploit this information
to unbox them (except as intermediate results).

original commit: 17b8092641
2013-01-28 18:17:06 -07:00
Jay McCarthy
c13876971b Working with links in collection testing
original commit: 3312a8064d
2013-01-10 10:45:54 -07:00
Jay McCarthy
22acfa3cba test - Supporting packages in raco test
original commit: 9015c15eec
2013-01-09 08:12:56 -07:00
Jay McCarthy
ea00418cfe Extending raco test to work on collections
original commit: 3e0fff7dff
2013-01-09 07:59:47 -07:00
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