Commit Graph

37761 Commits

Author SHA1 Message Date
Matthew Flatt
13bd013528 fix JIT-inlined set-cpointer-tag! for non-x86 2015-08-11 16:01:53 -06:00
Matthew Flatt
820ab7126c fix enum mismatch in ARM JIT
Also, recognize `__ARM_ARCH_6ZK__`.
2015-08-11 16:01:53 -06:00
Daniel Feltey
b16f0b24b7 Improvements to unit/c contracts in preparation for unit support in typed/racket
Changes:

 - Allow unit contracts to import and export the same signature.
 - Add "invoke" contracts that will wrap the result of invoking a unit contract,
   no wrapping occurs when a body contract is not specified
 - Improve error messages
 - Support for init-depend clauses in unit contracts.
 - Fix documentation to refelct the above
 - Overhaul of unit related tests

Handling init-depend clauses in unit contracts is a rather large and somewhat
non-backwards-compatible change to unit contracts. Unit contracts must now
specify at least as many initialization dependencies as the unit value being
contracted, but may include more. These new dependencies are now actually
specified in the unit wrapper so that they will be checked by compound-unit
expressions.

This commit also adds more information to the first-order-check
error messages. If a unit imports tagged signatures, previously the errror
message did not specify which tag was missing from the unit contract. Now
the tag is printed along with the signature name.

Documentation has been edited to reflect the changes to unit/c contracts
made by this commit.

Additionally this commit overhauls all tests for units and unit contracts.
Test cases now actually check that expected error messages are triggered when
checking contract, syntax, and runtime errors. Test forms now expand into uses
of rackunit's check-exn form so only test failures are reported and all tests in
a file are run on every run of the test file.
2015-08-11 16:30:39 -05:00
Asumu Takikawa
1d99ced2ea Add caveat for free-id-tables & changing bindings 2015-08-11 12:11:53 -04:00
边城
6fe8f635e4 update packges sources
Add Racket package manager to package sources
2015-08-11 08:06:34 -06:00
Georges Dupéron
666da0b215 In the docs for normal-case-path, replaced “letter” with “character”, to avoid possible confusion with drive letters. 2015-08-11 07:59:23 -06:00
Georges Dupéron
22bf10e564 Fixed typo in the docs for normal-case-path. 2015-08-11 07:59:23 -06:00
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
Matthew Flatt
d652ea0d52 update demodularizer for recent bytecode changes 2015-08-10 16:45:47 -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
Blake Johnson
08a40b5998 repair reference to "dummy" top level
The demodularizer used to include multiple dummy toplevels from every
module that needed one, which didn't work with the unresolver. That
change makes it so all references to dummy toplevels point to the same
one.
2015-08-10 16:37:09 -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
92e9ac99f5 update for with-immediate-continuation-mark and scope IDs 2015-08-07 15:22:10 -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
2a354af4e3 adjust version in history note
Promote v6.2.0.x change to v6.3, since it will not be in v6.2.1.
2015-07-30 14:52:23 -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