Commit Graph

38639 Commits

Author SHA1 Message Date
migeed-z
8d082a47c6 Typo; hypen -> hyphen 2016-05-20 14:21:31 -05:00
Leif Andersen
fe03198211 Updated docs to add examples for module->* functions. 2016-05-19 19:01:04 -04:00
Ben Greenman
afec68f639 typo: can #f -> can be #f 2016-05-19 17:43:48 -04:00
Leif Andersen
8111e4ec99 Updated docs to cause resolve-module-path-index and module-path-index-resolve to link to each other. 2016-05-19 12:23:50 -04:00
Robby Findler
d0d85b2f31 fix source locations for listof applications
and any other contract that is defined via
define/subexpression-pos-prop
2016-05-18 19:32:41 -05:00
Leif Andersen
eb17a041ab Updated ZO documentation for global-bucket. 2016-05-18 16:32:38 -04:00
Matthew Flatt
c0fa2eecd5 add module-compiled-indirect-exports and co.
That information is needed sometimes to compile expanded syntax to
bytecode form.
2016-05-18 13:13:15 -06:00
Matthew Flatt
f1bba3c2d0 another fix to serializer for cycles containing immutable
When walking up the cycle chain to find the mutable item,
intermediate items need to be marked as potentially
shared, and a mutable item should not be added more
than once.
2016-05-16 19:12:10 -06:00
Matthew Flatt
6ba3461738 fix serializer for cycles containing immutable structs 2016-05-16 18:06:18 -06:00
Ryan Culpepper
add08c902d syntax/parse: record nullability in ehpat
Non-nullable ellipsis-head patterns can omit the null match check.
2016-05-16 17:47:45 -04:00
Ryan Culpepper
3da626d483 syntax/parse: add nullability analysis and check ellipsis-head patterns
Currently logs a warning and continues, but eventually this should be a
compile-time error.
2016-05-16 17:13:57 -04:00
Ryan Culpepper
fb5c1310d8 syntax/parse: add dynamic check for null ellipsis-head match
Otherwise, nullable ellipsis-head patterns could cause infinite loop.
2016-05-16 17:13:57 -04:00
Ryan Culpepper
669460da34 syntax/parse: parse side clauses directly as action patterns
Eliminates the clause:* structures.
2016-05-16 17:13:57 -04:00
Matthew Flatt
f327a44080 fix begin-for-syntax under splicing-let
This fixes an immediate problem, but the macro expander should have
complained about an unbound `maybe` at phase 2. (A new implementation
of the macro expander detected the unbound `maybe`.)
2016-05-16 13:07:44 -06:00
Ryan Culpepper
c9074c26dc syntax/parse: fix ellipsis "optimization" for null tail pattern
The transformation also has the effect of making ellipsis patterns
with nullable heads, such as ((~seq x:sc ...) ...), terminate
rather than looping forever.

To do: add null eh match check and error.
2016-05-16 10:35:20 -04:00
Matthew Flatt
2109b26c15 repair for hash-table adjustment
Fix 49fd1e41da for some compilers.
2016-05-15 21:06:23 -06:00
Matthew Flatt
a134d0c0a3 racket/serialize: support keywords and regexp values 2016-05-15 20:03:15 -06:00
Matthew Flatt
b243ce894a GC: give main allocation pages back to the GC less eagerly 2016-05-15 17:44:58 -06:00
Matthew Flatt
7fbe6a4097 GC: avoid trying to prime a full page cache 2016-05-15 17:44:58 -06:00
Matthew Flatt
49fd1e41da improve immutable hash table on sequential inserts
Inserting keys with sequential hash codes --- as in 0, 1, 2, 3, etc.
--- performed badly compared to random keys, because it triggered the
worst case of allocation: allocate a node of size 1, then 2, then 3,
then 32, then 32 plus a subtree of size 1, then 32 plus a subtree of
size 2, and so on. By rearranging the bits in a hash code, arrange
for nodes that are more like 4-wide instead of 32-wide. In other
words, the tree become wider with thinner branches, instead of growning
just as a thick branch to the left.

Of course, there's now a different sequence of inserts that used
to perform well and now perform badly (the inverse of the new
reordering), but that case seems much more likely than the cae
of sequential inserts.
2016-05-15 17:44:58 -06:00
Ryan Culpepper
80364d85dd syntax/parse: add progress-ordering to ~and
In (~and p1 p2), a failure in p2 now always dominates a failure in p1.
Consequently, if a pattern succeeds, its failures don't matter.

