Commit Graph

35576 Commits

Author SHA1 Message Date
Matthew Flatt
1757348b23 repairs for MSVC
Don't use `for (int i ....`, which is too modern.
2015-08-10 17:14:09 -06:00
Matthew Flatt
335db1d1fb update "base" version 2015-08-10 17:10:11 -06:00
Blake Johnson
fbe8537f18 add compiled-expression-recompile
Uses an unresolver pass, which is expanded to work on more programs.
2015-08-10 16:39:43 -06:00
Vincent St-Amour
d66da8ff3b Fix argument order in guide.
Closes PR15131.
2015-08-10 11:56:33 -05:00
Vincent St-Amour
e9e7e42b64 Fix generics tests for hashing change. 2015-08-09 10:50:50 -05:00
Asumu Takikawa
9f682a3f11 Add prefab structs to match grammar 2015-08-07 20:11:52 -04:00
Stephen Chang
fe2e480ef1 syntax/parse doc typo in ~describe 2015-08-07 18:40:14 -04:00
Matthew Flatt
2661d46929 toward deterministic bytecode generation
Progress toward making the bytecode compiler deterministic, so that a
fresh `make base` always produces exactly the same bytecode from the
same sources. Most changes involve avoiding hash-table order
dependencies and adjusting scope identity. The namespace used to load
a reader extension is also better defined. Plus many other little
changes.

The identity of a scope that is unmarshaled from a bytecode file now
incorporates the hash of the file, and the relative order of scopes is
preserved in a bytecode file. This combination allows compilation to
start with modules that loaded and compiled in different orders
(including delayed loading of bytecode fragments within one file).

Formerly, a reader extension triggered by `#lang` or `#reader` was
loaded in whatever namespace happens to be current. That's
unpredictable and can pollute a module build at the level of bytecode.
To help make builds deterministic, reader extensions are now loaded in
a root namespace of the current namespace.

