Commit Graph

39518 Commits

Author SHA1 Message Date
Matthew Flatt
3c2003d01e cs: fix for fasl-related definition 2018-12-30 14:00:05 -07:00
Matthew Flatt
1052bc8dff unbreak cify build 2018-12-30 06:10:11 -07:00
Matthew Flatt
59246a0107 cs: fix call-with-immediate-continuation-mark and chaperones
Also, repair `call-with-immediate-continuation-mark` in tail
position with respect to a prompt.
2018-12-30 06:00:50 -07:00
Matthew Flatt
e37199cd7a cs: fix letrec
Report source name when accessing a variable too early, and allow
multiple returns (based on continuation capture) for the right-hand
side of a `letrec`.

The repair directly implements `letrec` as needed in terms of `let`
and `set!`, instead of relying on Chez Scheme's `letrec`, unless
right-hand sides are simple enough. Implementing `letrec` that way
risks losing Chez Scheme optimizations, but schemify takes care
of many improvements already.
2018-12-30 05:18:16 -07:00
Matthew Flatt
cea82c1ddc cs: use vfasl for boot files 2018-12-30 05:18:16 -07:00
Matthew Flatt
326e555146 expander: adjust stx serialization for RacketCS
Get more of the benefit of traditional Racket's lazy bytecode
unmarshaling by using an explicit `fasl->s-exp` stap on the serialized
form of syntax objects. This approach also avoids generating pointless
machine code for constructing the serialized form, effectively using
`fasl->s-exp` as an interpreter. The result is significantly smaller
".zo" files for RacketCS and slightly faater load times.
2018-12-30 05:18:16 -07:00
Matthew Flatt
75c30b4e2e cs: faster srcloc unmarshaling 2018-12-30 05:18:16 -07:00
John Clements
885464c2ff
reverse order of bits in mask (#2430)
I'm going to go ahead and commit this without review, fingers crossed.
2018-12-29 10:31:59 -08:00
Matthew Flatt
2c1cf20d17 cs: fix build to uncompress boot files
The uncompress step was broken by the switch to use "setup-go.rkt".
2018-12-22 18:35:56 -07:00
Matthew Flatt
86bbdab1de cs: reduce startup code size 2018-12-22 18:35:56 -07:00
Ben Greenman
b60fed7916
improve error-handling in uni-norm test (#2427)
+ overwrite any failed download attempts (after catching the exception &
  retrying the download)
+ pause between download attempts
+ ensure that `(get-test-file)` always returns a file that exists
+ check whether downloaded file is empty
+ delete bad downloaded files
+ skip the test if download fails
2018-12-21 14:33:39 -05:00
Matthew Flatt
2fc594fcc4 cs: make public udp-bound? and udp-connected? safe 2018-12-20 21:31:43 -07:00
Matthew Flatt
d14238ae31 cs: fix udp-receive!
Closes #2433
2018-12-20 21:24:55 -07:00
Matthew Flatt
b38d437a00 file/untar: allow \0s for user and group ids
Some .tar packer (on Windows?) zeros out the user and group fields,
and `file/untar` doesn't use them anyway.
2018-12-19 19:34:39 -07:00
Gan Shen
8ce8058796 fix typo 2018-12-16 11:09:24 -06:00
Sam Tobin-Hochstadt
216311e8ee
Fix documentation typo.
Closes bug all/15568.
2018-12-14 14:48:32 -05:00
Sam Tobin-Hochstadt
9a42fab7fe Rebuild expander for b1e765ca31. 2018-12-13 16:00:17 -05:00
Sam Tobin-Hochstadt
c77388eeef Include radix in low-level error message. 2018-12-13 16:00:17 -05:00
Sam Tobin-Hochstadt
d2fdfe973e Fix expander demo to go with 19e709d27b. 2018-12-13 16:00:17 -05:00
Dan Feltey
a0fdee59b4
Add support for collapsible contracts (#2367)
* Add support for space-efficient vector and arrow contracts.

When an eleventh contract would be applied to a function or vector,
switch representation for the wrapper and try eliding redundant
checks. The resulting value keeps a constant number of
chaperone/impersonator wrappers regardless of the number of contracts
applied to it, and won't run any (provably) redundant checks.

This avoids a pathological case where, e.g., a function crosses a
boundary inside a loop, and gets wrapped N times (or worse, 2^N).

The optimization for function contracts currently only applies for
fixed-arity functions and contracts, and only for functions with known
result-arity of 1. These limitations are not fundamental.

Checking specific checks is not as optimized as for regular arrow
contracts yet. (Specifically: arity-specific wrappers and
tail-marks-match support is missing.) Again, not a fundamental
limitation.

Further described in the OOPSLA 2018 Paper: "Collapsible Contracts: Fixing a Pathology of Gradual Typing"

In collaboration with Ben Greenman, Christophe Scholliers, Robby Findler, and Vincent St-Amour.
2018-12-13 14:58:56 -06:00
Alexis King
15d0ccc2c0 Fix splicing-parameterize around begin 2018-12-13 14:28:50 -06:00
Alexis King
1d1245b092 Allow explicitly providing a parent logger to define-logger 2018-12-13 10:22:31 -06:00
Matthew Flatt
347f5b8ccf compiler/cm: unbreak dependency checking
Recent changes to adapt cm to cross-multi mode also attempted to
improve dependency checking to avoid prematurely committing to
compiling an old dependency, but that improvement was broken.
2018-12-12 08:44:06 -07:00
Matthew Flatt
aded42468e expander: fix use of root namespace for readers 2018-12-10 20:38:42 -07:00
Sam Tobin-Hochstadt
2d4fb1da3d Basic tests also need racket/list. 2018-12-10 10:40:52 -05:00
Sam Tobin-Hochstadt
b1e765ca31 Check result of reading linklet hash. 2018-12-10 10:40:52 -05:00
Sam Tobin-Hochstadt
404964ea08 Reduce some build system dependencies. 2018-12-10 10:40:52 -05:00
shhyou
bf8b717ce8 Discuss the mutability of the result of quasiquote
Closes #2403.
2018-12-10 08:48:47 -06:00
Caner Derici
48cf9e54e3 regexp: add a target for writing the zo 2018-12-10 05:50:22 -07:00
Matthew Flatt
68394e7134 repair test
Fix test for 24aeea28c1 to work in "quiet" mode.
2018-12-09 14:14:07 -07:00
Matthew Flatt
140043fb65 in-indexed: repair call to wrapped continue-after-pos+val?
Closes #2418
2018-12-09 12:27:29 -07:00
Matthew Flatt
24aeea28c1 file-position: repair for OS pipe after peek
Closes #2419
2018-12-09 12:16:10 -07:00
Matthew Flatt
db2ac559a7 compiler/cm: avoid rewriting machine-indepedent files
The multi-cross mode, don't rewrite a machine-indepedent file
by recompiling it to itself. This shouldn't matter, but not
touching files makes the result cleaner.
2018-12-09 11:02:09 -07:00
Matthew Flatt
344b72b4f8 cs: reconstruct let* in fallback interpreter
Representing nested `let`s as `let*` avoids a limitation
in Chez Scheme's `fasl-read`, for now.
2018-12-09 08:54:23 -07:00
Matthew Flatt
476bc8b879 schemify: lift "empty" closures to top of a module body
When a `[case-]lambda` form's only free variables are at the module
level, the Schemified form is a `[case-]lambda` form whose only free
variables are in an enclosing `lambda` for a linklet. Since those are
not completely closed, to make the allocation pattern consistent with
traditional Racket, Chez Scheme needs a hint to allocate the closures
once per linklet instantiation.
2018-12-09 08:54:23 -07:00
Matthew Flatt
0261332ac3 io: avoid closure allocations for pipes and byte-string ports 2018-12-09 08:54:23 -07:00
Matthew Flatt
bcf6492d56 io: reduce overhead of a byte string output port
Make it a thinner wrapper around the output half of a pipe.
2018-12-09 08:54:23 -07:00
Matthew Flatt
9f27b90e31 io: change port from table of functions to table of methods
Adjust the internal port representation to that it doesn't inherently
require allocating lots of closures.
2018-12-09 08:54:23 -07:00
Ben Greenman
0c2ada98ff json: improve 'bad input' error message (#2420)
When 'read-json' finds "bad input", print the input to try to show what
went wrong.
2018-12-08 16:31:58 -05:00
Matthew Flatt
a66038a427 io: shortcut for common format patterns 2018-12-07 11:03:53 -07:00
Matthew Flatt
0f413d38c5 cs: faster path for simple foreign calls 2018-12-07 09:53:49 -07:00
Matthew Flatt
45046f4c5d fix placement of "instantiate" starting counter 2018-12-07 07:53:56 -07:00
Matthew Flatt
99feebf070 ephemeron-value: add optional "retain" argument
When an ephemeron is accessed through a weak mapping from the same key
that is used in the ephemeron, and when the key is not otherwise
reachable, there can be a race between extracting the value from the
ephemeron and performing a GC that reclaims the key. Avoid that race
by supplying the key back to `ephemeron-value`, which ensures that the
key remains reachable until the value is extracted.

In many cases, supplying the key as the second argument would also
work --- since that argument is used as a replacement value when the
key is inaccessible, but the key can't become inaccessible if it's
pending as a replacement value. A separarate optional argument to
`ephemeron-value` seems clearer and more general, though.
2018-12-07 06:31:18 -07:00
Matthew Flatt
9ce4dd8770 raco exe: fix excessive memory use
Avoid retaining namespaces that are created to gather runtime paths.
If expansion generates a lot of instances with a lot of type
information, for example, this repair can save a lot of space.
2018-12-07 05:31:43 -07:00
Matthew Flatt
f9551bcaa5 remove accidentally committed debugging file 2018-12-06 16:48:49 -07:00
Matthew Flatt
beb8445d14 cs on Windows: almost support embedded DLLs
Wire in the pieces to make embedded DLLs work, but a DLL based
on Chez Scheme doesn't actually work as embedded, yet.
2018-12-06 16:46:48 -07:00
Matthew Flatt
4b42225f0c raco setup: remove -M/--compile-any
This commit mostly reverts 9441f7075f, because it looks like relying
on `racket`-level configuration is the right idea after all.
2018-12-05 17:31:37 -07:00
Matthew Flatt
fed7e5e95c reader: immutable vectors and boxes from read-syntax
Closes #1745
2018-12-05 16:26:57 -07:00
Gustavo Massaccesi
561fe7e2e7 cs: more pure primitives 2018-12-04 22:03:27 -03:00
Gustavo Massaccesi
ff5f2ae69a optimizer: (cdr <list?>) is a <list?>
In case it is not an error, the result is a list.
2018-12-04 18:34:21 -03:00