Commit Graph

39006 Commits

Author SHA1 Message Date
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
Matthew Flatt
f5f4e6cf03 Windows: Unicode I/O for console ports
Use WriteConsoleW and ReadConsoleW to support Unicode input and output
for a console independent of it's code page.

Closes #2087
2018-05-20 07:46:20 -06:00
Matthew Flatt
4d04a77cb3 doc correction compiler/zo-struct
Closes #2016
2018-05-19 10:31:51 -06:00
Gustavo Massaccesi
293beac7ff fix mode in rumble:equal?/recur 2018-05-19 09:49:22 -06:00
nocheroot
e691757eb8 Update broken link 2018-05-19 09:48:23 -06:00
Georges Dupéron
b7f81cd084 doc: template metafunctions now work in "syntax" expressions
As noted by @lexi-lambda: https://github.com/racket/racket/issues/2080#issuecomment-389545625
2018-05-19 09:47:42 -06:00
Matthew Flatt
628c177480 expander: fix code-inspector management during macro expansion
Specifically, don't incorrectly preserve the current macro's code
inspector when triggering another macro via `local-expand`.
2018-05-19 07:12:26 -06:00
Caner Derici
55011ce282 racket/src/expander: add -B
adding -B option into the expander to write the bytecode of the extracted linklet
2018-05-18 19:25:51 -06:00
Robby Findler
54989bddec use preserved thread cells for the knot-tying cache
(this makes a difference in the acquire gradual typing
benchmark, which uses nested threads via the sandbox library)
2018-05-17 08:42:08 -05: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