Deterministic compilation in general relies on deterministic macros.
The two most common ways for a macro to be non-deterministic are by
using `gensym` (use `generate-temporaries`, instead) and by using an
unsorted hash-table traversal (don't do that).

At this point, bytecode generation is unlikely to be completely
deterministic, since I uncovered non-determinism mostly by iterating
attempts over the base collections. For now, the intent is not to
provide guarantees outside of the compilation of the base collections
--- but "more deterministic" is likely to be useful in the short run,
and we can improve further in the long run.
2015-08-07 15:48:39 -06:00
Matthew Flatt
a55eed9718 fix data/integer-set for 32-bit platforms 2015-08-07 05:30:26 -06:00
Matthew Flatt
0efd052218 fix single-float hashing 2015-08-07 05:30:25 -06:00
Matthew Flatt
6bcb449b55 fix impersonator-property:application-mark propagation
Propagate the mark value only if it's on the current continuation
frame, as originally intended. Adjust the docs to clarify.
2015-08-07 05:30:25 -06:00
Matthew Flatt
27fed2b1ed document compiler/zo-struct changes for new bytecode form 2015-08-07 05:30:25 -06:00
Matthew Flatt
0480f55f67 add with-immediate-continuation-mark bytecode form
Specialize a
  (call-with-immediate-continuation-mark _key (lambda (_arg) _body) _def-val)
call to an internal
  (with-immediate-continuation-mark [_arg (#%immediate _key _def_val)] _body)
form, which avoids a closure allocation and more.

This optimization is useful for contracts, which use
`call-with-immediate-continuation-mark` to avoid redundant
contract checks.
2015-08-07 05:30:25 -06:00
Matthew Flatt
c308915047 minor streamlining of foreign-call path
JIT-inline `cpointer-tag` and `set-cpointer-tag!`, plus minor
shortcuts and GC hints in Racket->C conversion.
2015-08-06 14:44:30 -06:00
Matthew Flatt
d34416ea02 define-inline: fix call with multiple keyword arguments 2015-08-06 14:44:30 -06:00
Vincent St-Amour
7b70a42361 Move unstable/syntax to unstable-lib. 2015-08-05 13:11:55 -05:00
Vincent St-Amour
5ee37920f5 Move phase-of-enclosing-module to a private syntax/parse module. 2015-08-05 13:11:55 -05:00
Vincent St-Amour
d836a427cc Remove unused dependency on unstable/syntax.
This revealed a missing dependency to racket/syntax elsewhere.
2015-08-05 13:11:55 -05:00
Vincent St-Amour
fd82eed31c Add tests for syntax/transformer. 2015-08-05 13:11:55 -05:00
Vincent St-Amour
b4b0837a77 Move syntax-source-* tests from unstable-test. 2015-08-05 13:11:55 -05:00
Vincent St-Amour
6e111fe2e4 Move syntax-source-* docs from unstable-doc to syntax docs. 2015-08-05 13:11:55 -05:00
Vincent St-Amour
2c21d61870 Move syntax-source-* to syntax/location. 2015-08-05 13:11:55 -05:00
Vincent St-Amour
a1c5285cc2 Move docs for syntax/transformer from unstable-doc. 2015-08-05 13:11:54 -05:00
Vincent St-Amour
7e93b7d426 Move make-variable-like-transformer to syntax/transformer. 2015-08-05 13:11:54 -05:00
Vincent St-Amour
442db8d523 Move syntax/macro-testing tests from unstable-test. 2015-08-05 13:11:54 -05:00
Vincent St-Amour
d4f25d8c72 Move syntax/macro-testing docs from unstable-doc. 2015-08-05 13:11:54 -05:00
Vincent St-Amour
21c44635f6 Move unstable/macro-testing to syntax/macro-testing. 2015-08-05 13:11:54 -05:00
Vincent St-Amour
c541f6b4ba Move syntax/contract docs from unstable-doc. 2015-08-05 13:11:54 -05:00
Vincent St-Amour
102fbff5d2 Rename unstable/wrapc to syntax/contract. 2015-08-05 13:11:54 -05:00
Daniel Feltey
265b777b93 Fix unit contracts for new expander 2015-08-03 16:08:18 -06:00
Matthew Flatt
bf76ced8ba work around EPERM error from access()
On OS X, it seems that access() can sometimes fail with EPERM
when checking for execute permission on a file without it.
I've previously seen this result when running as the superuser,
but that's apparently not the only possibility; a long path
may also be relevant.
2015-08-01 21:59:19 -06:00
Stephen Chang
bfef7f54a3 pattern-expander docs: add note about names 2015-07-31 17:08:26 -04:00
Matthew Flatt
086d02003a fix linking of compiled reference to a top-level variable
Re-linking in a new namespace doesn't need the namespace of
compilation.

A "namespac.rktl" test exposed this problem, where the "transfer a
definition of a macro-introduced variable" test could fail if a GC
occurred between compilation in one namespace and evaluation in
another.
2015-07-31 11:17:25 -06:00
Matthew Flatt
1f2e0dacb3 minor adjustments
SGC header correction plus extra assert.
2015-07-31 07:32:34 -06:00
Gustavo Massaccesi
a1f04604df JIT: Inline keyword? 2015-07-30 21:27:26 -03:00
Vincent St-Amour
cdea0da566 Fix package name. 2015-07-30 16:26:56 -05:00
Benjamin Greenman
7259a2c76c typo: add supertype to provided zo struct
Changed doc to match `zo-structs.rkt`
2015-07-30 14:58:57 -06:00
Matthew Flatt
545c14a9cf adjust some versions in history notes
Promote v6.2.0.x changes to v6.3, since they will not be in v6.2.1.
2015-07-30 14:49:31 -06:00
Matthew Flatt
7b4d25c657 add missing history note on stream* 2015-07-30 14:45:29 -06:00
Matthew Flatt
51747e86c5 fix raco pkg conflict checking
When a module is currently installed as bytecode, but without
corresponding source and without a "info.rkt" specification that
bytecode should be preserved without source, then `raco pkg` should
not count that module bytecode as a conflict (since `raco setup`
will remove it).
2015-07-30 14:12:05 -06:00
Matthew Flatt
3dc1dc80e3 add setup/collection-search 2015-07-30 14:12:04 -06:00
Matthew Flatt
9a7d046062 raco setup: clean collections before compiling any
In case a collection "a" is composed from two places, and in
case the first place has a bytecode file for "x.rkt" while
only the second place has the source of "x.rkt" (probably it
was recently moved), then `raco setup` should delete the
sourceless bytecode so that any dependency on "x.rkt" will
reference the right version.
2015-07-30 14:12:04 -06:00
Jay McCarthy
2602ff530d Adding no major collection guarantee to collect-garbage minor collections 2015-07-30 11:42:13 -06:00
Jay McCarthy
2f22f86c0a Adding minor collections to collect-garbage 2015-07-30 11:42:13 -06:00
Matthew Flatt
26158a51d2 raise-syntax-error: fix srcloc reporting on #f as 3rd arg 2015-07-29 11:54:18 -06:00
Matthew Flatt
99f29ce8ee repair for nexted splicing forms that define the same name
Nested splicing forms would lead to an "ambigious binding" error
when the nested forms bind the same name, such as in

 (splicing-let ([a 1])
   (splicing-let ([a 2])
     (define x a)))

The problem is that splicing is implemented by adding a scope to
everything in the form's body, but removing it back off the
identifiers of a definition (so the `x` above ends up with no new
scopes). Meanwhile, a splicing form expands to a set of definitions,
where the locally bound identifier keeps the extra scope (unlike
definitions from the body). A local identifier for a nested splicing
form would then keep the inner scope but lose the outer scope, while
a local identifier from the outer splicing form would keep the outer
scope but no have the inner one --- leading to ambiguity.

The solution in this commit is to annotate a local identifier for a
splicing form with a property that says "intended to be local", so the
nested definition will keep the scope for the outer splicing form as
well as the inner one. It's not clear that this is the right approach,
but it's the best idea I have for now.
2015-07-29 06:11:13 -06:00
Benjamin Greenman
0c3b524de8 typo: prefix struct field name
Change `inspector-desc` to `src-inspector-desc`
2015-07-28 15:45:01 -06:00
Alex Knauth
3a3d17dbb5 Fix check-syntax arrows within units 2015-07-28 15:45:01 -06:00
Vincent St-Amour
496cd97351 Rename open-place to place/context. 2015-07-28 16:14:29 -05:00
Matthew Flatt
e3ed57633e syntax/module-reader: add a #:module-wrapper option
A `#:module-wrapper` option is useful for adding a scope to an
entire `module` form.
2015-07-28 14:55:02 -06:00