Commit Graph

42440 Commits

Author SHA1 Message Date
Matthew Flatt
53ef242889 fix arity exception for a keyword procedure
Closes #3416
2020-09-30 08:05:19 -06:00
Paulo Matos
5db75a92ae
Small fixes to enable LTO compilation (#3418)
Small fixes to enable LTO compilation

To do this in racket/src:
  ./configure CFLAGS="-O3 -march=native -flto"
              LDFLAGS="-O3 -march=native -flto"
              --prefix=...

One fix deals with variable `errnum` that might be used uninitialized.
The other is to ensure that `boot_file_data` is marked as used
otherwise, it is removed by LTO and ends up crashing build
in `embed-boot.rkt`.
2020-09-30 15:44:13 +02:00
Matthew Flatt
0c9fc7c374 documment rename-transformer tracking in set! 2020-09-30 06:25:29 -06:00
Matthew Flatt
838b4e7896 rackt/unit: add some missing syntax-track-origins 2020-09-29 20:17:36 -06:00
Matthew Flatt
46a191df03 expander: fix srcloc tracking for set! on rename transformer 2020-09-29 14:08:17 -06:00
Matthew Flatt
c7e6cbc001 cs: more repairs for old vector-based HAMT
Fix `hash-map` and `hash-for-each` for applicable structs.
2020-09-29 09:50:29 -06:00
Matthew Flatt
58deff8b6f cs: repairs for old vector-based HAMT
Sync the old implementation with some repairs for `equal?/recur` and
key replacement.
2020-09-29 08:38:35 -06:00
Matthew Flatt
c4df79b38d cs windows: add dependencies on petite.so and scheme.so
Originally, the dependency was expressed via "compile-file.ss", but
now the dependency can be more direct.
2020-09-28 19:15:33 -06:00
Matthew Flatt
075048409b bump version 2020-09-27 15:36:40 -06:00
Matthew Flatt
b203c52193 Chez Scheme GC: keep per-thread allocation more separate
Instead of having leftover Scheme threads swept by the main thread,
distribute Scheme threads among sweeper threads, and swap into each
thread's content to preserve its allocation ownership. This change
makes parallelism more consistent for different timings that end up
assigning sweepers differently.
2020-09-27 15:36:40 -06:00
Matthew Flatt
16d71ac249 Chez Scheme GC: refactor thread and allocation organization
Move per-thread allocation information to a separate object, so the
needs of the collector are better separated from the thread
representation. This refactoring sets up a change in the collector to
detangle sweeper threads from Scheme threads.
2020-09-27 15:36:40 -06:00
Matthew Flatt
c46e4f91c1 Chez Scheme GC: internal parallelism by messages instead of locks
Change the internal parallelism strategy for the GC to record an owner
for each allocated segment of memory, and have the owner be solely
responsible for copying or marking objects of the segment. When
sweeping, a collecting thread handles references to objects that it
owns or that have been copied or marked already, and it asks another
collecting thread to resweep an object that refers to objects owned by
that that thread. At worst, an object ends up being swept by all
collecting threads, one at a time, but that's unlikely for a given
object.

The approach seems likely to scale better than a lock-based approach,
even the one that used a lightweight, CAS-based lock and retries on
lock failure.
2020-09-27 15:36:40 -06:00
Gustavo Massaccesi
4fdc896412 fix typos in linklet.sls 2020-09-26 10:49:09 -04:00
Robby Findler
515012525c improve value-contract handling a little bit
That is, use pairs on the property in more places, as the pair
already was computed and the value-blame function already does
the needful when it sees a pair on the property.
2020-09-24 17:18:27 -05:00
Robby Findler
816e20b803 fix bug in ->i (neg party was getting dropped) 2020-09-24 17:18:27 -05:00
Jin-Ho King
5665fd8a85
Update .makefile to correct minor typos (#3412)
Corrected minor misspellings in the comments.
2020-09-22 17:14:01 +02:00
xxyzz
659741bb58
bc: declare interntional unsafe fixnum arithmetic
Eliminate overflow errors from fixnum test when racket bc compiled with
--enable-ubsan (issue #2314)
2020-09-22 07:57:32 -06:00
Matthew Flatt
d24cbd4344 Chez Scheme GC: faster record type handling
When the GC needs to copy/mark a record, it previously forced a
copy/mark on the record's type descriptor, since the copy/mark needs
information from the descriptor. But the needed information is not in
danger of being overwritten for forwading (since it's after the first
two words of the type descriptor), so it's ok to use the old reference
as-is --- at least in non-counting mode. Simplifying record-type
handling and deferring the record-type update to the sweep phase, the
same as for other components of the record type, makes the GC slightly
faster.
2020-09-22 07:52:13 -06:00
Matthew Flatt
54367de430 Chez Scheme GC: fix overhead tracking 2020-09-20 07:25:51 -06:00
Philip McGrath
ad7fed1e95 docs: raise-range-error: alt-lower-bound argument is optional 2020-09-20 06:55:34 -06:00
Matthew Flatt
024cc90813 Chez Scheme: avoid MinGW warnings 2020-09-19 11:36:56 -06:00
Matthew Flatt
fa3b0699d3 Chez Scheme: sync pb
Also, improve internal timing instrumentation for parallel GC.
2020-09-19 11:36:56 -06:00
Matthew Flatt
4ee149d226 Chez Scheme GC: add ephemeron checking to parallel phase 2020-09-19 11:36:46 -06:00
Matthew Flatt
7738499c70 Chez Scheme GC: move dirty-sweep phase to parallel
The dirty-sweep phase handles old objects that have references to
objects that are in generations about to be collected.
2020-09-19 07:10:02 -06:00
Matthew Flatt
8f08a9ee5c cs: fix srcloc path conversion on load with no current-load-relative-directory
Fall back to `current-directory` when `current-load-relative-directory`
is #f.

This change also affects `deserialize` --- not because byte code
loading uses it directly in this case, but because they share a helper
function, which exposes the issue. This implementation change is
worrying (even though it makes the implementation match the
documentation), but unless we discover that some use of serialization
needs absolute paths deseialized as relative, is seems better to be
consistent everywhere about falling back to `currenrt-directory`. This
aspect of the change can be reverted separately (by adding more code)
if needed.

Closes racket/drracket#421
2020-09-18 14:36:48 -06:00
Matthew Flatt
1766cba6c6 cs: repair sync on empty byte-string port 2020-09-16 20:03:28 -06:00
Matthew Flatt
60b2f8e0c2 CS: fix continuation-mark-set->context results
Return function names as symbols instead of strings.

Closes #3398
2020-09-15 15:43:34 -06:00
Matthew Flatt
a74a30ee8d cs: fix supression of built-in functions in traces
Repairs 0ae3ef7b42 after the number representing the static
generation changed.
2020-09-15 15:33:49 -06:00
Matthew Flatt
c1f62ae959 Chez Scheme: fix intern of some symbols on startup
Closes #3399
2020-09-15 15:19:12 -06:00
Sorawee Porncharoenwase
cb723ad4c8 info: recognize by binding
Prior this PR:

    #lang info
    (list 1)

is accidentally considered well-formed.
This PR fixes the problem.
2020-09-15 10:45:50 -06:00
sorawee
6366874ecd
for: optimize literals
Closes #883
2020-09-15 10:43:57 -06:00
Evan Minsk
d307a514b1 Fix minor typo in vi command 2020-09-15 10:05:36 -04:00
Matthew Flatt
8305e5eaef Chez Scheme: parallel garbage collection
All allocation is now thread-local, which recovers a small bit of
performance that was lost when adding thread-local allocation
alongside global allocation.

Parallelism uses thread contexts created by Chez Scheme threads (which
correspond to Racket places and future-running threads), but it
creates its own OS-level threads to perform collection. The number of
collection-helper threads is limited to the number of active Chez
Scheme threads. Only the main "sweep" pass runs in parallel --- that
is, after roots have been traversed, and before weak references and
finalization are handled --- but that's the bulk of collection work.
Also, memory-accounting collections always run as single-threaded.
2020-09-15 07:40:13 -06:00
Matthew Flatt
78fedb3b24 Chez Scheme: tweak segment test for double-pair copying 2020-09-15 07:23:54 -06:00
sorawee
b66d46b4f8
Fix typo (#3387) 2020-09-10 09:41:41 -04:00
Matthew Flatt
41d35b946a guide: make an example identifier look a little less random 2020-09-06 09:28:31 -06:00
sorawee
e4826e63b4 Fix README 2020-09-06 09:03:42 -04:00
Matthew Flatt
f1e5f38a77 Chez Scheme: fix reducing maximum generation
Adjust recent changes to cooperrating with setting
`maximum-collect-generation` to a smaller value.
2020-09-06 06:22:41 -06:00
Matthew Flatt
78b7cc3fc9 cs: use thread-local allocation while sweeping in collector
This is a second step toward parallel collection.
2020-09-05 17:22:12 -06:00
Matthew Flatt
3f3cf5ab83 cs: more thread-local allocation
Improved support for thread-location allocation (and using more
fine-grained locks in fasl reading) may provide a small direct
benefit, but the change is mainly intended as setup for more
parallelism in the collector.
2020-09-05 08:47:07 -06:00
Matthew Flatt
f50f44bb25 anoter repair to test for raco pkg 2020-09-03 13:30:50 -06:00
Ryan Culpepper
9464bc3274 add note about "quotable" to docs for make-constructor-style-printer 2020-09-03 16:56:28 +02:00
Matthew Flatt
b9e4b5dbb1 makefiles: enable ".boot" files in non-cross CS builds on Windows
There's a trade-off between keeping the distribution sizes small and
making ".boot" files available for convenient embedding, even though
embedding is relatively rare. For Unix platforms, since you have to
build from source to get a static library for embedding anyway, we'll
leave out ".boot" files. For Mac OS, the distribution's "Racket"
framework includes ".boot" files --- even though the framework is
itself unused for a normal distribution build, since signing and
notarization are handled by embedded the boot files in an executable,
but the framework was kept for a kind of backward compatibility. For
Windows, the Racket DLL can be used for embedding, so the ".boot"
files would be the only missing piece; also, they were already
included in a cross-built distribution.

Update "Inside" to note that ".boot" files must be built on Unix and
to clarify the location of ".boot" files on Mac OS.

Closes #3377
2020-09-03 07:31:01 -06:00
Matthew Flatt
3f0631116a Chez Scheme: improve repair for arm32 return-address reference
Since the offset is always a multiple of 4, expand the range of
compactly encoded offsets.
2020-09-03 06:46:46 -06:00
Matthew Flatt
f5895ebc97 Chez Scheme arm32: avoid bouncing in label-address assignment
The A32 instruction set has an interesting encoding of immediate
values where a larger value sometimes fits in a smaller set of
instructions. That turns out to be a bad property for loading a return
address, because it means that the as label computations push code
further away, a contracting return-address calculation can pull code
back nearer, and this push-and-pull can keep the label allocator from
arriving at a fixpoint.

This became a bigger problem with 8834597c1f, which creates
return-label references that go backwards and where the offset can be
much larger than the normal, forward references.
2020-09-02 18:37:15 -06:00
Ryan Culpepper
6f11f1f527 add documentation for datum and syntax variables, attributes 2020-09-02 20:21:44 +02:00
Ryan Culpepper
07f9b843a6 fix syntax/parse docs: add pretty-printing to evaluator 2020-09-02 20:21:44 +02:00
Ryan Culpepper
5c0d75fa3e datum: always force promise 2020-09-02 20:21:44 +02:00
Ryan Culpepper
45fb9b4d63 make datum variable in syntax template an error
Previously, a datum variable was treated as a constant.
2020-09-02 20:21:44 +02:00
Ryan Culpepper
25142daea5 change datum to work with syntax variables too 2020-09-02 20:21:44 +02:00