Commit Graph

42958 Commits

Author SHA1 Message Date
Matthew Flatt
257a29216e update for ppc32
Besides updating for unboxed floating point, the ppc32 build uses a
return register, and the continuation-attachments implementation was
not right for that mode.

original commit: dd2d01fb26ace819c73f258b9b53739f9dda1d34
2020-06-20 07:36:02 -06:00
Matthew Flatt
da64bc22bb adjust package-content-state to detect as-is "info.rkt"
Avoid re-writing an "info.rkt" file if its S-expression content
doesn't change, which seems like a good idea in general and avoids a
test failure.
2020-06-18 13:08:09 -06:00
Spencer Florence
7538011f5f Strip package-content-state from info files when stripping to source 2020-06-18 13:08:02 -06:00
Matthew Flatt
22069faebc bc: fix compiler for set! as first subexpression of begin0
An optimization relatively late in the BC bytecode compiler pipeline
was wrong for `begin0`. The transformation and bug must be a very old,
since it's intended to help the bytecode interpreter.

Thanks to Sage for reporting and Alexis for initial debugging.
2020-06-17 07:12:11 -06:00
Matthew Flatt
2de28c8cf3 bc: update install for librktio.a
When linking with libracket.a or libracket3m.a, librktio.a is needed.
(The instructions in "Inside" have apparently been wrong since rktio
was split out.)
2020-06-17 07:02:08 -06:00
Sam Tobin-Hochstadt
14e206bd0b Add more kw source locations. 2020-06-16 22:01:34 -04:00
Matthew Flatt
f3dd113e9d cs: rumble layer tweaks inspired by investigations of random
The main (slightly) effective change here is to avoid disturbing loop
patterns within the Rumble layer's implementation.

Most of the commit is a commented out, updated version of the Scheme
implementation of MRG32k3a `random`. With the latest improvements for
unboxed floating-point arithmetic, performance is relatively good, but
it doesn't catch up to the C compiler's output. On an x86_64 MacBook
(i7 4870HQ) using LLVM or a Raspberry Pi 3 using GCC, it's about 50%
slower compared to C (in contrast to 300% slower before unboxing).
It's almost the same speed on a older x86_64 Linux machine (i7 2600)
using GCC. Where the C compiler wins, maybe it's due to the use of
SIMD instructions in the C output for x86_64 and Arm32. Switching to
the Scheme implementation of `random` would probably be fine, but
aisde from the satisfaction of being in Scheme, there's no reason to
pay the sometimes 50% penalty for now.
2020-06-16 17:03:40 -06:00
Matthew Flatt
e4d5ece617 improve local-variable unboxing
Generalize the `np-unbox-fp-vars!` pass to avoid a shallow "known
flonum?" guard.

