Commit Graph

39456 Commits

Author SHA1 Message Date
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
Ben Greenman
88b165314a
fix pair accessor error messages (#2413)
Change the error message for some functions like `caddr` so they
describe pair structures that they expect
2018-12-04 16:04:01 -05:00
Ben Greenman
cbaa1b99d9
doc: logging, clarify 'none level and the level ordering (#2407)
add the `'none` log level to the intro paragraph,
 declare `'none` the level of "least detail",
 and change prose to say "subscribes to current level and lower"

+2 small rewordings
2018-12-04 16:03:38 -05:00
shhyou
8043768b4c Support unsyntax-splicing in vector quasisyntax
If the sub-template inside #(...) is unsyntax-splicing instead
of list, produce the template #((~@! . ????)) instead of calling
(datum->syntax o list->vector o syntax->list). Fixes #2402.
2018-12-04 12:00:01 -06:00
Matthew Flatt
5454b7d809 doc example repair
Fixes a typo in b3104a6acd.
2018-12-04 10:41:53 -07:00
Philip McGrath
b3104a6acd add #:result clause to for/lists and for*/lists 2018-12-04 10:12:43 -07:00
Matthew Flatt
6d8596bae3 raco setup: repair more problems with multi-cross mode
Fix some race conditions involving concurrent setup tasks that are
each trying to generate both machine-independent bytecode and
machine-specific bytecode.
2018-12-04 06:05:53 -07:00
Ben Greenman
b38ce36c92
glob: add 'glob-quote' (#2397)
add a function to escape any glob wildcards in a path or string

also add a private `glob-element->filename` function so that, e.g., the pattern
`a\*` matches the file named `a*` (previously, the match would fail and
I think it was impossible to match for only `a*`)
2018-12-04 00:21:14 -05:00
Matthew Flatt
e729d35915 bump version number
Should have bumped with 37929f2191.
2018-12-03 20:24:13 -07:00
Gustavo Massaccesi
d8d94b1549 Build cs variant on Travis, but allow failure.
With this script the "default" value of RACKETCS_SUFFIX is effectively ""
instead of "cs" as in the make file.
This is a minor incompatibility/unexpected behavior that will get eventually
solved when the real default changes to "".
2018-12-02 20:16:05 -05:00
Sam Tobin-Hochstadt
6e8f47788f Build cs variant on Travis, but allow failure. 2018-12-02 20:16:05 -05:00
Matthew Flatt
37929f2191 cs: make interp layer safe-for-space
Fix the fallback interpreter (which is used for the "outside" of a
module that is too big to compile) so that it's safe-for-space.

This change is unlikely to repair any immediate problems, but space
safety problems are difficult to detect and avoid when the underling
implementation is not safe-for-space so fixing the interpreter is
likely worthwhie in the long run.
2018-12-02 15:58:59 -07:00
Matthew Flatt
74abc61f03 cs: fix module-prompt handling in interpret mode 2018-12-01 09:33:23 -07:00