Commit Graph

39966 Commits

Author SHA1 Message Date
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
Matthew Flatt
0d55a05b46 cs: fix a case in unsafe-add-collect-callbacks
Fix a function-call shape that is used for GTK+2.
2019-05-12 14:45:26 -06:00
Matthew Flatt
ff95f1860a io: fix hostname lookup for tcp-listen
Need to lookup with "passive" flag. Some platforms/configurations
apparently don't care, but some do.
2019-05-11 18:56:57 -06:00
Matthew Flatt
528da9e815 racket-benchmarks: repair for bar plots 2019-05-11 18:56:57 -06:00
Paulo Matos
a672ac9907
Fix simple typo
s/emable/enable/
2019-05-11 17:48:01 +02:00
Matthew Flatt
59d5300f77 makefile: fix configure dependencies
Reconfigure if "cfg-racket" changes without "configure" changing.
2019-05-10 21:21:54 -06:00
Lukas Lazarek
001eeded9f racket/contract: Fix (box/c #:immutable #f) failing on mutable boxes 2019-05-10 21:05:23 -05:00
Matthew Flatt
bfe649bcc7 adjust GC behavior to be more usable without generational collection
Instead of limiting the nursery size and performing a full GC every
time a small nursery is full, allow the nursery to be proportional
to the total heap size if generational GC is disabled.
2019-05-10 19:45:05 -06:00
Paulo Matos
7c3a207f36 Add configure option --enable-generations (enabled by default).
This option allows the user to enable or disable (with
--disable-generations or --enable-generations=no) generations in
3m. Disabling generational collection is, in most cases, a bad
idea, but it may be necessary on a platform where signal handling
doesn't work well enough to support a write barrier that is
implemented with page protection.
2019-05-10 19:44:46 -06:00
Matthew Flatt
eeaac9c142 avoid unspecified NULL passed to memcpy
Closes #2632
2019-05-10 19:35:38 -06:00
Matthew Flatt
deb5e43fab traditional benchmarks: more consistent error calls
Avoid Chez Scheme warnings due to `error` calls that don't match its
calling convention.
2019-05-10 19:35:38 -06:00
Matthew Flatt
35e98675b6 racket-benchmarks: add tool for simple bar plots 2019-05-10 17:35:53 -06:00
Matthew Flatt
bb7836e734 cs: support --enable-natipkg 2019-05-10 17:35:53 -06:00