Commit Graph

39978 Commits

Author SHA1 Message Date
Matthew Flatt
5896462e1a cs: uncompress boot files
When the compression format changed to LZ4, which is much faster to
decompress than zlib, the configure script changed to enable
compression by default. Bytecode tends to benefit all around from
compression, but the boot files take 20ms or so longer to load --- not
a lot of time when loading typical amounts of code, but a signficiant
cost for a minimal startup. This commit allows compression to be
controlled separately for boot files, and it configures them as
uncompressed by default.
2019-05-23 13:58:05 -06:00
Ben Greenman
7e0b893c01 doc: fix links to set-mutable? and set-weak? 2019-05-23 00:05:50 -04:00
Matthew Flatt
d9c8ef964c generate version string from individual numbers
Thanks to @sorawee for pointing me to
  https://stackoverflow.com/a/5459929/718349
2019-05-22 16:48:25 -06:00
Matthew Flatt
b219f92113 fix version number
Correct mistake in prvious commit.
2019-05-22 15:12:59 -06:00
Matthew Flatt
9178169370 bump version number
Syncing with the main Chez Scheme branch changes the header on
compressed bytecodes, so force recompilation of Racket CS ".zo"s.
2019-05-22 13:43:01 -06:00
Matthew Flatt
a23e0a3a57 cs: fix checking and arity of unsupported extfl functions 2019-05-22 10:36:42 -06:00
Matthew Flatt
ba0934521e cs: rewrite division-by-zero error message 2019-05-22 10:36:42 -06:00
Matthias Felleisen
7a6d567daf some more criticisms from Robby and clarifications 2019-05-22 12:14:26 -04:00
Matthew Flatt
ceef969d48 cs: remove trailing space in error message 2019-05-22 08:37:22 -06:00
Matthew Flatt
55c8c12f2f planet: adapt to work with Racket CS overlay build 2019-05-22 08:30:41 -06:00
Matthew Flatt
0b74787419 cs: fix chaperone-of? for hash tables with nested chaperones 2019-05-22 08:30:20 -06:00
Paulo Matos
e2ab4869d7
Remove unnecessary MZ_USE_JIT (#2602)
* Remove irrelevant #ifdefs MZ_USE_JIT

Bonus points - fixes a compiler warning on aarch64 and a typo.

* Fixes a compiler warning on aarch64 for unused current_linklet_native_lambdas
2019-05-22 16:25:04 +02:00
Paulo Matos
ce76c673b1
Simplify conditionals after removing dead store of has_space (#2489)
* Simplify conditionals after removing dead store of has_space

The conditional simplification looks good to me. The biggest issue
here was to understand if when `pipe_quote` is true, we can and should
go to the else clause. Actually the more I look at it the more I think
this uncovers and earlier bug where if pipe_quote is true, result and
total_length are left at NULL and 0 respectively after the block.
2019-05-22 15:30:44 +02:00
Matthew Flatt
cd31b308af cs: sync error message for undefined identifier 2019-05-22 07:01:48 -06:00
Matthew Flatt
cf9ae3b200 update tests/syntax/modcode for Racket CS 2019-05-21 19:23:54 -06:00
Matthias Felleisen
16ceb4a711 re-order ways based onn Robby's suggestion 2019-05-21 18:25:54 -04:00
Matthew Flatt
266c5eeb9b threads: fix for multiple threads with the same wakeup time 2019-05-21 13:57:42 -06:00
Matthew Flatt
6b09e4f4dd fix load-handler test for Racket CS 2019-05-21 10:55:41 -06:00
Matthew Flatt
7067ac8bfa cs: fix weak reference for GC-callback registration 2019-05-21 10:48:23 -06:00
Matthew Flatt
97672bb00c change datum->syntax treatment of code inspectors
Change `datum->syntax` so that it limits the transfer of a code
inspector from a source syntax object; the code inspector is kept only
if a macro is being expanded and the macro has the same code inspector
(or, more generally, the weaker of the two code inspectors is
preserved).

This change is a kind of defense-in-depth to prevent the use of
unarmed syntax with `datum->syntax` to access unexported bindings from
the module where a syntax object originates.

The general approach is Ryan's idea. This particular implementation is
a simplification of the general idea, and we'll see whether it's
worakble and sufficient.
2019-05-21 09:59:19 -06:00
Matthew Flatt
ed5bb40109 cs: implement compile-enforce-module-constants 2019-05-21 09:59:19 -06:00
Matthew Flatt
b268f77ae9 cs: fix vector-set! and set-box! impersonation
Use the result from an interposition to install into the vector or
box, instead of the original value.
2019-05-21 09:59:19 -06:00
Matthias Felleisen
7f40729f30 illustrated #:unprotected-submodule with examples and compared to manual approach 2019-05-21 10:49:50 -04:00
Matthias Felleisen
fb818abb2d added unprotected-submodule hint, but also sent query to Robby 2019-05-21 09:05:22 -04:00
Gustavo Massaccesi
b877b9f031 fix typos in printer.scrbl 2019-05-20 23:51:33 -03:00
Robby Findler
b52dbdcd5b explain #:unprotected-submodule 2019-05-20 09:51:01 -05:00
Matthew Flatt
541a8e870f cs: fix struct constructor result for object-name 2019-05-20 06:48:08 -06:00
Matthew Flatt
55728352f4 schemify: optimize local struct declarations
Rewrite locally declared structure types to expose them to the
compiler in the same way as module-level declarations.
2019-05-20 06:48:08 -06:00
Paulo Matos
6e7920e204
Enable ubsan configure argument for CS (#2658)
* Refactor --enable-ubsan to m4 macro and include it from racket and cs
* Regenerate configure scripts
* upload ubsan artifacts even if it fails
2019-05-20 11:41:22 +02:00
Alexis King
18e897bfb8 expander extract: Improve purity analysis for struct type properties
The changes in aab63ad3 introduced a dependency on
racket/private/promise, which the analysis was not capable of dropping
due to the use of the `prop:force` property. This caused trouble for the
thread layer, since it introduced a reference to `error`, which is
defined in the io layer. This change adds some additional detection for
struct type properties with guards that accept procedures of particular
arities, which allows `prop:force` to be marked as pure.

Also, a typo in the thread layer’s Makefile meant globals weren’t
actually getting tracked, so this fixes that, too.
2019-05-19 10:48:04 -05:00
Alexis King
aab63ad31d Add for[*]/foldr[/derived] and reimplement for[*]/stream using it
`for/fold` is a left fold, which is normally what you want in a
call-by-value language such as Racket, but it makes efficient lazy
iteration difficult. This commit adds a new `for/foldr` iteration form
(along with `for*/` and `/derived` variants) that provides a right fold
operation that offers complete control over precisely how lazy the
iteration ought to be.

In simple microbenchmarks, reimplementing `for/stream` to use
`for/foldr` instead of `for` plus a generator can be almost 40x faster
on large streams.
2019-05-19 10:47:54 -05:00
Matthias Felleisen
11a25b3a54 moved no-cpontract section to Performance chapter, reacted to some Robby suggestions 2019-05-18 12:57:00 -04:00
Matthias Felleisen
52bde149f3 where to find the docs and the tests 2019-05-18 12:57:00 -04:00
Matthew Flatt
cc73ec8d69 reader: see new parameter values in read/recursive
When `read/recursive` is used, do not inherit parameter values
recorded by an enclosing `read`, and instead look them up again.
This change restores behavior of the old reader.

Closes #2661
2019-05-18 12:52:45 -04:00
Matthew Flatt
5f70abef0c update docs on numbers and case sensitivity
Closes #2660, maybe permanently this time.
2019-05-18 12:35:23 -04:00
Matthew Flatt
39fe53f5d5 reader: fix number->string case insensitivity
For example, `1+2I` and `+INF.FI` should parse as numbers.

Closes #2660
2019-05-18 12:22:01 -04:00
Matthew Flatt
236e2768f8 cs: fix structure-preicate-procedure? for some cases
Fix `structure-preicate-procedure?` on a predicate returned by a
`make-struct-type` call that isn't effectively inlined by schemify.
2019-05-18 12:22:01 -04:00
Matthew Flatt
2c16beb942 cs & threads: fix plumber flushing interleaved with addition
A plumber is supposed to gather all callbacks before running any of
them so that callbacks added by a callback are not run.
2019-05-18 12:21:51 -04:00
Matthew Flatt
7f92443a5f adjust printing of renamed procedures
When ">" appears in a procedure name, or when other characters appear
that would normally need to be escaped in a symbol, don't add escapes
since `#<....>` isn't readable anyway. This change makes renamed
procedures print in a consistent way with primitive procedures.

Similarly adjust the printing of structure type names.

Closes #2646
2019-05-18 09:55:23 -04:00
Matthew Flatt
a56c984db0 avoid incorrect unix-style inference
Closes #2659 by both recognizing `lib64` as a default path and by
having `--enable-origtree` override inference and specified when
running `configure` through the root makefile.
2019-05-18 07:56:02 -04:00
Matthew Flatt
e3e141d1fd adjust spec of impersonator? w.r.t. prop:impersonator-of
As implemented, `impersonator?` does not recognize values that
impersponate others via `prop:impersonator-of`. Meanwhile, the use of
`impersonator?` in the (unenforced) contract of `unsafe-struct*-ref`
makes sense with that implementation, as does the offered rationale
for sometimes using `impersonator?`. So, adjust the specification in
the documentations, instead of adjusting the implementation.
2019-05-18 06:39:37 -04:00
Matthew Flatt
cc487a4d9a cs: fix incorrect impersonator discard in chaperone-of? 2019-05-18 06:39:37 -04:00
Matthew Flatt
b3f66a4973 repair prop:impersonator-of interaction with {impersonator,chaperone}-of?
Relevant to #2644
2019-05-18 06:39:37 -04:00
Alexis King
6ae082fccd class/c: Swap after, not before, adding #:important blame context
Swapping the blame before adding #:important context associates the
important party with the negative party for the purposes of picking
“contract violation” versus “broke its own contract” messages in error
reporting. Therefore, only swap after adding the context.

fixes #2531
2019-05-17 19:57:26 -05:00
Robby Findler
388076a3cf add support to the test suite to check "contract violation" vs "broke its own contract" 2019-05-17 17:18:34 -05:00
Matthew Flatt
ddb944d583 improve precision of / on complex numbers with small parts
Closes #2654
2019-05-14 07:57:03 -06:00
Paulo Matos
1c8d547dbb
Fix instructions to run benchmarks (#2651) 2019-05-13 16:28:21 +02:00
AlexKnauth
47c2288eb6 use (or/c #t #f 0 1)
even though it's less accurate, since that contract would allow inexact numbers like 0.0 and 1.0
2019-05-13 10:20:41 -04:00
AlexKnauth
b2afedb70a fix documentation for custom-write-accessor mode
The `write-proc` mode argument can be `#t`, `#f`, `0`, or `1`. The 0 and 1 represent print mode and quote depth.
2019-05-13 10:20:41 -04:00
sorawee
842769c501 assf also consumes a list of pairs (#2638)
* assf also consumes a list of pairs

* Address PR feedback (list? -> pair?)
2019-05-13 08:06:42 -04:00