Commit Graph

42440 Commits

Author SHA1 Message Date
Matthew Flatt
f7f75fa901 avoid compiler warning 2020-05-21 10:00:25 -06:00
Paulo Matos
469e8186b3 Replace build dependency g++ by clang in docker image 2020-05-21 17:27:25 +02:00
Paulo Matos
62c9a79c68
Use threaded time functions (#3199) 2020-05-21 15:45:22 +02:00
Matthew Flatt
08d4698934 cs-bootstrap: additions to work on latest Chez Scheme 2020-05-20 10:46:57 -06:00
Matthew Flatt
9ba5fd6a0f cs: fix issues with source->sfd cache
The cache wasn't kill-safe, and probably a weak cache could also lead
to non-determinism of source-path sharing across submodules.

Related to #3193
2020-05-20 08:29:56 -06:00
Matthew Flatt
07d3f3a2ec cs: faster number->string on flonums 2020-05-20 06:31:02 -06:00
Matthew Flatt
c5ee80bf0d adjust flonum printing to be more like %g
Adjust the choice between exponential and not.

Closes racket/racket#3195

original commit: 3a71e6fb6240d1c9e206064a613835c6eea871aa
2020-05-20 06:21:39 -06:00
Paulo Matos
43c8876643 Add procps to test dependencies
`ps` is required by subprocess.rktl test library.
`ps` is found in `procps`, so we install it.

This should move #3134 forward.
2020-05-20 11:44:40 +02:00
Matthew Flatt
91f8d8a72f expander: fix intering of some module path indexes for ".zo"
Two "self" module path indexes are treated the same on load when they
have the same resolved module name. Fix the serialization intern table
to take that into account and avoid some GC-based non-deterministism.

Related to #3165
2020-05-19 16:49:26 -06:00
Matthew Flatt
12bc1b3841 expander: adjust module-path-index cache implementation
Change the implementation to one that is a simpler and slightly more
effective.
2020-05-19 16:49:26 -06:00
Matthew Flatt
b7908e97a1 cs makefile: refine handling of file permissions
On a second look, 6d06086dad unnecessarily duplicates work already don
by `copy-file` in most cases. For the case where `copy-file` was not
used, there was code to explicitly set an executable bit, but the new
approach is better and should be used just there.
2020-05-19 16:49:26 -06:00
Matthew Flatt
b6c5515efa cs: faster write-char on ASCII 2020-05-19 09:54:52 -06:00
Matthew Flatt
1655b6e2bb ffi/unsafe: match i, o, or io as symbols
Changes `_ptr`, `_list`, and `_vector` syntax to be more permissive.
Matching by symbol rather than binding is usually the wrong choice,
but the position where `i`, `o`, or `io` is recognized in `_ptr` and
company is not an expression position. Also, `i`, `o`, and `io` are
not otherwise bound. So, it's difficult to justify the current
behavior. If `_ptr` and company were defined today, we'd use keywords
like `#:i` instead of symbols like `i`.

A potential drawback of this change is that a `i`, `o`, or `io` might
be written with the intent of referring to a binding, and this change
makes such a reference silently allwowed instead of an errror. That
seems relatively unlikely, however, while having to avoid `i`, `o`, or
`io` as a binding is occassionally a pain --- something I've run into
once or maybe twice.

Closes #887
2020-05-19 09:54:52 -06:00
Matthew Flatt
6d06086dad cs makefile: preserve permissions when embedding boot files
Closes #3192
2020-05-19 09:54:52 -06:00
Matthew Butterick
e8e3b61547
Docs: update link to Objective-C runtime 2020-05-19 08:28:06 -07:00
Matthew Flatt
2988917f03 cs: send immutable byte strings to custom output ports
Related to #2726
2020-05-18 17:45:14 -06:00
Matthew Flatt
61b365f4be add unsafe-X->immutable-X! for vectors, strings, and byte strings
Follows up on an idea by @gus-massa in #1219, because this will be
useful to fix a problem with Racket CS I/O.
2020-05-18 17:41:40 -06:00
Matthew Flatt
a820e425d6 cp0: don't drop 'ignored if with multiple values
Closes racket/racket#3092

original commit: 9e928cf79caf536744491e6889e5c71bcd14c264
2020-05-18 16:00:49 -06:00
Paulo Matos
a8b3c8b608 Add further archs for testing (#24)
Add testing for non-threaded x86_64, and i386 versions and remove references to travis_fold directives in testing.

original commit: 441cdb166081e96eaecd513d5f13a8796fd451b4
2020-05-18 13:19:46 +02:00
Matthew Flatt
0f4a947bab bc: add stack-overflow checking in part of the optimzier
Related to #3190
2020-05-15 14:51:17 -06:00
Matthew Flatt
605ae48f24 fix portability of some tests
original commit: 5b14f79d4d513b1d093084d55e3926f58e71eda8
2020-05-15 14:41:28 -06:00
Matthew Flatt
a106c50798 gc repairs
* Fix calculation of segment index for 32-bit platforms

 * Fix allocation of mark-bit and list-bit arrays in certain unusual
   cases.

 * Fix dirty sweep of records on marked pages that have non-pointer
   fields.

 * Fix allocation of eveen-sized immobile vectors; a pad word needs to
   be cleared.

 * Fix and extend the heap checker (which was used to find several of
   the other problems).

original commit: 8b5e65f5eafac5aea7394901e1dd2f2fc3ccf2bd
2020-05-15 14:40:55 -06:00
Matthew Flatt
96616baa47 unbreak non-threaded build
original commit: c077acf7dd65bcb397e846c786ac546888b5798a
2020-05-15 07:19:51 -06:00
Matthew Flatt
2f22a5638d windows: finer granularity for sleep
The Windows scheduler tends to work on 16ms bounaries, which
is not good for sleeping (as part of an animation, say) for
times near or less than 16ms. Change rktio to request more
fine-grained scheduling temporarily when trying to sleep for
a short time.
2020-05-15 06:57:33 -06:00
Matthew Flatt
c754bd851e cs: fix DESTDIR install
Closes #3189
2020-05-14 19:13:19 -06:00
Matthew Flatt
90e708d78e force: avoid double promise-forcer test 2020-05-14 19:12:52 -06:00
Matthew Flatt
272271f36f cs: cache object-name for procedures
Extracting the name from a procedure involves `string->symbol` and
possibly some string parsing. Map the code object to the result
symbol to speed up multiple requests for the same code object.
2020-05-14 19:11:23 -06:00
Sam Tobin-Hochstadt
f5f2cd9345 Improve error message for disallowed links. 2020-05-14 10:48:59 -04:00
NoahStoryM
b5660ce0dc Fix bug.
(begin (set! x (cons 'ctc x)) any/c)
should be evaluated whenever `f' is called. If there isn't an arg list (), it would only be evaluated 1 time.

https://github.com/racket/racket/issues/2711
2020-05-14 09:04:56 -04:00
Sam Tobin-Hochstadt
dfa86ebdee Mark a few more simple expressions as immediate-default?.
This reduces the number of `unsafe-undefined` uses in the flattened
expander by about 10% (682 -> 611).
2020-05-13 23:48:28 -04:00
Ben Greenman
84f9126f77
class-internal: avoid wrapping "immediate" opt/kw defaults (#3182)
When expanding a method definition, do not wrap the default expression
 for optional and keyword args if it matches `immediate-default?`
2020-05-13 18:02:40 -04:00
Sam Tobin-Hochstadt
e8202b7fa3 Change tanh to produce inexact values when approximating near 0.
Since the approximation is that (tanh x) = x for small x, previously
(tanh 1/10000000000000000000) produced an `exact?` answer, even though
this is an approximation.

Found by Typed Racket random testing:
http://drdr.racket-lang.org/54493/racket/share/pkgs/typed-racket-test/tr-random-testing.rkt
2020-05-13 16:11:49 -04:00
Paulo Matos
8859d6596a
Add future tests to CI (#3175)
We added these before but noticed CGC issues so we had to revert it to fix those. 
Future tests added again but a few of them disabled for CGC.
2020-05-13 09:23:42 +02:00
Matthew Flatt
beeb98e0c8 bc: fix optimizer bug related to with-continuation-mark
Uncovered by random testing via the delimited-control Redex model.
2020-05-12 15:58:49 -06:00
Paulo Matos
8ff7b4cc86
Ensure that the GMP ARM extra file has the correct extension (#3178)
* Ensure that the GMP ARM extra file has the correct extension

We hardcoded in some places the extension of the GMP ARM extra file
with .o, however the Makefile rule to build the file will use .lo is
--enable-shared is enabled. This commit fixes the discrepancy by not
hardcoding the extension anywhere.

Fixes #3176

* Avoid gnu make extension

* Replace spaces to conform with other lines

* Ensure we only add extension if file is needed

* Move the LTO definition to the configure.ac

* Carry the LTO variable into the Makefile

* Fix variable reference

* Add variable definition to gc2 Makefile

* annotate assignment
2020-05-12 21:04:59 +02:00
Matthew Flatt
03c978d2e8 expander: avoid race condition on syntax-e
Concurrent lazy scope propagation had a (very unlikely) race condition
updating a syntax object. Ryan pointed out this problem as part of the
discussion for #3162.

Switch to using a single field for a syntax object's content and
propagations, so a CAS can be used to update the field. As a pleasant
side effect, this change tends to make syntax objects more compact.
2020-05-12 13:04:17 -06:00
Matthew Flatt
761c577479 cgc: repair for fsemaphore-wait 2020-05-11 12:41:12 -06:00
Matthew Flatt
9ab5ba0fbc cs: fix interaction of places and 'GC log receivers
Related to #3174
2020-05-11 10:15:17 -06:00
Ben Greenman
0e6415899b doc: typo, '(failure-result/c any/c)' -> 'failure-result/c'
Both the implementation and docs for failure-result/c agree
 that it does not take a parameter:

- https://github.com/racket/racket/blob/master/racket/collects/racket/contract/base.rkt#L157
- https://github.com/racket/racket/blob/master/pkgs/racket-doc/scribblings/reference/contracts.scrbl#L3634

Thanks to @rfindler for pointing out the mistake
2020-05-10 11:49:03 -04:00
Matthew Flatt
b0e65199fd cs: fix ptr-ref on result of ptr-add
Fix `ptr-ref` to properly handle the offset in a pointer for
specialized references, like extracting ` _double`.

Thanks to Laurent Orseau for the bug report and Jens Axel Søgaard for
intial debugging.
2020-05-10 07:01:49 -06:00
Matthew Flatt
e301d3061d another simplification suggested by scan-build 2020-05-10 07:01:49 -06:00
Paulo Matos
812107f015 Revert "Add future tests to CI (#3169)"
This reverts commit 2195db7233.
Future tests are timing out. Investigated under #3172.
Will re-commit once fixed.
2020-05-10 10:59:20 +02:00
Sam Tobin-Hochstadt
689118db0b Increase timeout for snapshot build 2020-05-09 21:12:07 -04:00
Matthew Flatt
60bf8f970e simplications suggested by scan-build 2020-05-09 15:10:11 -06:00
Paulo Matos
7fc0dc36d1
Add precise annotations to improve scanbuild (#3170)
This enables `noreturn` attributes which should improve static analysis results.
2020-05-09 23:00:10 +02:00
Sam Tobin-Hochstadt
b476f39f67 Suffix distributions properly 2020-05-09 15:55:08 -04:00
Paulo Matos
2195db7233
Add future tests to CI (#3169) 2020-05-09 21:46:46 +02:00
Matthew Flatt
7a95ff3dd4 bc: fix log-message handling of prefix-message? argument
Closes #3168
2020-05-09 09:39:00 -06:00
Matthew Flatt
fae20b4b89 3m: add missing lock in write barrier
When a future triggers a write barrier, a lock is needed to prevent a
race between the future thread and other threads in the same place (on
most platforms).

Thanks to Dominik Pantůček for tracking down this bug.
2020-05-09 07:43:15 -06:00
Ben Greenman
567fd9e866 style: revert formatting for 2nd textual example
The 2nd example on the page is about end-parethesis position too,
 and cannot use racketmod

sorawee points out, this racketmod behavior is related to:
 https://github.com/racket/racket/issues/3071
2020-05-09 08:19:03 -04:00