Add {pat,hpat,action}:ord wrappers, ord prframes. Apply ordering to
main pattern and side clauses. Add better progress analysis to
eliminate order wrapping.
2016-05-13 14:40:16 -04:00
Ryan Culpepper
158f087d8e syntax/parse: remove attrs from pattern structs, desugar hpat:optional 2016-05-13 14:40:16 -04:00
Ryan Culpepper
91a03eecb3 syntax/parse: add separate pattern for simple vars 2016-05-13 14:40:16 -04:00
Matthew Flatt
678369f187 avoid generating shared call code for too many arguments
Although the JIT would not try to use a block of shared code for more
than a certain number of arguments, it could in rare cases (related to
self tail calls, for example) generate the code and attempt to install
it in the array of shared-code pointers.
2016-05-13 11:56:48 -06:00
Matthew Flatt
b09b5c6184 fix doc link 2016-05-13 11:56:48 -06:00
Ryan Culpepper
731c7dfe12 fixed doc typo 2016-05-11 16:14:53 -04:00
Matthew Flatt
1149d6cdcd ffi/unsafe: add checking of _array values
When an array value is provided, make sure that it's an array
with at least the expected length (or longer) and same element
layout. That's weaker than checking that the array elements have
the right type, because an `eq?` check at the ctype layer seems
too strong, and the ctype API doesn't provide enough information
for a more flexible equality.
2016-05-10 10:56:32 -06:00
Matthew Flatt
d92be80f77 unbreak line-based flushing
Repairs a problem introduced by 8e7792d85a.
2016-05-09 12:49:06 -06:00
Matthew Flatt
8e7792d85a reduce overhead for simple port char/byte reads/writes
Cut the overhead by 30% or so by making the fast path need less
cooperation with the GC.
2016-05-09 09:11:47 -06:00
Matthew Flatt
6c9a4cb470 avoid a compiler warning 2016-05-05 15:19:47 -06:00
Matthew Flatt
9046d30bcf fix grammar in docs for #%provide 2016-05-05 15:19:47 -06:00
John Clements
5961313e50 Merge pull request #1323 from jbclements/make-match-exn-transparent
make match exception transparent
2016-05-04 20:00:29 -07:00
John Clements
7c26614343 make match exception transparent
This push makes the exn:misc:match exception transparent. This
matches other racket-raised user exceptions.

The motivation for this change was breakage in the handin-server;
specifically, the discussion in

https://groups.google.com/forum/#!topic/racket-users/nEos3-osoWE

...in which the handin-server was not behaving the same on exn:misc:match
because it was not transparent. This caused the handin server to
refuse to rewrite these exceptions, resulting in less helpful
messages for users.
2016-05-04 14:19:04 -07:00
Ryan Culpepper
9d3c193bcf syntax/parse: fix ~datum pattern with compound datum 2016-05-03 05:07:29 -04:00
Ryan Culpepper
430e6e9567 syntax/parse: different fix for deterministic compilation
The previous fix (1acaf011) caused a performance regression
(compilation time?), reported by stchang. Reverting to quote.

Apparently, the problem with gensym and deterministic compilation
isn't the uninterned-ness; it's the global counter used for the
name. So use a compilation-local counter instead.
2016-05-03 04:38:26 -04:00
Ryan Culpepper
c8f3536694 Revert "syntax/parse: fix for deterministic compilation"
This reverts commit 1acaf0111d.
2016-05-03 03:11:08 -04:00
Ryan Culpepper
f7fff58de6 syntax/parse: test different post groups are incomparable 2016-05-03 03:11:08 -04:00
Asumu Takikawa
25c9e9347a Fix nested quasisyntax infinite looping
Thanks to Michael Ballantyne for the bug report
2016-05-02 15:15:47 -04:00
Pedro Caldeira
551ef55535 Add examples for _enum and _bitmask usage. (Close #1317) 2016-05-02 11:21:22 -05:00
Matthias Felleisen
fdcbe249f9 re-organized in preparation for additions 2016-05-01 09:47:39 -04:00
Matthew Flatt
76418e9be8 path->module-path: make sure result is always a module path
Avoid creating a result that is intended as a module path but
has elements that are not syntactically allowed, such as a "."
in a collection-path element.
2016-05-01 07:00:36 -06:00
Robby Findler
244d9957f1 fix syntax error in flat-contract-with-reason docs 2016-05-01 06:27:44 -05:00
Robby Findler
999f026f55 add docs for flat-contract-with-explanation, clarify make-flat-contract docs
closes #1313, related to #1314
2016-04-30 21:06:41 -05:00
Robby Findler
9acd36724d clarify test argument to make-contract, make-chaperone-contract, and make-flat-contract
closes #1313
2016-04-30 21:06:41 -05:00
Robby Findler
bb03281308 add flat-contract-with-explanation
closes #1314
2016-04-30 21:04:08 -05:00
Vincent St-Amour
caebbc65b6 Add example to the free-vars docs.
Thanks to Christophe Scholliers.
2016-04-27 11:02:59 -05:00
Robby Findler
45acc19f44 improve source location in internal-definition errors for syntax-case,
syntax-case*, and datum-case
2016-04-26 16:09:30 -05:00
Matthew Flatt
fb88abd992 fix accidentally committed debugging mode 2016-04-26 14:32:08 -06:00
Matthew Flatt
528b14025f fix syntax-local-lift-module-end-declaration in higher phases
A phase shift was mising on `begin-for-syntax`es introduced by
`syntax-local-lift-module-end-declaration`, which is in turn
used to implement` module+`, so `module+` didn't work under
two or more `begin-for-syntaxes`.

Closes #1312
2016-04-26 10:45:56 -06:00
Matthew Flatt
99b3ed55be make syntax objects work as preserved syntax properties
Syntax objects generally make sense as properties in other syntax
objects, but they require special care when marshaling to bytecode
(as syntax objects do in general). To make that special handling
possible and reliable, constrain the shape of allowed values.
2016-04-26 10:18:46 -06:00