Commit Graph

540 Commits

Author SHA1 Message Date
Matthew Flatt
5b016b4c32 win32: support MinGW build
A MinGW build is the same shape as a MSVC build (but without
MzCOM), unlike a Cygwin build.
2012-12-09 11:26:02 -07:00
Matthew Flatt
afca33b78b 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'.
2012-11-18 10:31:20 -07:00
Matthew Flatt
d7eddb91ef fix compiler/zo-marshal
Missed some updates for recent local-type changes. Also, fix up a
few field names in the demodularizer.
2012-11-15 06:18:05 -07:00
Matthew Flatt
bdf1c3e165 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).
2012-11-14 19:37:01 -07:00
Matthew Flatt
623265d1e8 fix demod for submodules 2012-11-12 07:47:30 -07:00
Matthew Flatt
06ffb74d66 compiler/cm-accomplice: add `register-external-module'
The new function allows declaration of a module dependency, as
opposed to a mere file dependency. Misuse of this function opens
the door to cyclic compilation dependencies, so we have to check
for that in `compiler/cm'.
2012-11-11 09:38:16 -07:00
Eli Barzilay
672910f27b Lots of bad TAB eliminations.
I started from tabs that are not on the beginning of lines, and in
several places I did further cleanings.

If you're worried about knowing who wrote some code, for example, if you
get to this commit in "git blame", then note that you can use the "-w"
flag in many git commands to ignore whitespaces.  For example, to see
per-line authors, use "git blame -w <file>".  Another example: to see
the (*much* smaller) non-whitespace changes in this (or any other)
commit, use "git log -p -w -1 <sha1>".
2012-11-07 11:22:20 -05:00
Eli Barzilay
4c8d1f67b2 #lang racket' -> #lang racket/base' conversions in demodularizer. 2012-11-07 08:03:45 -05:00
Matthew Flatt
d7bf677645 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.
2012-10-30 13:29:28 -06:00
Matthew Flatt
e59066debe 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
2012-10-19 11:27:52 -06:00
Matthew Flatt
e1a6d2b07d fix raco exe' for module+' submodules
Closes PR 13116

Merge to v5.3.1
2012-10-17 16:28:41 -06:00
Matthew Flatt
3fb12b4ff4 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.
2012-09-23 10:47:24 -05:00
Matthew Flatt
9b6ff5d94d compiler/cm: fix self-dependency check for ".ss" vs. ".rkt" 2012-09-21 08:31:04 -06:00
Matthew Flatt
e7b1af845b compiler/cm: repair related to compiled-file-roots 2012-09-12 12:03:08 -06:00
Matthew Flatt
4f351dd6b1 add `current-compiled-file-roots', PLTCOMPILEDROOTS, and -R/--compiled
The new parameter (and supporting environment variables and
command-line flags) can bytecode lookup to a tree other than
where a source file resides, so that sources and generated
compiled files can be kept separate. It also supports storing
bytecode files in a version-specific location (either with
the source or elsewhere).
2012-09-11 13:18:18 -06:00
Matthew Flatt
0bd53a3549 compiler/zo-marshal: repair mashaling of import info in syntax 2012-08-06 15:32:27 -06:00
Matthew Flatt
df4fed7011 windows: fix `subprocess' for an empty argument
An empty argument must be quoted at the CreateProcess() level.

Merge to v5.3
2012-07-25 20:37:20 -06:00
Matthew Flatt
5a1bc5ad40 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
2012-07-24 07:22:57 -05:00
Matthew Flatt
d95ec4d454 fixes for submodules and `variable-reference->namespace'
Closes PR 12925

Merge to 5.3
2012-07-22 11:54:46 -05:00
Sam Tobin-Hochstadt
16923f4ad9 scheme/base -> racket/base 2012-07-19 10:55:31 -04:00
Matthew Flatt
c8f4ac6ae4 submodules: make .zo path stick for consistent independent loading
When a module is loaded from bytecode and then the value of
`use-compiled-file-paths' changes, an attempt to load a submodule
would fail, because source isn't used if the main module is
already declared, and the bytecode code is not used according to
`use-compiled-file-paths'. Make the bytecode path stick when it
is used once, so that submodule loads succeed, and make it work
even with `namespace-module-attach'.

