Commit Graph

40608 Commits

Author SHA1 Message Date
Matthew Flatt
c8f44d6597 cs & thread: remove redundant internal atomically 2019-12-29 07:08:15 -06:00
Matthew Flatt
e087059f21 add unsafe-bytes-copy!
Also, improve checking and performance of safe `bytes-copy!` in Racket
CS.
2019-12-28 10:55:57 -06:00
Matthew Flatt
085dd494d7 cs: speed up hash-map and hash-for-each on mutable hash tables
Specialize internal iteration to avoid the overhead of going though
the `hash-iterate-...` interface for each step.
2019-12-28 09:17:41 -06:00
Matthew Flatt
8b3fd15803 cs: simplify mutable hash table iteration
Remove some complexity that originally handled `eq?` unreliability on
flonums, which is no longer needed.
2019-12-28 09:00:20 -06:00
Matthew Flatt
2fcdd7c292 cs: improve equal?-based immutable hash
Check leaf hash code before a more general (and potentially much
slower) equality check.
2019-12-28 08:05:22 -06:00
Matthew Flatt
330ae24ce1 cs: tweak immutable hash-ref implementation
Force inlining of value and key accessors. Keeping the `define` with a
loop body --- that is, not making the individual function a macro ---
allows the Rumble `define` to avoid a closure allocation for the loop.
2019-12-28 06:23:25 -06:00
Matthew Flatt
8ef11a9b06 makefile: use --recurse-submodules for initial ChezScheme checkout
Related to #2945
2019-12-27 05:12:05 -06:00
Matthew Flatt
c6e9d6cfd4 cs: unbreak racket with no command-line arguments 2019-12-26 07:04:35 -06:00
Matthew Flatt
e6e28fa8b7 cs: further corrections to racket command-line argument handling 2019-12-26 07:02:32 -06:00
Shu-Hung You
ccbd93e49c Stop -v from changing init-lib config 2019-12-26 07:02:24 -06:00
Matthew Flatt
15d7c439df fix name on port sent through place channel 2019-12-26 05:04:08 -06:00
Matthew Flatt
90abbb912d cs: guard internal hash traversals against GCed keys
Hash iteration can fail if a GC collects a key in between
`hash-iterate-next` and `hash-iterate-key` (and similar). Use the
optional extra argument internally to detect and handle that case.
2019-12-26 05:04:08 -06:00
shhyou
9db9991df6 Fix racket help string typo 2019-12-24 21:14:35 -06:00
Matthew Flatt
bc80116eff mark a test as unreliable due to timing
Relevant to #2977
2019-12-24 17:18:41 -06:00
Matthew Flatt
3710f45eba racket/dict: reduce assoc? tests
THe internal `assoc?` predicate is relatively expensive, so remove
redundant uses. Also, uses a cache to make it a little cheaper for
muliple uses of dictionary functions on a moderately sized list.
2019-12-24 07:18:03 -06:00
Matthew Flatt
4d001eb259 cs: further tune list?
Experiments suggest that 64 pairs is a better threshold to start
caching than 32 pairs.
2019-12-23 12:20:43 -06:00
Matthew Flatt
c727a9c8d8 fix doc typo 2019-12-23 05:36:08 -07:00
Matthew Flatt
723232081c cs: faster list? 2019-12-23 05:36:08 -07:00
Paulo Matos
11e7598021
Pass ubsan flags to rktio build (#2987)
We have also removed ubsan flags from CPPFLAGS - since these are
compile flags, not preprocessing flags.

To pass the flags to rktio, we split the use of CFLAGS and CPPFLAGS
in rktio and ensure that flags in rktio do not update flags if make
is called in sub-make form (in a standard racket build, the rktio make
is called as a sub-make from the main racket make).

Fixes #2984

* Avoid export on variables in Makefiles

Instead pass the variables explicitly to the make call.

* Fix variable syntax

* Double quote variables

* Put ubsan back in CPPFLAGS

* Remove conditional assignment

This is not necessary if passing variables straight into sub-make
2019-12-23 09:18:34 +01:00
Geoff Shannon
9a547ff7b4 raco-exe doc: minor grammar edit 2019-12-22 22:53:54 -05:00
Matthew Flatt
f95abbbf85 cs: remove "GRacket3m.exe" from Racket CS build
When "GRacket3m.exe" is present, then "DrRacket3m.exe", etc.,
created created.
2019-12-22 11:07:17 -07:00
Matthew Flatt
f95beb40ad cs: check for too-large file-position argument 2019-12-22 10:07:30 -07:00
Matthew Flatt
41cc442779 fix extraction of numbers into a 64-bit value on 32-bit platforms 2019-12-22 09:50:08 -07:00
Matthew Flatt
71fb5e0f6a schemify: expose more functions to lifting
This improvement affects the interpreter's implementation, for
example.
2019-12-22 08:35:54 -07:00
Matthew Flatt
73ed7141aa cs: fix local struct for interpreter mode
Keep in `make-struct-type` form for performance and to get names right.
2019-12-22 08:35:54 -07:00
Matthew Flatt
8a4f21c7c8 cs: avoid unnecessary procedure unnaming in core 2019-12-22 08:35:54 -07:00
Matthew Flatt
c8c3647da5 cs: interpret short-lived compile-time code
Instead of compiling the right-hand side of a `let-syntax`, interpret
using the schemify layer's safe-for-space interpreter. Similarly,
interpret the right-hand side of `define-syntax` when it is evaluated
during the enclosing module's expansion (compiling it for use when the
enclosing module is instantiated for expanding other modules).

