Commit Graph

42958 Commits

Author SHA1 Message Date
Matthew Flatt
1e8bf3cfaa skip "pb/.git" in a source distribution
Closes #3508
2020-11-27 11:00:12 -07:00
Matthew Flatt
7375316478 raco pkg: handle EOF reply to interactive question
Closes #3523
2020-11-27 10:50:16 -07:00
Matthew Flatt
1828ff5697 bc: add CPPFLAGS to libffi's test for X32 2020-11-25 20:22:59 -07:00
Sam Tobin-Hochstadt
8f3ea45de1 Remove more deprecation warnings in libffi.
Similar to f2d7f1d822
2020-11-25 15:19:28 -05:00
Matthew Flatt
7a1b10897f remove accidentally added files 2020-11-25 05:29:07 -07:00
Gustavo Massaccesi
76c45cc3e4 Add special case in cpnanopass for (eq? (ftype-pointer-address x) 0) 2020-11-24 13:55:00 -07:00
Florian Weimer
6bdf095944 NOTICE: Mention LZ4
Commit 8858b34bd92ac8d2b6511dc9ca17ebfa06a1bd93 ("Add LZ4 support and
use it by default for compressing files") added LZ4 support and the
lz4 submodule, but did not update the NOTICE file, unlike zlib support
is handled.
2020-11-24 13:54:34 -07:00
Matthew Flatt
f2d7f1d822 libffi: avoid compilation warning on Mac OS 2020-11-24 13:09:54 -07:00
Matthew Flatt
e07dbc39d8 Chez Scheme: more implementation notes 2020-11-24 09:52:18 -07:00
Bogdan Popa
2af0d8ed55 match: add test for _ elimination in vector patterns 2020-11-24 10:00:43 -05:00
Bogdan Popa
ec1f11e18e match: implement and*' in terms of andmap' 2020-11-24 10:00:43 -05:00
Bogdan Popa
7bb2cad8db match: improve elimination of unused bindings 2020-11-24 10:00:43 -05:00
Bogdan Popa
88db31f46d match: preserve stx loc of original app expr 2020-11-24 10:00:43 -05:00
Bogdan Popa
bdef494c8c match: preserve source location in constant-pat predicate applications 2020-11-24 10:00:43 -05:00
Bogdan Popa
0f5ba032bf match: ensure entire `body' is traversed when eliminating unused temps 2020-11-24 10:00:43 -05:00
Bogdan Popa
21cd97f2b2 match: stop searching for unused tmps when all have been found 2020-11-24 10:00:43 -05:00
Bogdan Popa
684a1f1039 match: eliminate field refs due to _ in constructor patterns
Related to #3487.
2020-11-24 10:00:43 -05:00
Matthew Flatt
403ef87ec2 bc: upgrade to libffi 3.3 2020-11-24 07:19:41 -07:00
Matthew Flatt
71ffa2bcb6 doc: clarify intent of CS C-to-Racket calling API 2020-11-23 11:54:04 -07:00
Matthew Flatt
31d0c07d37 rktboot: fix confusion between compile-time and run-time fixnums 2020-11-23 09:55:39 -07:00
Matthew Flatt
318d3e0a9f Chez Scheme: implementation notes on adding functions
Also, explain primitives and entries, which helps make sense of
definitions like

 (define set-car!
   (lambda (p v)
     (#2%set-car! p v)))
2020-11-23 08:32:22 -07:00
Matthew Flatt
71d86bd3a3 cs: unbreak MSVC build 2020-11-23 06:54:01 -07:00
Matthew Flatt
c52113397c Chez Scheme: add weak generic hash tables
Implement weak and ephemeron generic hashtables, and repair weak and
ephemeron `eqv?` hashtables to be weak on numbers.

Racket's implementation of weak `equal?`-based tables now uses weak
generic tables. Datum interning, which needs a weak `equal?`-based
table and was the bottleneck for unfasling literal data, is much
faster. DrRacket's footprint is 1% smaller.
2020-11-23 06:43:49 -07:00
Matthew Flatt
60e9245390 cs: tweak implementation of keyword intern table 2020-11-22 16:12:17 -07:00
Matthew Flatt
3b1f457375 tweak case fixnum-only dispatch
Use `fixnum?` instead of `fixnum-for-any-platform?` when
only fixnums-on-any-platform are relevant.
2020-11-22 15:53:44 -07:00
Matthew Flatt
8751e5b75f Chez Scheme: fix $describe-fasl-from-port with cycles 2020-11-22 15:21:44 -07:00
Matthew Flatt
3ccb523f1a Chez Scheme: unbreak eq? hash on 32-bit platforms 2020-11-22 13:06:08 -07:00
Matthew Flatt
4b39dc73be cs: restore -natipkg in system-library-subpath result 2020-11-22 11:37:00 -07:00
Matthew Flatt
380550a858 cs: unbreak zo-marshal 2020-11-22 10:18:20 -07:00
Matthew Flatt
5ca183a710 cs: improve eq? hashing
Use the fixnum-mixing idea of dc82685ce0 on pointers, too.

This change provides a significant improvement on the "hash-mem.rkt"
benchmark, for example, because the allocated objects have a size that
triggers a repeating pattern in the low bits of the allocated address.
2020-11-22 09:46:30 -07:00
Matthew Flatt
f07c2fea71 cs: simplify and improve handling of literals
Use data instead of code to shrink ".zo" sizes by 10-30%.

When Racket code contains a literal that cannot be serialized directly
by Chez Scheme (such as a keyword or an immutable string that should
be datum-interned), the old approach was to generate Scheme code to
construct the literal through a lifted `let` binding. To handle paths
associated with procedures, however, Chez Scheme's `fasl-write` had
been extended to allow arbitrary values to be intercepted during fasl
and passed back in to `fasl-read`. Using that strategy for all Racket
literals simplifies the implementation and reduces compiled code. It
also makes closures smaller, while increases the number of
relocations. DrRacket's foorprint shrinks by about 1%, but the main
affect is on disk space for a Racket installation.
2020-11-22 06:02:40 -07:00
Matthew Flatt
b2a27ef05c cs & raco decompile: expose more fasl content
Show the machine code that constructs lifted constants for a linket.

Also, add a `--partial-fasl` option that shows fasl content in a rawer
form, which is useful for checking how content is presented and that
nothing is getting lost in other reconstructed views.
2020-11-21 07:26:08 -07:00
Matthew Flatt
a6e683cc71 bc: fix incomplete update for 'os* and 'arch reporting 2020-11-20 15:35:58 -07:00
Matthew Flatt
39d5adc745 system-type: add 'os* and 'arch modes
The 'os* mode is like 'os, but it provides a more specific result for
Unix variants, such as 'linux on Linux.

The 'os* and 'arch modes together are the information that we've
previously accessed indirectly via `(system-library-subpath #f)`.

Closes #3510
2020-11-20 15:11:52 -07:00
xxyzz
153e417862 generate GitHub Action file for raco pkg new 2020-11-20 10:15:26 -05:00
Matthew Flatt
d88ae7911d Chez Scheme: update expected-error test for cp0 repair
Commit 3b7378f071 turns out to have fixed the error message for an
existing tests (that I didn't notice was wrong before).
2020-11-20 07:41:35 -07:00
Gustavo Massaccesi
b9e1294b19 cptypes: add special case for zero? 2020-11-20 00:25:25 -03:00
Gustavo Massaccesi
cdfa80bde9 cptypes: add suport for bignum? 2020-11-20 00:23:29 -03:00
Matthew Flatt
3b7378f071 Chez Scheme: cp0 repair for fx{+,*}/overflow with identity
Using folding approach for `fx+` caused cp0 to convert `(fx+/overflow
x 0)` to `(fx+/overflow x)`, but two arguments are required.
2020-11-19 19:59:03 -07:00
Matthew Flatt
f34ff31aef cs: improve equal-hash-code
Mixing for sequences did not produce enough variety related to the
length of the sequence. For example, '(0 0) and '(0 0 0) and '(0 0 0
0) had the same hash code.
2020-11-19 19:21:34 -07:00
Matthew Flatt
d1a61e5ab5 Chez Scheme: mark fx{+,-,*}/wraparound as safe on good args
Allow cptypes to convert a `fx{+,-,*}/wraparound` call to unsafe if it
proves that the arguments are fixnums (unlike, say, `fx+`, where the
possibility of overflow remains).
2020-11-19 16:56:28 -07:00
Dominik Joe Pantůček
14a380bd49
net-lib/ftp upload and download enhancement
Allow using ports with ftp-download-file and ftp-upload-file.
2020-11-19 15:10:58 -07:00
yjqww6
6075923a45 add fast path for rename-in 2020-11-19 15:08:54 -07:00
Matthew Flatt
b5a9fbb03d cs: use wraparound functions for hashing
Change hash-code calculations to use `fx+/wraparound` and
`fxsll/wraparound` instead of `#3%fx+` and `#3%fxsll`. The resulting
code should be the same in the default unsafe compilation mode for the
Racket core, but the `wraparound` versions can be checked in safe
mode.

Also, fill in missing tests in Chez Scheme, which exposed cp0 problems
with `fx-/wraparound`.
2020-11-19 12:38:16 -07:00
Matthew Flatt
53c14c78d6 bc: fix C compiler warnings 2020-11-18 18:15:42 -07:00
Matthew Flatt
77ee4bb877 fix read-line-evt on a port that delivers bytes one at a time
Thanks to Javier Vivanco for the report.
2020-11-18 17:39:18 -07:00
Matthew Flatt
128892c996 add fx{+,-,*,lshift}/wraparound
Expose machine-level operations that stay within the fixnum range,
which can be useful for things like hash-code computations where it's
ok to just lose bits. Operations like `unsafe-fx+` turn out to do that
already in the current implementation, but with no guarantee (and with
no checking of arguments).

For Racket BC, before this commit, JIT-inlined `fxlshift` incorrectly
handled a negative second argument like `arithmetic-shift` instead of
erroring.
2020-11-18 17:39:18 -07:00
Sam Tobin-Hochstadt
bec35108b4
Increase hash-mem timeout. 2020-11-18 13:03:35 -05:00
Matthew Flatt
9a3eb15d8b cs & thread: fix scheduler timer event in atomic mode
When the thread-scheduler timer fires while a thread is in atomic
mode, the thread could check for breaks even when it shouldn't. Worse,
if the atomic region was to implement terminating a thread, the path
to check for a break could end up ressurecting the thread from the
persspective of `thread-dead?`.
2020-11-18 04:10:06 -07:00
Matthew Flatt
b28d682ec4 reference: correct some details on reader syntax for characters
Closes #3506 and #3507
2020-11-17 13:12:18 -07:00