The module-attach part of this protocol requires a change to the
API of a module name resolver: the notification mode gets two
arguments, instead of one, where the second argument is an
environment.
2012-07-17 09:47:05 -06:00
Matthew Flatt
a605183a0a more submodule repairs for `raco exe' 2012-07-16 10:02:13 -06:00
Asumu Takikawa
403aaac7d4 Moved some mzlib library implementations to racket
The libraries moved were:
  - mzlib/control      => racket/control
  - mzlib/date         => racket/date
  - mzlib/deflate      => file/gzip
  - mzlib/inflate      => file/gunzip
  - mzlib/port         => racket/port
  - mzlib/process      => racket/system
  - mzlib/runtime-path => racket/runtime-path
  - mzlib/shared       => racket/shared
  - mzlib/unit         => racket/unit
  - mzlib/unit-exptime => racket/unit-exptime
  - mzlib/zip          => file/zip

The old modules in mzlib are now pointers to the
new modules. These are all modules that were already
redirected in the documentation.
2012-07-11 18:26:10 -04:00
Matthew Flatt
c69ea5569f `raco decompile' fix 2012-07-01 09:25:12 -06:00
Matthew Flatt
577cf4592e fix problems with references to bindings at higher phases 2012-06-27 09:57:50 -06:00
Matthew Flatt
6173b7eb05 fix zo-parse, zo-struct, etc. for context in whole-module import 2012-06-23 05:21:53 -07:00
Matthew Flatt
2fcb635790 raco exe: checks on source and destination paths
Disallow creating a launcher whose source is the launcher itself,
for example.
2012-05-28 20:30:58 -06:00
Matthew Flatt
68029b4ade raco decompile: show `require's 2012-05-16 07:12:26 -06:00
Matthew Flatt
d93f4214a4 fix `compiler/zo-parse', etc. for phase-shift addition 2012-05-13 09:00:28 -06:00
Matthew Flatt
92db2b4fb3 zo-parse update for phase-shift syntax object marshaling 2012-05-13 06:57:44 -06:00
Matthew Flatt
8fc3d25be4 cm: collect dependencies for submodules 2012-05-12 00:55:12 -06:00
Matthew Flatt
dbd940611e allow #f as shift for `syntax-shift-phase-level' 2012-05-12 00:55:12 -06:00
Eli Barzilay
17090fca4f A bunch of fprintf' -> eprintf' conversions (and a few related things). 2012-05-06 12:06:00 -04:00
Matthew Flatt
5ffb9389ac fix `raco setup' for splicing collections
Closes PR 12676
2012-05-03 11:11:38 -06:00
Eli Barzilay
16d40c3170 Fix command-line for the demodularizer.
Closes PR 12731.
2012-04-28 05:23:43 -04:00
Matthew Flatt
f099eec2af save modidx submodule path in bytecode form
This change should have been part of 9ba663aa77.
2012-04-26 21:45:00 -06:00
Matthew Flatt
16d65ed251 fix `raco demod' for new submodule fields in zo structs 2012-04-04 07:37:30 -06:00
Danny Yoo
8f2ea07ec5 Optimize cpt-table-lookup
(Tweaked by Eli.)
2012-04-04 02:52:51 -04:00
Matthew Flatt
63a4414863 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.
2012-03-29 14:55:14 -06:00
Matthew Flatt
96e4fa0d13 promote raco test'; demote raco unpack' 2012-03-29 14:55:14 -06:00
Matthew Flatt
876bc6f02b doc corrections and improvements related to submodules
In particular, add `module+' to the Guide.
2012-03-22 15:12:55 -06:00
Matthew Flatt
01f1fd56b4 adjust cm to not cmopile when it's not supposed to use source 2012-03-13 18:46:28 -06:00
Matthew Flatt
5dc08cbe03 decompiler repairs related to changes for submodules 2012-03-12 09:04:37 -06:00
Jay McCarthy
f8325776cf racket/slice, expand raco test, remove begin-for-testing 2012-03-09 19:51:42 -07:00
Jay McCarthy
b73444a0f3 Adding module**, when-testing, and raco test 2012-03-09 15:54:18 -07:00
Matthew Flatt
85802f45f2 raco exe' uses a main' submodule, if any 2012-03-09 10:34:57 -07:00
Matthew Flatt
3d69dfab86 first cut at submodules 2012-03-09 10:34:56 -07:00
Matthew Flatt
dc1d4e80dd fix incorrect GC decls hard-wired into xform
Closes PR 12602
2012-02-26 03:58:21 +00:00
Matthew Flatt
2c479683d1 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
2012-02-13 16:27:51 -07:00
Matthew Flatt
577f38f649 change `raco demod' test to write to temporary drectory
Also add `-o' option to `raco demod'.
2012-02-10 14:02:12 -07:00