This is an old idea, and it's effective in some cases: `racketcs -cl
racket/base` or `racketcs -cl racket` takes 20% less time with this
change. Various obstacles kept us from trying this earlier; most
significantly, the gap to finish the safe-for-space interpreter was
small enough to make it work. It's not clear that the result is an
improvement for `raco setup`, though.

The interpreter is not fast (it's about 1/4 the speed of the
traditional Racket interpreter), so there's room for improvement,
but even a slow interpreter pays off for building.
2019-12-22 08:34:41 -07:00
Matthew Flatt
53d7387f6c fix compilation manager for machine-independent conversion
When recompiling modules from machine-independent mode to
machine-specific mode, dependencies of the module to be recompiled
must be checked explicitly, but using `module-path-index-resolve` is
not a good strategy, because it doesn't load transitive dependencies.
That can create a failure later when a transitive dependency is needed
for compilation and it isn't loaded because the dependent module was
already loaded.

Relevant to #2928
2019-12-19 17:35:22 -07:00
Matthew Flatt
6a023cddfa improve internal organization of the compilation manager 2019-12-19 12:55:56 -07:00
Matthew Flatt
02b534d571 update source "foreign.rktc"
Copies change in 91fa5b6490 to original source.
2019-12-19 08:29:52 -07:00
Paulo Matos
91fa5b6490
Drop use of deprecated ffi_prep_closure (#2988)
Use ffi_prep_closure_loc instead.

Fixes #2985
2019-12-19 16:09:37 +01:00
Matthew Flatt
31636870a9 place channels: clean up allocation arena after failed message 2019-12-19 06:31:42 -07:00
Brian Wignall
ffa6d2ef74 Fix typos, via a Levenshtein-style corrector (#2982) 2019-12-19 08:28:13 +01:00
Matthew Flatt
b1d9201c13 refine test of compilation time
Relevant to #2977
2019-12-18 06:46:02 -07:00
Matthew Flatt
a135a868a8 cs: fix check for escaping procedure name 2019-12-18 06:42:33 -07:00
Matthew Flatt
c61dc30560 disable timing-sensitive thread test by default
Closes #2978
2019-12-18 06:38:22 -07:00
Matthew Flatt
22a784d25e raise timeout for raco pkg tests 2019-12-18 06:03:04 -07:00
Matthew Flatt
bf1eb4351b cs: avoid procedure names generated by schemify
Also, escape names that may look like internal encodings.
2019-12-17 20:28:39 -07:00
Matthew Flatt
27eb177b9d add {symbol,keyword}->immutable-string and string-append-immutable
There could be many more functions that produce immutable strings
directly, and we want the default functions to do that in some future
language. For now, these three rae the most immediately useful for
avoiding unnecessary allocation in Racket CS.
2019-12-17 19:41:41 -07:00
Matthew Flatt
2270513c27 cs: fix procedure-extract-target for applicable struct result 2019-12-17 17:13:07 -07:00
Matthew Flatt
63bc848f79 expander: another approach to fixing nested instantiation
Mostly reverts ee4ceb7ae4 and tries a different approach. The prevoius
approach did not handle the case where the module begin instantiated
was tiggered by a module at a different (higher) phase.

Closes #2981
2019-12-17 14:02:45 -07:00
Sam Tobin-Hochstadt
6b1dad21eb Trim requires.
Eliminates another ~300 instantiations from `racket -cl racket/base`.

small-scheme.rkt is no longer used in `racket/private`.

c.rkt was an accidentally-committe file.
2019-12-17 13:02:47 -05:00
Matthew Flatt
81d73d9849 adjust raco pkg tests to work with Racket CS overlay
Commands that use `raco` need to be `racocs`, etc.
2019-12-17 08:38:04 -07:00
Matthew Flatt
d7f2bd3e15 cs: eval multiple expressions provided with -e 2019-12-17 07:30:47 -07:00
Matthew Flatt
899aa24756 cs: avoid problem waking up on TCP connect completion
Maybe there's a problem in `rktio_poll_add_connect` that I just can't
see, or maybe it's a Mac OS bug, but `rktio_poll_add_connect` doesn't
seem to reliably wake up the process when the TCP connection becomes
ready. Traditional Racket happens to avoid the problem by registering
the connection file descriptor with the semaphore table; doing that
for Racket CS also avoids the problem there.
2019-12-17 07:08:57 -07:00
Matthew Flatt
61000a454e cs: cooperate with immutable strings for symbols in Chez Scheme
Take advantage of new guarantees/support for immutable strings within
a Chez Scheme symbol representation. Consistent use of immutable
strings at the boundary avoids potential non-determinism.
2019-12-16 18:14:16 -07:00
Matthew Flatt
c7388f9fa8 places: repair clean-up after serialize failure 2019-12-16 12:33:14 -07:00
Sam Tobin-Hochstadt
f7c39512ab Modules with tests for unsafe mode can be cross-phase persistent.
Also, mark several more modules as cross-phase persistent.
2019-12-16 13:58:35 -05:00
Matthew Flatt
2d695be78c racket/promise: repairs for custodian change
Closes #2973

Note that the test is in the "lazy" package, commit 2cc3a24343.
2019-12-16 08:58:08 -07:00
Matthew Flatt
15c0e34bed cs: fix default constructor name and initial accessor/mutator name 2019-12-16 08:39:56 -07:00