Commit Graph

40883 Commits

Author SHA1 Message Date
Matthew Flatt
4e2fef3557 rename ".scm" files not meant to be compiled 2019-09-25 07:42:49 -06:00
Paulo Matos
3a46e41cde
Disable test many-vectors-in-reasonable-space? for cgc (#2832)
This is currently failing in cgc:
     https://gitlab.com/racket/racket/-/jobs/303266624
2019-09-25 14:47:46 +02:00
Matthew Flatt
6d7ae5e1d2 racket-benchmarks: some microbenchmarks for continuations. etc. 2019-09-25 06:45:36 -06:00
Matthew Flatt
b1a6baffc6 configure: add --enable-sdk9 2019-09-25 06:45:36 -06:00
Sam Tobin-Hochstadt
920d3ce51e Check that => is followed by an identifier in match clauses.
Closes #2830.
2019-09-24 15:45:19 -04:00
Matthew Flatt
00969092c8 avoid C compiler warniing when not MZ_PRECISE_RETURN_SPEC
Follow-up to 3a512a2a60, where we need a `return` statement
back to avoid a wanring from some compilers.
2019-09-22 17:51:10 -06:00
Matthew Flatt
5fea629cea cs: tune parameterization lookup 2019-09-22 16:10:03 -06:00
Matthew Flatt
e147a96843 simpler current-parameterization
An `extend-parameterization` call with no extra arguments used to
adjust a parameterization, but it has no effect anymore, so drop it.
2019-09-22 13:46:17 -06:00
Matthew Flatt
97c552e87b cs: tune thread-cell implementation
Speed up thread-cell access and make update safe for futures.
2019-09-22 11:08:46 -06:00
Matthew Flatt
b5e145c755 cs: tune continuation-mark lookup 2019-09-21 10:08:03 -06:00
Matthew Flatt
c0c628e721 cs: fix inline of call-with-immediate-continuation-mark 2019-09-21 07:14:18 -06:00
Matthew Flatt
b7dc3f4bda schemify: repair with-continuation-mark optimizations
Repairs a bug in 7d725ab48b.
2019-09-20 16:48:52 -06:00
Matthew Flatt
7d725ab48b schemify: optimize with-continuation-marks
Prune some `with-continuation-marks` forms that aren't observable
(because the body is simple enough that it won't inspect marks). More
significantly, specialize `with-continuation-marks` forms to indicate
when the current frame is known to have no marks and to indicate
when tthe key expression is known to produce a non-impersonator.
2019-09-20 11:20:23 -06:00
Sam Tobin-Hochstadt
7ae4943a57 Adjust .mailmap.
Closes #2824.
2019-09-20 12:57:42 -04:00
Matthew Flatt
5be9ee424c cs: use #3%$app for #%app
Since `#%app` (used where an applicable structure might show up)
injects its own `procedure?` test and makes sure that that a procedure
is returned to the function position of the application, use `#3%$app`
to make Chez Scheme suppress a redundant `procedure?` check for the
appliction.
2019-09-19 07:29:16 -06:00
Matthew Flatt
d02fbebba8 schemify: improve handling for mutated, known-initialized variables
Avoid unnecessary checks for an "undefined" state.
2019-09-19 07:29:16 -06:00
Paulo Matos
f0a0ffc50d
Add support for MSVC2019 (#2827) 2019-09-19 15:27:12 +02:00
Matthew Flatt
2b567b4488 cs & thread: avoid counting a descheduled thread as "no progress"
It's not clear that a thread can be descheduled without the current
thread's work counting as progress, but a descheduled thread certainly
shouldn't coun as a no-progress scheduled thread.
2019-09-18 14:03:20 -06:00
Matthew Flatt
19efcb955d cs & io: avoid spinning if epoll/kqueue setup fails 2019-09-18 14:03:20 -06:00
Matthew Flatt
ec72f5df45 cs & thread: avoid accumulating post-atomic callbacks
Only one instance of each callback is needed. Allowing them to pile up
is inefficient, and possibly it can trigger a reaction that causes
even more to pile up.
2019-09-18 14:03:20 -06:00
Ryan Culpepper
b86ca89102 fix error message 2019-09-18 11:29:54 +02:00
Ryan Culpepper
375a4837c7 format-id: add #:subs? option for sub-range-binders
inspired by #2624 by @lexi-lambda
2019-09-18 11:29:54 +02:00
Gustavo Massaccesi
3907f35d1d fix error of malformed in-values in a for clause
(for ([x (in-value 1 2)]) x)

should raises a run time error, not a syntax error.

Fix similar error in other in-something macros.

Fix name of in-directory, when used as a function outside a for.
2019-09-17 11:52:41 -03:00
Paulo Matos
3a512a2a60
Enable MZ_NORETURN annotation only if MZ_PRECISE_RETURN_SPEC is defined (#2823)
Unfortunately, MZ_NORETURN spec is causing a few problems - see #2808
It would be great to fix these but due to lack of time, this is a
workaround that should keep things working until all supported
configurations accept MZ_NORETURN properly.
2019-09-17 08:36:04 +02:00
Robby Findler
f61efeaf80 edit ->i docs along the lines of the discussion in #2822 2019-09-15 17:50:33 -05:00
Ben Greenman
17c424b553
typo: 'specifcation' -> 'specification' 2019-09-14 17:22:08 -04:00
Matthew Flatt
4e07c20afe cs: improve Chez Scheme version check
Use the new `scheme-fork-version-number` function to make sure
the build uses the latest.
2019-09-13 07:32:07 -06:00
Ben Greenman
a5448f112d for/stream: delay finding first element
Fixes #2812
2019-09-12 14:18:16 -05:00
Matthew Flatt
72852c7b75 cs: use call-consuming-continuation-attachment
Use `call-consuming-continuation-attachment` to implement
`with-continuation-marks`, because that avoids duplicating
a set of checks when in tail position.
2019-09-11 17:21:25 -06:00
Matthew Flatt
5bcf7eb19d cs: fix optiimizer arity for make-parameter
Should have been part of 91d702c6fe.
2019-09-08 17:58:34 -06:00
Matthew Flatt
2403b18e0f cs: more constant tokens
Should have been part of 12a2cd75a8.
2019-09-08 17:57:10 -06:00
Alexis King
415f030212 Fix syntax-local-value[/immediate] rename transformer context
fixes #2815
2019-09-08 14:56:43 -05:00
Matthew Flatt
866c5d41e0 cs: unbreak Windows build 2019-09-08 07:24:49 -06:00
Matthew Flatt
f4fa74e6f2 expander: fix reader bug
Fix incorrect comparison of character to EOF. There's a test, already,
but the test fails only if the expander is compiled in safe mode.
2019-09-06 17:35:54 -06:00
Matthew Flatt
4c630a2442 sync bootstrapped expander
Update expander embedded in traditional Racket to pick up
the parameter names added in 5147771b04.
2019-09-06 17:35:54 -06:00
Matthew Flatt
3024b77ba5 add custodian-based unloading of foreign libraries
Specificially, add a `#:custodian` argument to `ffi-lib`.
2019-09-06 17:35:54 -06:00
Matthew Flatt
276a102d6a add ffi-lib-unload at the #%foreign level 2019-09-06 17:35:54 -06:00
Sam Tobin-Hochstadt
5147771b04 Name more internally-defined parameters and std library parameters. 2019-09-06 11:54:22 -04:00
Paulo Matos
a5abfa9a0d
Fix typo 2019-09-06 08:35:28 +02:00
Matthew Flatt
8bb41e590d cs: yet another try at the major-GC heuristic
Looking at `bytes-allocated` usually works, but sometimes lets
memory use spiral out of control. Looking at `current-memory-bytes`
is more reliable, but still makes peak memoy use too high.
Combining those values doesn't limit the peak well enough.
Try the more obvious (in retrospect) approach of comparing
`bytes-allocated` changes and `current-memory-bytes` changes
separately, and triggering a GC if either grows enough.
2019-09-05 20:14:31 -06:00
Matthew Flatt
12a2cd75a8 cs: constant tokens
Instead of allocating tokens like `undefined` or `parameter-key`
with `gensym` on startup, allocate them once for all eternity.
2019-09-05 11:13:41 -06:00
Matthew Flatt
8284dfa1b1 cs: add names for primitive parameters 2019-09-05 08:22:49 -06:00
Matthew Flatt
1f2342b57a cs: adjust trigger major GC
Commit 1811193285 caused Racket CS to have much higher peak memory
use. Adjust the heuristic again to trigger a major GC when the
`current-memory-bytes` value is the post-GC `bytes-allocated` plus the
post-GC `current-memory-bytes`, which means waiting until
another `bytes-allocated` bytes are allocated (instead of waiting
until the number of newly allocated bytes also catches up to overhead,
such as unserused pages due to locked objects).
2019-09-05 08:22:49 -06:00
Matthew Flatt
91d702c6fe add name argument to make-parameter 2019-09-05 08:22:49 -06:00
Matthew Flatt
cccaf4e46e cs: change representation of parameters
Implement a parameter as a Chez Scheme wrapper procedure,
instead of an applicable record. A wrapper procedure can be
applied more directly, saving 10-20% of the time for some
parameter lookups.
2019-09-05 08:22:49 -06:00
Paulo Matos
8c049d914e
Remove definitions for __LITTLE_ENDIAN, __BIG_ENDIAN, and __BYTE_ORDER (#2807)
These are already defined in /usr/include/endian.h for all tested configurations
Related to #2797
2019-09-04 19:32:02 +02:00
Matthew Flatt
36e00806de io: fix call to raise-arguments-error 2019-09-03 18:47:44 -06:00
Matthew Flatt
88464b327a ffi doc: make-wrap-<id> binding from define-cstruct
When `#:property` is used wih `(define-cstruct _<id> ....)`, then
`make-wrap-<id>` is among the defined identifiers.
2019-09-03 18:47:44 -06:00
Jon Zeppieri
b0d753e2d6 Implements negated unicode categories in pregexps
The grammar for pregexps includes:

   | \p{‹property›} Match (UTF-8 encoded) in ‹property›
   | \P{‹property›} Match (UTF-8 encoded) not in ‹property›

and <property> is defined as:

   ‹property› ::= ‹category› Includes all characters in ‹category›
               |  ^‹category› Includes all characters not in ‹category›

That is to say, there are two independent ways to negate one of
these character classes. The Racket implementation of regexps
(as opposed to the C implementation) does not recognize negated
categories. This PR fixes that.
2019-09-03 18:47:33 -06:00
Matthew Flatt
9fa6e9e25d repair GC problem with 'atomic-interior / 'interior
Some parts of the GC meant to traverse all objects on a page of
'atomic-interior or 'interior objects used "<" to detect the end of
the page, but "<=" was needed. As a result, things could sometimes go
wrong for the last object on a page for platform and size combinations
where the last object ends exactly at the end of the page.

This change consistenly computes the iteration end in a way that makes
both "<" and "<=" work.

Using MPFR bindings from the `math` library could trigger a problem
(but it's difficult to provoke the problem in a reasonably small
example --- difficult enough that I couldn't do it).
2019-08-30 12:25:32 -06:00