Commit Graph

38642 Commits

Author SHA1 Message Date
Georges Dupéron
328a6530d3 doc: template metafunctions now work in "syntax" expressions
As noted by @lexi-lambda: https://github.com/racket/racket/issues/2080#issuecomment-389545625
2018-05-17 02:02:47 +02:00
Alexis King
774b02a0b8 syntax/parse: Add #:track-literals and syntax-parse-track-literals 2018-05-16 14:07:58 -05:00
Georges Dupéron
1532ded5d1 Fix documentation of define-primitive-splicing-syntax-class to match the implementation 2018-05-16 12:15:25 +02:00
Robby Findler
be7fe82ea8 adjust implementation of recursive contract to cope with
the fact that blame object equality now works right and
adding context to a blame object doesn't produce an equal?
blame object

also it appears that blame-add-unknown-context is not actually
being called so lets just get rid of that functionality
(but preserve reasonable backwards compatibility in
case someone is actually calling that function or
supplying #f to blame-add-context)

And the interning of blame objects was not intended to be
in 0b3f4b627e, so get rid of it here

closes racket/typed-racket#722
2018-05-15 21:06:53 -05:00
Matthew Flatt
4b2a202640 use VS 2013 on AppVeyor 2018-05-15 11:07:06 -06:00
NoCheroot
b0c3362fe0 Fix typo in com-intf.scrbl 2018-05-14 21:55:55 -03:00
Paulo Matos
ede4279b14 Fix dynamic-place argument name in description
The description refers to `start-proc`, but argument is `start-name`.
2018-05-14 20:46:37 -03:00
Alexis King
9b36052ce3 reference: Fix error message in quasiquote examples 2018-05-14 13:48:07 -05:00
Jay McCarthy
f3644074ca Increase timeout 2018-05-14 10:17:47 -04:00
Jay McCarthy
06c7318eaf reformat and fix up reconnecting 2018-05-14 10:17:47 -04:00
Robby Findler
0b3f4b627e streamline the representation of blame objects
and improve the context tracking support
to allow a choice of how much context to save
2018-05-12 17:28:55 -05:00
Jasper Pilgrim
cd0350c883 Fix typo (pre-heating -> preheating) 2018-05-12 09:57:49 -06:00
Matthew Flatt
44b8e56ed0 bytecode optimizer: allow inline of unsafe-undefined
Restores some function inlining that was lost by the change to
optional-argument expansion.
2018-05-12 07:49:12 -06:00
Alexis King
bbbdee2853 Adjust local-require to be more deliberate about syntax-local-introduce
This ensures macro-introduction scopes don’t unintentionally end up on
lifted pieces of syntax, which causes problems for Check Syntax, since
it affects the syntax-original?-ness of the require spec.
2018-05-11 16:52:17 -05:00
Ben Greenman
a539825dc9 fix: allow missing fields in object/c-common-fields-stronger?
Change `object/c-common-fields-stronger?` to only compare the fields
common to both objects.
2018-05-11 11:50:14 -04:00
Robby Findler
8ec3edaa95 add contract-equivalent?
and use it to get rid of the change in 4de050552,
avoiding the exponential blowup in a way that
doesn't compromise on contract-stronger?'s result
2018-05-09 21:32:29 -05:00
Matthew Flatt
c927a004d2 expander: fix problems with syntax-local-make-definition-context
Allow `syntax-local-make-definition-context` in places where the
created scope is not accumulated for stripping from `quote-syntax`.
Refine the docs to clarify those situtations.

A test for the repair exposed a problem with use-site scopes
and `quote-syntax`, so fix that, too.

Closes #2062
2018-05-06 20:23:39 -06:00
Matthew Flatt
f9821f9f15 variable-reference->namespace: repair namespace availability
Internally, the namespace must be set to the returned one while making
it available. Otherwise, the current namespace can get mangled.

Closes #2067
2018-05-06 20:23:39 -06:00
Robby Findler
76c404dffc fix contract-stronger bug 2018-05-06 21:21:44 -05:00
Matthew Flatt
f231cb2003 expander: fix problem related to (local-expand 'module-begin ...)
When `local-expand` is used for a 'module-begin context, use a fresh
binding -> definition-unreadable-symbol table for the nested
expansion. That way, the table used for the main expansion is
unchanged, and re-expanding or evaluating the expanded module will
arrive at the same unreadable symbols as the initial expansion.

The report and example are from Alexis.
2018-05-06 07:59:54 -06:00
Matthew Flatt
662a9022c0 refine implementation of keyword and optional arguments
The old implementation turns a single optional argument into two
arguments: the optional value and a boolean to indicate whether the
optional value is supplied.

The new expansion uses `unsafe-undefined` in place of not-supplied
arguments, in the general case. If the default-value expression is
simple enough, however, it is copied to call sites that would
otherwise supply `unsafe-undefined`. In the common case where the
default value is `#f`, for example, no run-time test is needed in the
core implementation function to check whether the default is supplied,
because a `#f` will be filled in for callers.

The performance improvement is tiny to non-existent for realistic
programs, but the simpler and reduced generated code may help in the
long run.
2018-05-06 07:59:54 -06:00
Robby Findler
4de0505525 block possible exponential explosion in stronger check 2018-05-06 08:58:21 -05:00
Asumu Takikawa
5eceb3d051 Guard FFI union functions with type checks (#1375)
* Guard FFI union functions with type checks

Also add unit tests for unions
2018-05-06 00:10:14 -04:00
Robby Findler
69eb5ee055 change the representation of blame objects
so that blame-swap (when no context is added)
is more efficient
2018-05-04 14:40:31 -05:00
Jasper Pilgrim
8d52373f5a Fix typo 2018-05-04 10:34:11 -05:00
Robby Findler
143d15eaa5 add the ability to not track context information in contract violation error messages 2018-05-04 06:38:59 -05:00
Jasper Pilgrim
ecae427777 Fix typo (#2063) 2018-05-03 10:08:47 -04:00
Robby Findler
3f4cbcbfd8 memoize the creation of the name in the blame object 2018-05-02 19:01:20 -05:00
Tucker DiNapoli
822938d9ae Handle symbol changes between openssl-1.0 and 1.1
In openssl-1.1 (specifically libcrypto) the functions sk_num, sk_value and sk_pop_free are prefixed by 'OPENSSL_'.
Now both symbol names looked for to support both version 1.0 and 1.1.
2018-05-02 06:26:08 -04:00
Sam Tobin-Hochstadt
73c3341001 Implement read-eval-print-loop using #%kernel.
Makes the repl faster to load when using a very small language
such as `racket/kernel/init`
2018-05-01 13:35:05 -04:00
Sam Tobin-Hochstadt
ba8c79f502 Avoid some dependencies for racket/kernel/init.
This is useful when loading without bytecode. Motivated by use in
Pycket, which does not load bytecode.
2018-05-01 13:35:05 -04:00
Sam Tobin-Hochstadt
409ad2d73b Avoid some uninitialized variables. 2018-05-01 13:35:05 -04:00
Sam Tobin-Hochstadt
3fc964faaf Fix name of the racket/private/top-int.rkt module. 2018-05-01 13:35:05 -04:00
Matthew Flatt
6f31650539 repair for re-expansion of an implicit-form expansion
The repair in 385f9588f8 propagates the
must-be-bound callback too far. It shouldn't be propagated anymore after
a non-rename transformer is applied.

Closes #2048
2018-04-30 21:05:09 -06:00
Matthew Flatt
53c1b5b1db fix generated makefile dependencies to work when a file is deleted 2018-04-30 19:57:22 -06:00
Robby Findler
ff588f93eb add contract-pos/neg-doubling and use it in various places 2018-04-29 21:50:32 -05:00
Alexis King
96b69d0366 Add interned scopes and make-interned-syntax-introducer 2018-04-27 20:12:11 -05:00
Robby Findler
8dbedc6a26 the commit 2a1c8a78 contained stuff that was meant to be in bff0c41
so when it was reverted, we have to bring back that stuff
2018-04-27 18:59:10 -05:00
Robby Findler
ef8101bde3 Revert "change the strategy for recursive-contract's knot tying"
This reverts commit 2a1c8a78a5.

something goes wrong with large recursive nests with this commit
2018-04-27 15:04:03 -05:00
Matthew Flatt
53ffd28e0f expander: atomic update of a module-path-index table
A module path index used to expand a module must be interned, and the
intern table is an `equal?`-based weak hash table, which means there's
an internal lock on the table that can be damaged if the current
thread is terminated while using the table.

I don't see an easy way to fall back to `eq?`-based tables, so I'm
resorting to an atomic region (which I had managed to avoid until
now).
2018-04-27 12:59:58 -06:00
Matthew Flatt
cb921cd1d9 configure: fix --disable-cify 2018-04-26 13:48:09 -06:00
Robby Findler
bff0c4113d lift out some work from object contracts from the post-value application
of the projection to the pre-value (after getting the blame object)
2018-04-26 14:30:58 -05:00
Robby Findler
2a1c8a78a5 change the strategy for recursive-contract's knot tying
this change speeds up this microbenchmark by about 10x:
2018-04-26 14:06:17 -05:00
Milo
026d368a38 Improve some errors from match and friends (close #1431, #1615) (#1974)
* More specific error for no-clause match-lambda** (close #1615)

* Remove unused orig-stx parameter from racket/match internals

* Use of match-XYZ/derived for better errors (fix #1431)

* Tests for the exceptions produced by racket/match
2018-04-25 17:17:39 -04:00
Matthew Flatt
bc55560f8d raco pkg update: add ---unclone as a kind of alias for --lookup
It's difficult to remember that the opposite of `--clone` is
effectively `--lookup`.
2018-04-25 09:54:06 -06:00
Alexis King
e2ef7cdd5c Make syntax-local-lift-require not affect syntax-original?-ness 2018-04-25 10:52:14 -05:00
Alexis King
b87793640b Add quote-syntax and #%plain-module-begin to kernel-form-identifier-list 2018-04-24 15:10:11 -05:00
Robby Findler
b8c398cc69 add obligations for instanceof/c 2018-04-24 14:48:11 -05:00
Matthew Flatt
77d0b0b8f4 syntax-local-lift...: correct error for module-begin context
Relevant to #2052
2018-04-24 08:22:37 -06:00
Matthew Flatt
88d8ba00e0 bytecode compiler: fix for call-with-immediate-continuation-mark
The converstion from calling `call-with-immediate-continuation-mark`
to an internal `with-immediate-continuation-mark` form did not handler
a mutable argument variable.
2018-04-23 21:13:10 -06:00