Commit Graph

38699 Commits

Author SHA1 Message Date
Matthew Flatt
a703b608a4 add --enable-jitframe for configure on x86_64
Using a frame pointer for the ABI of internal helper functions
should make the stack friendlier to tools like `perf`. There
may be a small performance cost, though.
2018-06-11 08:35:42 -06:00
Matthew Flatt
2c58937008 expander: fix comment 2018-06-08 09:24:13 +08:00
Vincent St-Amour
a2ab778ddb Post-release version for the v7.0 release 2018-06-07 09:10:05 -05:00
Robby Findler
aabd0e4603 fix random contract generation for </c and >/c when they get +inf.0 or -inf.0 2018-06-07 08:49:02 -05:00
Sam Tobin-Hochstadt
c6dd371ed6 Make stx.rkt cross-phase persistent.
This eliminates more than 70 linklet instance creations.
2018-06-07 09:38:38 -04:00
Matthew Butterick
ce97087507
missing paren 2018-06-06 14:44:40 -07:00
Sam Tobin-Hochstadt
2255d5be78 This require only needs racket/base. 2018-06-06 15:29:58 -04:00
nocheroot
fdc033474a Fix typos in test.rkt 2018-06-06 08:46:28 -03:00
Alexander McLin
5d1371cb73 Added clarifying notes emphasizing that dynamic-require is a procedure so
giving plain s-exps like you would for `require` is unlikely to work as expected.
Need use something that evaluates to the appropriate s-exp you want.

Added more examples of different `dynamic-require` uses.
2018-06-05 16:40:01 -04:00
Matthew Flatt
4e10ed0518 expander: fix another local-expand problem with 'module-begin
Alexis's repair, and as she notes, forcing a `post-expansion` context
value in the core `#%module-begin` expander may allow a simplification
in "definition-context.rkt". But it's not immediately obvious, so save
that potential improvement for later.

Relevant to #2118
2018-06-03 17:10:31 +08:00
Matthew Flatt
9ca8d34e7c expander: clean up post-expansion scope representation
Instead of three different fields in the context to keep in sync,
encode the possibilities witin a single field.
2018-06-03 16:46:46 +08:00
Matthew Flatt
a1b5bab31b expander: repair local-expand with definition context
When `local-expand` receives one or more internal definition contexts,
it would forget about any current post-expansion scopes. That's
particularly a problem in a 'module-begin expansion context, where the
post-expansion scope ensures that any bindings are suitably
phase-specific.