original commit: d938bac6b720c56a2592dabccafe4954d695d1f7
2020-06-16 12:48:21 -06:00
Robby Findler
e7f2331663 correct n->th
closes #3238
2020-06-15 15:01:58 -05:00
Ryan Culpepper
798618f6a6
add ssl-channel-binding (#3250)
add ssl-channel-binding

Additional references:
- https://bugs.python.org/issue12551
- https://paquier.xyz/postgresql-2/channel-binding-openssl/
2020-06-15 17:05:36 +02:00
Matthew Flatt
27198bbf43 schemify: adjust pre-lift transformation that can disturb loops 2020-06-14 19:43:34 -06:00
Matthew Flatt
6aa9f7a8eb cs-bootstrap: some additional functions for bootstrapping 2020-06-14 19:43:03 -06:00
Matthew Flatt
d9621ebedf better strategy for fp register allocation
original commit: 1648c6f1f160e72991c62778e87d59b188866095
2020-06-14 19:41:40 -06:00
Matthew Flatt
4f35f62a89 fp improvements for x86_64
Specializations for operands that are the same.

original commit: 9585613deebe83366845c4ab203d1d2a4b9cda00
2020-06-14 19:33:08 -06:00
Matthew Flatt
1bc51a7ba4 cp0 loop adjustment for letrec*
original commit: b89cf40dcfd25c382bdb3190f46916ccc63a841e
2020-06-14 19:30:14 -06:00
Matthew Flatt
28271158dd cs: remove experimental JIT database support
Caching compiled JIT fragments in a SQLite database did not turn out
to be a viable path, so remove partial support for it. JIT mode in
general is rarely a good option, but it's at least completely worked
out, so left in for now.
2020-06-14 14:52:43 -06:00
Matthew Flatt
2a7d94d89c update compilation info, especially for CS
Update the Guide's performance section with current information for
Racket CS, and also document the Racket CS compilation mode and
inspection environment variables. Make a couple of environment
variables work more consistently: PLTDISABLEGC for CS and PLT_ZO_PATH
for BC.
2020-06-14 14:26:22 -06:00
Matthew Flatt
af04af5aa3 keep single-argument unsafe fl+ and fl* as an unboxing hint
original commit: 054d6da58ceffcce2c5caa6eda5561a122658543
2020-06-14 10:32:30 -06:00
Matthew Flatt
6309c64f6c cs: unbreak Windows build 2020-06-14 08:59:30 -06:00
Matthew Flatt
023681947c bc: fix GC cooperation on internal setjmp
The direct use of `__gc_var_stack__[1]` is wrong if xform has not
generated a function-call wrapper than sets that array element.
2020-06-14 06:24:50 -06:00
Matthew Flatt
e397ad0cbb schemify: fix loop detection in nested lambda forms 2020-06-13 19:03:24 -06:00
Matthew Flatt
265c9eaa57 bc: futures repair related to internal stack overflow
The combination of 1117392cb5 and the existing "tail-apply.rkt" test
exposed another bug.
2020-06-13 15:44:29 -06:00
Matthew Flatt
d1f20019ae unbox more flonum operations
Flonum operations like `fltruncate` and `flsin` are implemented by
calling functions from the C library. Unboxing these involves a
generalazation the `foreign-call` intermediate form to handle unboxing
and to work in a non-tail position (especially by telling the register
allocator that caller-saved registers will be trashed). An internal
'atomic convention on a foreign call indicates that no callback into
Scheme is possible, so some setup/teardown (including stashing
callee-saved registers) can be skipped.

original commit: fd89919634d0d5272e046b47bb81bcc66e22a741
2020-06-13 14:25:52 -06:00
Matthew Flatt
bc853db1c7 cs: sync with Chez Scheme
Latest FP-unboxing changes require recompilation, so bump the Racket
version.
2020-06-13 11:05:03 -06:00
Matthew Flatt
4b322677fa flush instruction cache on vfasl load
original commit: 57a7c47dcf1f602d208d14f51f456edb3e2689ae
2020-06-12 14:41:00 -06:00
Matthew Flatt
d26b54dd52 refactor np-expand-primitives unboxing
Shift addition of boxing as needed into the main loop, infer unboxed
variables and `mref`s, and centralize lifting of the `unboxed-fp`
declaration.

original commit: ed8ca4b6c77bdd436b0dee467a8350a450a44fb3
2020-06-12 09:21:46 -06:00
Matthew Flatt
1ce6d97369 fix unboxing with single-argument fl+ and fl*
original commit: 366468c7149dbb59cdf2dce67078e6511b137e9b
2020-06-12 08:07:21 -06:00
Matthew Flatt
99acbdaf8c fix cs to not itialize 'atomic memory, docs to not claim initialized 2020-06-11 19:37:12 -06:00
Matthew Flatt
35fe6a0c64 reference: fix typos related to exfl->fx and fx->extfl 2020-06-11 19:37:12 -06:00
Matthew Flatt
23e3597778 fix vfasl for library/C entry 0
original commit: ab36ca79585b69db135b9edeadbc26e9a071f813
2020-06-11 17:24:17 -06:00
Matthew Flatt
1117392cb5 cs: fix touch on future waiting for an atomic action
When the runtime thread `touch`es a future that is blocked on an
atomic action (just as JIT compilation), the runtime thread would
eagerly run the action, but still leave the future on the
atomic-action queue. Atomic actions tend to be ok to run a second time
(including JIT compilation), so a problem may not show up immediately,
but a semaphore can get out of sync and cause problems later.
2020-06-11 14:55:39 -06:00
Matthew Flatt
42cb80bc70 make fl->fx truncate
Change `fl->fx` to truncate as it converts, which is typically done
anyway by a machine instruction to convert from floating-point to
integer values. This makes `fl->fx` different from `inexact->exact`
or `fl->exact-integer`, but it brings BC and CS in line.
2020-06-11 06:17:18 -06:00
Matthew Flatt
fd236d99ef cs configure: propoagate some options to rktio configure
Otherwise, for example, there's a pthread mismatch currently on arm32
for rktio compilation and racketcs linking.
2020-06-10 08:13:13 -06:00
Matthew Flatt
4e808d249a fix bounds checking in flonum->fixnum
The comparison was off for 32-bit plaforms, because it didn't allow
fractional increments, The comparison was off for 64-bit platforms,
bbecause it didn't account for round-trip failure when starting from
the largest fixnum.

original commit: 74eb0583ae1b6212fbde459d7486c3d4a0498401
2020-06-10 07:56:37 -06:00
Sam Tobin-Hochstadt
ec0964861f Check for 0.0 imaginary part in exp.
Follows Chez Scheme and Guile. Turns `(exp 10000.+0.0i)` into
`+inf.0+0.0i` instead of `+inf.0+nan.0i`, which is analagous to
the behavior for exact 0 in the complex part.

Fixes #3194.
2020-06-10 09:10:22 -04:00
Matthew Flatt
2768499b88 fix rktio destroy to release a pipe used for internal singals
Also, fix CS to desstroy a place's rktio instance when the place
exits.

Closes #3243
2020-06-09 10:04:46 -06:00
Matthew Flatt
fcea8d3c67 more: adjust PATH note, because there's no "bin" layer on Windows 2020-06-09 08:36:47 -06:00
Fred Fu
c2cae5b7e3
[CS] struct-type-make-predicate creates a value that passes struct-predicate-procedure?
Fixes #3239
2020-06-08 15:03:17 -06:00
Sorawee Porncharoenwase
cd996c3b6c Fixes #3236: preserve disappeared-use on local, block, and class 2020-06-08 13:35:59 -06:00
Matthew Flatt
79e6d1865a Revert "expander: fix intering of some module path indexes for ".zo""
This reverts commit 91f8d8a72f.
The idea that the same resolved path implies the same module
path index is incorrect.

Related to #3241
2020-06-08 10:41:17 -06:00
Sancho McCann
1f3a18d637
Updated sgn documentation to reveal behaviour for signed zeros
Include expanded example set to show behaviour for infs
2020-06-08 07:35:58 -06:00
Matthew Flatt
69b597e496 clean up backend API for floating point
Simplify and normalize backend elements for loading, storing, and
converting floating-point numbers, taking better advantage of
new support for floating-pointer registers.

original commit: 4066af9cf3799392ef785a77da69f7cfff74d2fe
2020-06-07 20:02:00 -06:00
Matthew Flatt
a5f877f95d repair a hashtable test
original commit: 021e4e59474034a45c46fe51f4cd6c7ba2305554
2020-06-07 06:25:14 -06:00
Matthew Flatt
6395bd92ff fix foreign-callable handling of bytevector arguments
This is a follow-up to 276f8da076, where `(%tc-ref cp)` was supposed
to be preserved by moving it into %cp, but intrinisics for bytevector
arguments can kill %cp. Use a temporary to expose things properly to
the register allocator.

original commit: 3a29db06a452e46e69ebcde524b3b9acb435dec3
2020-06-06 19:44:40 -06:00
Sorawee Porncharoenwase
7abdaee224 doc typo: disappeared-{use,binding}s -> disappeared-{use,binding} 2020-06-06 21:40:52 -04:00
Matthew Flatt
2f5d2ab05a Revert "fix callable handling of string and bytevector arguments"
This reverts commit aa230ac79bed1efa02779bb7bbcde5c009818b74, so it
can be replaced with a solution that is less clumsy and less fragile.

original commit: 533940fdc6905d810deabb457d7004a031a3ac05
2020-06-06 19:31:38 -06:00
Matthew Flatt
a1ddeade2c suppress time-stamp-counter test for arm32le
original commit: 990f051353979049415c29af503556c5b82296e9
2020-06-06 17:57:39 -06:00
Matthew Flatt
aa17bc5d5b make sure threads from thread tests finish
original commit: baf5f3b32940f8060c535428f92b573f46dff9d4
2020-06-06 15:11:17 -06:00
Matthew Flatt
e8a52e23a9 fix ftype-lock! for arm32le
original commit: 16af3430e0f677de8de4af6b8828b9fde7a60243
2020-06-06 15:02:58 -06:00
Matthew Flatt
bbbd5a76ac fix vfasl relocation for arm32
original commit: e15c51c2c29aea545fbb4790f36b15002b7a25a5
2020-06-06 14:29:32 -06:00