Commit Graph

41059 Commits

Author SHA1 Message Date
Matthew Flatt
e0f390c8c8 syntax/strip-context: handle hash tables
Closes racket/scribble#245
2020-07-02 14:42:18 -06:00
Matthew Flatt
d50d74e458 fixup history note in compile-output-ports
The version drifted to 7.7.0.10 before I managed to merge the PR.
2020-07-02 14:15:22 -06:00
Luka Hadzi-Djokic
8464896255
Add combine-output-ports 2020-07-02 14:14:48 -06:00
Matthew Flatt
c40a7ae2fc cs: limit debugging context in continuation marks
In CS, if you interrupt an especially tight non-tail recursion, such
as

 (let loop ()
   (cons 1 (loop)))

then the "context" view of the continuation (as recorded in a
continuation mark set) can take space that is a multiple of the size
of the continuation itself. That's a particular problem if the
too-deep recursion triggers the memory limit in DrRacket, because
DrRacket will then need a multiple of its current heap space to report
"out of memory".

(Note: Just keeping the continuation itself is not a good option,
because that may retain other data referenced by the continuation.)

This commit reduces the heap space used to gather a continuation
context, relying in part on new Chez Scheme support, but mostly it
limits the context length to roughly the same maximum as in BC. The BC
limit is an implementation artifact, but it turns out to have good
properties; informaiton on more than 64k continuation frames is rarely
useful. The limit could be a parameter, but a large built-in limit
seems likely good enough.

(Another note: Adding a limit argument to
`continuation-mark-set->context` doesn't help enough, because it's too
late by that point; too much memory has been used to repersent the
information that's in the mark set.)

The commit also tightens tracking of continuations for memory
accounting, reducing the chance that a thread's large continuation
will be charged to the wrong custodian.
2020-07-02 10:59:02 -06:00
Matthew Flatt
7c7f16ba02 bc: system-library-subpath for aarch64-linux 2020-07-02 08:50:56 -06:00
kryptine
4e1646fea8 Synchronize .github/CONTRIBUTING.md with README.md.
samth said "I don't think the Friendly Environment policy should be thought of as part of copyright issues, or applying only to people who contribute code. Is there a different phrasing that would accomplish what you want here?" I have rephrased the reference to the Friendly Environment Policy and moved it before the License section to avoid confusion with copyright issues.
2020-07-01 22:43:30 -04:00
kryptine
9f8d283e48 Remove top-level CONTRIBUTING.md 2020-07-01 22:43:30 -04:00
kryptine
5e4feed5b8 Add link to the Friendly Environment Policy 2020-07-01 22:43:30 -04:00
kryptine
d9b3645117 Add links to CONTRIBUTING.md 2020-07-01 22:43:30 -04:00
kryptine
29434fec6a Remove unnecessary reference to the FEP 2020-07-01 22:43:30 -04:00
kryptine
7fbb0bbbe3 Information for contributors and information for users should be put into separate files. Also, rephrased reference to the Friendly Environment Policy 2020-07-01 22:43:30 -04:00
kryptine
0e651dc5d7 Move out-of-context reference to the Friendly Environment Policy to the right section 2020-07-01 22:43:30 -04:00
Sam Tobin-Hochstadt
33498730ed Look at uploaded files. 2020-07-01 13:37:21 -04:00
Bogdan Popa
96c93abe7f rktio: fix demo.c compilation errors 2020-07-01 06:10:54 -06:00
Sam Tobin-Hochstadt
5951c81f28
Fix scanbuild syntax error. 2020-06-30 14:49:40 -04:00
Sam Tobin-Hochstadt
45b97dba80
Upload LLVM scan-build results to GitHub 2020-06-30 14:33:43 -04:00
Sam Tobin-Hochstadt
4bcaef330d
Set up GitHub CodeQL analysis 2020-06-30 12:07:19 -04:00
Matthew Flatt
c0a525db60 bc: repair --enable-shared install
Don't try to install librktio.a when building in shared-library mode.
2020-06-30 07:40:29 -06:00
Matthew Flatt
d008d60e23 test repair
This change was meant to be par tof b00e8415b7.
2020-06-30 07:27:40 -06:00
Matthew Flatt
193850f7dc reference: fix verison in history note 2020-06-29 18:43:53 -06:00
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
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
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
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