Commit Graph

42787 Commits

Author SHA1 Message Date
Matthew Flatt
f38ffc53ed expander: fix prohibition on redeclaring attachment module instance
The check worked in the original namespace, but not the target
namespace for an attached instance.

Related to racket/drracket#227
2020-06-29 09:45:03 -06:00
Matthew Flatt
e99332af69 expander: improve module-name formatting in some error messages 2020-06-29 09:45:03 -06:00
Matthew Flatt
0527c9c9e2 expander: improve dependency-cycle reporting
Show the dependency chain when a redeclared module creates a
dependency cycle.
2020-06-29 09:45:03 -06:00
Matthew Flatt
cdf7e9c383 cs makefile: fix PLT_CS_COMPILE_LIMIT note 2020-06-29 09:45:03 -06:00
Matthew Flatt
4f9c0779f8 cs-bootstrap: fix size and offsets for double fields
Although building with the wrong offsets is good enough to compile
the compiler to compile itself correctly, a broken intermediate
compilation can create confusion.
2020-06-29 09:44:53 -06:00
Matthew Flatt
6fc5157f94 arm32: fix sharing domain of fence
original commit: fa32a2919cb5550eabf59b188312f2ed32c57ccf
2020-06-29 07:16:55 -06:00
Matthew Flatt
bdd1eaa874 add tarm32le
Besides adding supportt for `__collect-safe` and other repairs,
introduce a write-write fence with the write barrier, which is
intended to avoid one thread using an object created in another thread
before the object's initializing writes are visible.

original commit: 543bd16739c08e5a8f88c470b52db0f23a27d260
2020-06-29 05:55:47 -06:00
Matthew Flatt
5e9c6b31c0 add note on compiling Rumble in safe mode 2020-06-28 13:13:58 -06:00
Matthew Flatt
221408cb34 reference: document possibility of spurious CAS failures
An operation like `box-cas!` can fail spuriously on some platforms,
such as ARM processors. Mention that in the documentation.

The `box-cas!` and similar implementations could instead retry on
spurious failure, and that would avoid potential problems with code
tested on x86, where there's no spurious failure. In this case,
though, it seems better to stick with the existing behavior and
stay closer to the machine operation.
2020-06-28 07:04:16 -06:00
Matthew Flatt
a186e0070a expander & thread: accomodate spurious failure from CAS 2020-06-28 07:03:58 -06:00
Matthew Flatt
38d90a5b0b bc: fix some JIT mismatches
Using a newer GCC on arm32 exposed several small problems.
2020-06-26 15:21:09 -06:00
Matthew Flatt
866d6319a3 cs: enable threads on arm32le 2020-06-26 15:21:05 -06:00
Matthew Flatt
4ad93bcca0 cs: improve raco dec output
Handle `--linklet` mode better and show fasled arguments to compiled
linklet functions.
2020-06-26 12:11:53 -06:00
Matthew Flatt
a76380a343 remove expand-for-clause from racket/base
Closes #3246
2020-06-26 10:25:34 -06:00
Sam Tobin-Hochstadt
09c6ba48f6 Use source location for procedure in with-handlers.
Fixes #2159.
2020-06-25 15:08:35 -04:00
Matthew Flatt
5f5599d2e8 expander: restore datum-intern-literal in datum->syntax
As the documentation says, `datum->syntax` should use
`datum-intern-literal`. That helps avoid syntax-object mutability, and
it increases sharing in compiled forms. The use of
`datum-intern-literal` got lost when the expander was rewritten in
Racket.

Relevant to #3245
2020-06-25 12:08:46 -06:00
dyb
a958dec07f 16-byte alignment on non-Windows x86
Maintain 16-byte stack alignment (if incoming frames are 16-byte
aligned), because newer versions of gcc count on 16-bit alignment for
some generated SSE instructions.

[This patch is extracted from cisco/ChezScheme#518.
 Merging the rest of that change will take longer.]

original commit: 88d57da163ca287ab37534fd858361a035ce7e4a
2020-06-24 18:54:06 -06:00
Matthew Flatt
27fd176968 cs: fix mutability check on prefab auto fields
Also, fix the error message for misuse of a mutator.
2020-06-24 06:19:31 -06:00
Gustavo Massaccesi
7578e8e083 fix typos in guide 2020-06-23 18:21:41 -03:00
Matthew Flatt
d9293df780 raco pkg config: warn about irrelevant default-scope
The default package scope is determined by consulting the user-scope
configuration, then falling back to the installation-scope
configuration, then defaulting to user.

So, if you have a user-scope configuration of `default-scope`, it
doesn't matter what the configuration says in other scopes, which
means that the output of `raco pkg config` can be confusing. Extra
output in this commit is intended to make it less confusing.

Probably the original mistake here was allowing `default-scope` at a
scope-specific layer, instead of having it just as an installation
configuration (like `name`).
2020-06-23 10:29:51 -06:00
Michael Ballantyne
a17621bec9
Force expression context for local and block
* Document liberal-defines? argument of generate-expand-context

* Add make-expression-transformer

* Ensure `block` expands in an expression context

Also refactors block to depend on racket/base and syntax/ modules rather
than private pre-base dependencies so it can use
`make-expression-transformer` and `generate-expand-context`.

* Ensure `local` expands in an expression context

* Add macro.rktl tests for block and local
2020-06-23 10:29:44 -06:00
Sam Tobin-Hochstadt
aafdafb1cf Copy fewer props in class forms that expand to macros.
Revises cd996c3b6c (see #3240) to only copy the neccessary
properties. Copying all properties interfes with Typed Racket's
class system parsing.
2020-06-23 09:20:28 -04:00
Matthew Flatt
9bdc112b4d ppc32: fix icache flush
original commit: d9bf4ebbc5fe32a1d3d35ba096a54e7b78d1f33c
2020-06-22 17:35:47 -06:00
Matthew Flatt
d175f4c626 reference: fix backquote rendering
Drop a broken workaround and rely on a Scribble repair.

Closes #3259
2020-06-22 08:19:06 -06:00
Matthew Flatt
7811a2edbb cs: fix io _uintptr bbinding for rktio and 32-bit platforms
Little-endian byte order hides this mistake, but it showed up
immediate on big-endian ppc32.
2020-06-21 06:45:29 -06:00
Matthew Flatt
9ad7ed82c2 cs: fix embedded-bootfile offset for big-endian ppc32 2020-06-21 06:45:29 -06:00
Matthew Flatt
037cf20eb2 rktio: enable ANSI escapes for Windows console output
Closes #3249
2020-06-21 06:45:29 -06:00
Alexis King
dc007a8502 setup: Don’t count main docs as user docs when tidying 2020-06-21 06:45:18 -06:00
Matthew Flatt
e0a60ac950 ppc32: add missing step in double->single floating-point conversion
original commit: 62a8fbe33a3fecdad1701e3ec196dcf032a777c4
2020-06-20 08:54:15 -06:00
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