Commit Graph

4462 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
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
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
266c5eeb9b threads: fix for multiple threads with the same wakeup time 2019-05-21 13:57:42 -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
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
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
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
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
Matthew Flatt
ddb944d583 improve precision of / on complex numbers with small parts
Closes #2654
2019-05-14 07:57:03 -06: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
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
bb7836e734 cs: support --enable-natipkg 2019-05-10 17:35:53 -06:00
Paulo Matos
75cc43aa56
In autoconf 2.70 variable runstatedir was added - ignore (#2606)
Ignore new autoconf variable added in 2.70.
The interesting thing is that debian decided to backport this variable
to their 2.69 release so in some 2.69 autoconf this variable does not
exist but in debian ports 2.69 generates this variable. It is
nonetheless not useful for Racket, so add to ignore list.
2019-05-10 18:19:49 +02:00
Matthew Flatt
d5a46eb39d cs: repair build without --enable-racket
When using a built-for-bootstrapping Racket to build Racket CS, the
intermediate module loading module mode should be `--boot` instead of
`--chain`. The repo's top-level makefile takes care of that already,
but not `configure`-generated makefiles as may happen in a build from
a source distribution.
2019-05-10 07:20:31 -06:00
Robby Findler
2c3fce244c added #:unprotected-submodule 2019-05-08 20:32:04 -05:00
Matthew Flatt
b7d738d59a cm: fix lock more
Still trying to get it right for the repair started in 70e0cac062 and
continued in ef1004fdc0.
2019-05-06 20:17:38 -06:00
Matthew Flatt
93d84170d0 read: fix #e after #x
Corrects a bug in 0549bfb1e5 where `#x` causes the `e` in `#e` to be
interpreted as 14 instead of the character `#\e`.
2019-05-06 08:14:20 -06:00
Matthew Flatt
bed23e221e update racket HISTORY.txt for v7.3 2019-05-06 07:34:55 -06:00
Matthew Flatt
83ad6bd7c1 cs: fix banner and make startup use it
The string returned by `banner` was missing a "v" and a "." compared
to the traditional result. Avoid duplicating the string in "main.sps".
2019-05-05 17:34:04 -06:00
Matthew Flatt
151b5755c5 cs: repairs for inaccessible custodians and custodian boxes
Allows an inaccessible custodian to be GCed, promoting any values that
it manages to its parent custodian. Also repair memory accounting for
custodian boxes.

For values referenced by a custodian, the nature of the custodian's
weak references is slightly different on Racket CS. The reference is
weak enough that the value can be finalized via will (e.g., to close
an unused port), but it's not weak enough to allow weak boxes, weak
hash table keys, or ephemeron keys to be cleared. That's a consequence
of using ordered finalization instead of finalization/weakness levels.
This difference could be avoided at the cost of an extra wrapper for
any finalized value and a discipline of using such wrappers as the
user-visible reference for all custodian-managed values, but semi-weak
references so far appear to be practical and a better compromise.
2019-05-03 19:16:45 -06:00