Closes #2115
2018-06-03 10:02:01 +08:00
Georges Dupéron
3fa6fef654 Use @racketmodname in the documentation of racket/unsafe/undefined (#2117) 2018-06-02 21:26:59 -04:00
Gustavo Massaccesi
b9392b2a51 use unsafe-undefined for missing arguments in string-join
This is similar to the recent change of functions with optional
values. Using unsafe-undefined instead of a gensym makes it easier
to avoid the check of the missing argument.
2018-06-01 16:33:16 -03:00
Gustavo Massaccesi
fd149ca1c0 fix cache of regexp in string-{split,trim,normalize-spaces}
When the separator is a string, these function construct a regexp
that is cached to make repeated calls faster. But when the string
is mutated it is necessary to recalculate the regexp.
2018-06-01 16:33:07 -03:00
Matthew Flatt
0ab9de2fb1 syntax-case docs: clarify grammar of "rest" patterns
The grammar constraint was specified in prose, but but in a way that
clearly covered both cases, and adjusting the grammar seems clearer.
2018-06-01 17:47:02 +08:00
Matthew Flatt
8d56c29317 expander: fix incorrect addition of shifts
Commit 32b256886e adds shifts in one place where it shoouldn't;
the "determinsitic-zo" test exposed the problem.

Also, avoid adding shifts that will have no effect, which avoids
accumulating useless shifts in some top-level contexts.
2018-06-01 07:41:26 +08:00
Matthew Flatt
2cfd65e972 defend against bad bytecode
Closes #2107
2018-06-01 07:41:25 +08:00
Philip McGrath
ba874ebe14 doc fix for chaperone-struct-type
The `guard-proc` argument must accept one more argument than the constructor for the chaperoned struct type, not the same number of arguments.
2018-05-31 10:38:04 -04:00
Ben Greenman
0f1ad7d232 doc: remove debug-scopes dependency 2018-05-31 09:36:51 -04:00
Matthew Flatt
937c396e1b expander: don't flip use-site scope in local-expand
Various parts of the expander, including `local-expand`, always
flipped the use-site scope when flipping an introduction scope. Onlt
`syntax-local-introduce` should flip both of them, though.

Closes #2112
2018-05-31 18:06:59 +08:00
Matthew Flatt
32b256886e expander: fix problem with module->namespace and shifts
When expanding in a namespace for a module unmarshaled from ".zo"
form, a scope corresponding to the module's "inside edge" is added to
every expansion. Before this repair, the scope was detached from
module path index shifts that might apply to the bindings (including
references to bulk bindings). Repair the problem by adding suitable
shifts when adding the scope.

Thanks to William Hatch for the bug report.
2018-05-31 18:06:58 +08:00
William J. Bowman
53f7a95dc2 Extended documentation for racket/trace for syntax transformers (#2076)
* Extended documentation for racket/trace for syntax transformers

* Assorted fixes due to feedback
2018-05-30 23:12:41 -04:00
Matthew Flatt
865efb7dda add and use racket/repl
As suggested by Sam: Using `racket/repl` to start a read-eval-print
loop can mean that less code is loaded if a startup language other
than `racket/base` is selected.

Closes #2064
2018-05-30 15:55:54 +08:00
Matthew Flatt
388345f35f fix eval variant used for command-line arguments
Closes #2111
2018-05-30 10:13:50 +08:00
Matthew Flatt
7bbbb8f063 namespace-syntax-introduce: fix bad phase shift
A `namespace-syntax-introduce` at a phase other than 0 could shift the
phase of introduced context by double the correct shift.

Relevant to #2099
2018-05-26 21:31:41 -06:00
Matthew Flatt
b1bf333523 expander: avoid excessive binding information in error messages 2018-05-26 20:29:07 -06:00
Ben Greenman
10c05aa3a1 typo: make-file-or-directory-link error message
Change error message to blame the symlink, not its destination
2018-05-26 17:45:21 -04:00
Matthew Flatt
ec2387fa16 syntax-debug-info: restore all-bindings support
Relevant to #2099
2018-05-26 10:32:56 -06:00
Alexis King
87a5ee4cc1 Make syntax-local-introduce work in syntax/parse pattern expanders 2018-05-25 18:25:13 -05:00
Alexis King
33546008b3 Make syntax-local-introduce work in require/provide syntax 2018-05-25 18:25:13 -05:00
Alexis King
2bccbf76ad Make syntax-local-introduce work in match expanders 2018-05-25 18:25:13 -05:00
Alexis King
d944b8589e Add syntax/apply-transformer, which provides local-apply-transformer 2018-05-25 18:25:13 -05:00
Ben Greenman
568f086162 object/c-equivalent? refactoring
- add comment saying `check-one-object/equivalent` only compares common
  members
- put the similar parts of `check-one-object` and
  `check-one-object/equivalent` in a helper function
- in `object/c-equivalent?`, check that names match before comparing the
  common contracts (because the names should be fast to check-if-incorrect)
2018-05-25 14:07:42 -05:00
Ben Greenman
cc44afdf77 bump version for contract-equivalent 2018-05-25 12:10:49 -04:00
Robby Findler
d5d296c350 add missing arguments so external combinators can supply #:equivalent 2018-05-25 08:56:55 -05:00
Matthew Flatt
02ea4e47f8 repair test
Remove logging output in test.
2018-05-24 22:06:38 -06:00
Matthew Flatt
851ea57ef9 read/recursive: avoid placeholder wrapper
Although the documentation claimed that `read/recursive` produces
a plaeholder, that seems to be a leftover from a much older
reader (before `make-reader-graph`). Fix the new `read/recursive`
to be like the old one, and update the documentation.

Thanks to Alex Knauth for tracking down the unnecessary change
in reader behavior.

Related to #2099
2018-05-24 15:44:21 -06:00
Matthew Flatt
b58938dc89 map: fix contract check on given function with required keyword arguments
Compared to v6.12, `map` & co. already provide better checking in
reporting an error when a keyword-requiring function is provided
with empty lists, but repair the error message to talk about
required keywords instead of just by-position arity.

Thanks to Philip McGrath for reporting the problem.

Related to #2099
2018-05-24 15:44:04 -06:00
Matthew Flatt
643d0d2cc4 Windows: restore console handling of Ctl-Z as EOF 2018-05-24 09:35:28 -06:00
Matthew Flatt
b00779863f fix Windows OpenSSL native library build 2018-05-23 20:46:39 -06:00
Matthew Flatt
1faa0433fa expander: fix local-expand and dropped macro definition
If `local-expand` with a 'module-begin context introduces a macro
definition, but the definition is dropped while a non-macro definition
is later introduced, then make sure references go to the non-macro
definition.

This change also addresses a related scenario, where a
`local-expand`-discovered macro definition is not dropped, but it is
given an extra scope --- which amounts to the same thing from the
expander's perspective.
2018-05-23 15:19:35 -06:00
Matthew Flatt
61a50fbf93 fix test case
The test committed previously wasn't the intended test.
2018-05-23 14:54:35 -06:00
Matthew Flatt
37dde6dc1e expander: fix related to (local-expand .... 'module-begin ....)
When a module body is expanded with `local-expand`, then submodules
can remain declared even if the submodule is discarded in the final
expansion. Since that's the way it has always been, leave it that way.
But also guard against a way of generating an import cycle via those
leftover declarations.
2018-05-23 12:30:52 -06:00
Matthew Flatt
ab7dffa420 expander: repair for module with (#%declare #:empty-namespace)
Repair a corner of `namespace-attach-module` on modules that include
`(#%declare #:empty-namespace)`.
2018-05-22 14:19:16 -06:00
Robby Findler
1ee5786e2d fix substruct contract blame setup
closes #2093
2018-05-22 08:43:10 -05:00
Matthew Flatt
caade2f830 fix docs for identifier-prune-lexical-context
The `identifier-prune-lexical-context` operation doesn't really
work out with scope sets, and it was effectively disabled when
we switched the old expander to scope sets.
2018-05-21 15:10:16 -06:00
Matthew Flatt
fadac92003 dump-memory-stats: repair for non-backtrace build
Fix `(dump-memory-stats 'count ....)` to avoid crashing immediately.
2018-05-21 06:33:48 -06:00
nocheroot
c96cdd37db Fix typos in make.scrbl 2018-05-20 10:09:30 -06:00
Matthew Flatt
c990bbf1f7 Windows: fix Console output for non-UTF-8 bytes
A repair for the preceding commit: Writing non-UTF-8 output to a
console will write something unspecified, but it shouldn't crash
or freeze Racket.
2018-05-20 09:47:14 -06:00