Commit Graph

42299 Commits

Author SHA1 Message Date
Matthew Flatt
3bb607d46f makefile: fix location of 3m arm assembly output 2020-06-29 18:43:53 -06:00
Robby Findler
ced16f6868 tweak history description 2020-06-29 19:37:32 -05:00
Sorawee Porncharoenwase
ee773b2835 Fix contract-out for struct
- A part of contract-out's code generation for struct assumes that
there's no parent struct and uses the provided struct name for
everything. This causes duplicate definitions when there are duplicate
field names where one is in a child struct and another is
in a parent struct. This PR fixes the problem.
- Disallow multiple #:omit-constructor
- Deprecate super-id. This information is unnecessary since we can
extract it from static struct information already. Attempting to
check that super-id is well-formed is error-prone due to how
the super struct type could be contracted which shields us from
detecting that they are indeed the super type.
- Utilize static struct field name information, and provide
the information when exporting a struct.

This PR is largely based on #732.

Fixes: #3266, #3269, #3271, and #3272
2020-06-29 19:35:19 -05:00
Matthew Flatt
b9770f6869 cs: remove outdated porting note 2020-06-29 16:49:20 -06:00
Matthew Flatt
b00e8415b7 cs: check memory limit in make-phantom-bytes 2020-06-29 16:49:20 -06:00
Matthew Flatt
9e74f2d6c8 test: avoid too-large number on 32-bit CS 2020-06-29 16:49:20 -06:00
Matthew Flatt
a0a0d2f883 reference add history note for prop:struct-field-info 2020-06-29 16:49:20 -06:00
Matthew Flatt
42c4a90e7c repair for arm32 foreign callables
Especially fix problems with `__collect_safe`, but also deallocate
stack space for `&` returns.

original commit: b593b0f14e7a803d8e089f49e266194245504197
2020-06-29 16:46:53 -06:00
Sam Tobin-Hochstadt
7f44aaf2bf io: format error message fixes. 2020-06-29 16:10:30 -04:00
Matthew Flatt
0af11de62b ffi: another spurious CAS accommodation
Also adjust the futures test suite.
2020-06-29 12:45:14 -06:00
sorawee
dff6259ff0
Add prop:struct-field-info
This commit adds `prop:struct-field-info` which is implemented to provide
static information about field names. The property is attached to all
struct types generated by `define-struct`.

The commit also modifies kernstructs to have the property.
Finally, the commit switches `struct-copy` to use the static field name
information when it's available.

It remains to change `contract-out` and `match`'s `struct*` to
recognize/attach this new property, but this could be done
separately in the future.

This PR is largely based on racket/racket#732, though the approach is slightly
different.
2020-06-29 11:06:38 -06:00
Matthew Flatt
1118705bef cs & threads: another spurious-CAS-failure accomodation 2020-06-29 10:11:10 -06:00
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