Commit Graph

567 Commits

Author SHA1 Message Date
Robby Findler
3b0d2f16da change compiler/cm so that the default logs the messages to
a logger named compiler/cm
2013-03-14 16:36:50 -05:00
Eli Barzilay
af6be85ff5 Fix lots of indentation mistakes.
(Found by my ayatollah script...)
2013-03-14 10:55:47 -04:00
Matthew Flatt
f8c30338db fix problem with `raco exe' and cross-phase persistent modules
Relevant test is "teaching-lang-executable-creation.rkt" iin
"tests/drracket".
2013-02-27 08:53:43 -07:00
Matthew Flatt
88a36a077c terminology change again: "cross-phases persistent" modules 2013-02-27 08:53:43 -07:00
Matthew Flatt
a46849f3b9 minor decompiler tweak 2013-02-27 08:53:43 -07:00
Matthew Flatt
2646ff6895 try "phase-collapsing" instead of "phaseless" 2013-02-26 19:01:36 -07:00
Matthew Flatt
899a3279c2 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'.
2013-02-26 14:55:28 -07:00
Eli Barzilay
9e9adeae0c Consistent capitalization for "GRacket". 2013-02-16 13:41:38 -05:00
Matthew Flatt
b22ac3b990 compiler/cm-accompice: log to a logger named 'cm-accomplice 2013-02-14 19:47:40 -07:00
Eli Barzilay
49ab87eadc "PLT Scheme Inc" -> "PLT Design Inc" 2013-02-12 08:06:30 -05:00
Robby Findler
86b1f276eb tweak raco test output, yet again 2013-02-07 10:16:16 -06:00
Robby Findler
7750cf9800 change raco test's announcements to say "raco test" 2013-02-07 06:58:11 -06:00
Matthew Flatt
0aaf6b8086 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.
2013-02-06 18:09:03 +01:00
Robby Findler
2b7c6e32a9 adjust raco test so it test the command-line
arguments to the empty vector before running anything
2013-02-04 20:38:34 -06:00
Robby Findler
44e91ea961 change printouts from raco test to be slightly more informative 2013-02-03 15:31:40 -06:00
Robby Findler
9fd4698be9 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
2013-02-03 13:14:55 -06:00
Matthew Flatt
28493dcc88 repairs to extflonum changes 2013-01-29 05:53:30 -07:00
Michael Filonenko
17b8092641 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).
2013-01-28 18:17:06 -07:00
Matthew Flatt
780fc2100a fix log-event propagation in `compiler/cm' 2013-01-24 06:43:10 -05:00
Matthew Flatt
1744a78738 mach-o: fix problems related to code signing
Strip any code signing when generating an executable from
Racket or GRacket. Also, place the __LINKEDIT segment in
virtual memory after the __PLTSCHEME segment, so that
the in-memory layout order matches the file layout order,
which in turn makes the code-signing tool's update of the
__LINKEDIT segment's size not create a virtual-memory
overlap with __PLTSCHEME.
2013-01-18 11:03:46 -06:00
Matthew Flatt
a229f2924d mach-o: handle some new load commands 2013-01-18 11:03:46 -06:00
Jay McCarthy
3312a8064d Working with links in collection testing 2013-01-10 10:45:54 -07:00
Jay McCarthy
9015c15eec test - Supporting packages in raco test 2013-01-09 08:12:56 -07:00
Jay McCarthy
3e0fff7dff Extending raco test to work on collections 2013-01-09 07:59:47 -07:00
Eli Barzilay
79b9acd444 2012 -> 2013 2013-01-09 01:17:26 -05:00
Matthew Flatt
e66cd6f9c7 raco exe: yet another submodule repair
Closes PR 13410
2013-01-05 09:12:47 -07:00
Matthew Flatt
0c91930965 mingw32: make no-futures, no-places build work 2012-12-21 11:43:42 -07:00
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