Commit Graph

42958 Commits

Author SHA1 Message Date
Matthew Flatt
c084ead2f3 Chez Scheme: fix continuation-attachments compilation
On AArch{32,64}, compiling `call-setting-continuation-attachment` in a
non-tail position could run out of registers for saving/restoring
around th intrinsic to reify the continuation.

Closes #3646
2021-01-23 06:35:48 -07:00
Matthew Flatt
be42b9a24a Chez Scheme: always disable X11 support on Mac OS 2021-01-22 09:35:59 -07:00
Matthew Flatt
9c8d7b3ebf bump version for Chez Scheme sync
After pulling in patches that change the Chez Scheme version to 9.5.5
(with not much changing besides the version, since we've pulled other
patches), update the Racket version number to reflect the change to
compiled files.
2021-01-22 08:47:16 -07:00
Bob Burger
53dcd3c439 update release notes 2021-01-22 08:36:06 -07:00
dyb
2613740431 9.5.5 changes: - updated version to 9.5.5 BUILDING NOTICE makefiles/Mf-install.in scheme.1.in c/Makefile.a6nt c/Makefile.i3nt c/Makefile.ta6nt c/Makefile.ti3nt mats/Mf-a6nt mats/Mf-i3nt mats/Mf-ta6nt mats/Mf-ti3nt workarea c/scheme.rc s/cmacros.ss release_notes/release_notes.stex csug/copyright.stex csug/csug.stex bintar/Makefile rpm/Makefile pkg/Makefile wininstall/Makefile wininstall/a6nt.wxs wininstall/i3nt.wxs wininstall/ta6nt.wxs wininstall/ti3nt.wxs - newrelease no longer logs as updated files with no actual changes newrelease 2021-01-22 08:36:03 -07:00
dyb
6c1d6b49dc updated version to 9.5.4 BUILDING NOTICE makefiles/Mf-install.in makefiles/Makefile-csug.in scheme.1.in c/Makefile.a6nt c/Makefile.i3nt c/Makefile.ta6nt c/Makefile.ti3nt mats/Mf-a6nt mats/Mf-i3nt mats/Mf-ta6nt mats/Mf-ti3nt workarea c/scheme.rc s/7.ss s/cmacros.ss release_notes/release_notes.stex csug/copyright.stex csug/csug.stex bintar/Makefile rpm/Makefile pkg/Makefile wininstall/Makefile wininstall/a6nt.wxs wininstall/i3nt.wxs wininstall/ta6nt.wxs wininstall/ti3nt.wxs 2021-01-22 08:35:47 -07:00
dyb
aa2208eb04 fixed S_condition_wait Y2038 bug; rounding ns to ms on Windows - now using 64-bit arithmetic for seconds in S_condition_wait to prevent a potential 2038 bug, at least on platforms where time_t is 64 bits. also now rounding rather than truncating nanoseconds in the coversion to milliseconds on Windows. thread.c 2021-01-22 08:35:37 -07:00
Matthew Flatt
13ee990165 rktboot: adjust for newer nanopass 2021-01-22 08:35:29 -07:00
dyb
416a6790c3 added textual-output-port checks for record-writer write argument print.ss, record.ms, root-experr* 2021-01-22 08:35:20 -07:00
Jarhmander
14a685af77 use Unicode for Windows error messages (#521) 2021-01-22 08:35:09 -07:00
Jarhmander
f74a9dea56 use lowercase winbase.h for Windows (#520) 2021-01-22 08:35:02 -07:00
Matthew Flatt
e4518f662d allow #f argument to continuation-mark-set->{list[*],iterator}
There's a small performance advantage in avoiding a call to
`(current-continuation-marks)`. CS already allowed #f, but did not
handle it correctly.
2021-01-20 07:44:11 -07:00
sorawee
9957cdeec1
doc: fix unbalanced braces and merge excessive history elements 2021-01-19 07:01:16 -07:00
Sorawee Porncharoenwase
317eaabee4 doc: correct @history of hash-intersect
By the time the PR was merged, the version is 7.9.0.1.
2021-01-19 06:59:04 -07:00
sorawee
72496127d4 doc: fix typo 2021-01-19 06:59:04 -07:00
Sorawee Porncharoenwase
ab6055d909 doc: fix usage of @racket in shared 2021-01-19 06:57:16 -07:00
Bogdan Popa
351c0047d6 ci: build CS for iOS during PR CI 2021-01-19 07:08:27 -05:00
Matthew Flatt
08fa24304e setup/dirs docs: clarify what user-specific paths depend on 2021-01-18 14:38:58 -07:00
Matthew Flatt
3ca0799714 cs: fix system.rktd 'link entry on Unix 2021-01-18 08:21:45 -07:00
Bogdan Popa
6b0b3e0a1e
ios: constrain recent allocation segments generation, fix for tarm64->tarm64 cross-compilation
Includes new `force-host-out?' arg to `compile-to-file'.
When the host and target machines match during
"cross"-compilation (eg. M1 Mac to iOS), we still need to generate
host .so files so that the build works out.
2021-01-18 07:53:54 -07:00
Bogdan Popa
764b552ac5 bc: fix build for iOS
`MAP_JIT' is available but does not work and `pthread_jit_write_protect_np'
is not available at all on iOS.
2021-01-18 07:50:37 -07:00
Bogdan Popa
c1159fb02e
cs: add support for cross-compiling to iOS
Includes documentation notes about cross-compiling CS for iOS
and makefile improvements.

The changes also include improvements to `raco exe`.
Racket CS cannot currently read fasl files for platforms other than
the host, but `compiler/embed` has to be able to read compiled code in
order to figure out what code needs to be embedded into an output
image and which runtime paths need to be included.  This change makes
it so that host code is used to figure all of that information out,
but that code is then replaced by target machine code before it is
written to the output image. The new logic only applies when the
right cross-compilation flags are set (per `cross-multi-compile?`).
2021-01-17 08:16:02 -07:00
Matthew Flatt
b09e10d066 cs: prevent a future from waiting on a semaphore
A `semaphore-wait` or `semaphore-post` has a shortcut that uses a CAS
operation, which means that a future could affect a semaphore if it's
allowed to take that shortcut. But futures aren't supposed to succeed
in that way, because thread-level synchronization should generally
suspend a future. Disallow the shortcut when in a future.
2021-01-15 16:00:25 -07:00
Matthew Flatt
e56d8c5ded cs: fix make-ctype on converter that accepts extra arguments
Related to #3457
2021-01-15 12:49:54 -07:00
Matthew Flatt
1550179a37 update LICENSE to use "CS" and "BC" 2021-01-15 09:32:59 -07:00
Dominik Pantůček
28105b7be6 net/ftp: ftp-current-directory
* implement ftp-current-directory
* add test for ftp-current-directory
2021-01-13 17:07:30 -05:00
Gustavo Massaccesi
9079d1b3d7 cptypes: fix arity in primitive reduction 2021-01-13 10:46:14 -03:00
Matthew Flatt
c64bf5d961 expander: repair for cross-module inlining during recompilation
When recompiling from machine-independent form to an VM- and
platform-specific form, cross-module inlining could fail due to an
module path index being resolved in the wrong mode (loading versus
non-loading).

As a concrete example, "racket/draw/private/bitmap.rkt" tended to be
recompiled in a way that did not inline `_ubyte` as `_uint8`, which in
turn made `ptr-set!` and `ptr-ref` operations much slower, which would
make certain bitmap operations drastically slower.

Related to racket/drracket#350
2021-01-12 20:15:38 -07:00
Matthew Flatt
7a52e81c33 raco setup: don't count stdout/stderr output as failure
Although compiling modules really should not write output, one problem
is that `parser-tools/yacc` has long reported shift/reduce conflicts
to stderr.

Only parallel mode was treating stdout/stderr output as failure, which
made `raco setup` inconsistent. Make parallel mode allow output, like
sequential mode does.

Related to #3457
2021-01-12 06:46:34 -07:00
Matthew Flatt
36e04fdbcd Racket HISTORY.txt notes for v8.0 2021-01-09 09:53:38 -07:00
John Clements
259f92a5a4 Post-release version for the v8.0 release 2021-01-08 12:40:02 -08:00
Matthew Flatt
1d0fd9c40b cs & thread: fix thread termination with pending timeout callback
In other words, follow a note on line 77 of "atomic.rkt":

     ;; There's a small chance that `end-atomic-callback`
     ;; was set by the scheduler after the check and
     ;; before we exit atomic mode. Make sure that rare
     ;; possibility remains ok.

That note was originally written in the context of changes for
futures, but it also applies to plain old thread scheduling, where
`engine-timeout` can be installed as a callback, but it's not allowed
if an engine isn't running.
2021-01-08 13:23:19 -07:00
Matthew Flatt
f347fe299a cs & io: fix atomic-mode step in sync/enable-break 2021-01-08 13:23:19 -07:00
Sorawee Porncharoenwase
a5744bec62 doc: bump the version added to 7.9.0.22 2021-01-07 17:32:25 +01:00
Sorawee Porncharoenwase
c81b628282 Rename define-simple-macro to define-syntax-parse-rule
This PR is based on @lexi-lambda's #1310.
It resolves the conflicts in the mentioned PR and
adjusts the version so that it's up-to-date.
2021-01-07 17:32:25 +01:00
Sorawee Porncharoenwase
587cff468e doc: elaborate the behavior of datum->syntax 2021-01-07 11:10:46 -05:00
Sorawee Porncharoenwase
5ee0f73957 further simplification 2021-01-07 09:52:16 -05:00
Sorawee Porncharoenwase
64067704bc reduce unnecessary vector-ref 2021-01-07 09:52:16 -05:00
Sorawee Porncharoenwase
6ace62a717 list: optimize in-combinations and combinations
This PR in a sense reverts f83cec1b04 and attempts to directly fix
the bug that the commit tries to address with an approach similar to the
original one.

The problem with the aforementioned commit is that, Gosper's hack
only works efficiently when the length of `l` is small enough that
the number representation can fit into a fixnum
(so that all bit operations take constant time).
When the length of `l` is large, the number representation could
become a bignum with length proportional to the length of `l`.
This is not ideal because it causes the time complexity of the algorithm
to be `O({|l| choose k} |l|)` instead of `O({|l| choose k} k)`, which
would be a significant performance degradation when `|l|` is much
larger than `k`.
2021-01-07 09:52:16 -05:00
sorawee
d40c4d31c7
bc and cs: make srcloc->string compatible
Currently, in Racket BC, the following program:

```
(srcloc->string (make-srcloc "x.rkt" #f #f 90 #f))
(srcloc->string (make-srcloc "x.rkt" #f 80 #f #f))
(srcloc->string (make-srcloc "x.rkt" #f #f #f #f))

(srcloc->string (make-srcloc "x.rkt" #f 80 90 #f))
(srcloc->string (make-srcloc "x.rkt" 70 #f 90 #f))
(srcloc->string (make-srcloc "x.rkt" 70 80 #f #f))
(srcloc->string (make-srcloc "x.rkt" 70 80 90 #f))
```

results in:

```
"x.rkt::90"
"x.rkt::80"
"x.rkt::-1"
"x.rkt::80"
"x.rkt:70:90"
"x.rkt:70:80"
"x.rkt:70:80"
```

This output is very confusing and inconsistent.
When we see "x.rkt::90", we can never be sure if it's a srcloc
whose position is 90, or a srcloc whose column is 90.
The same applies for "x.rkt:70:90".

Moreover, the srloc "x.rkt::-1" is weird and is arguably incorrect
(see #1371).

For CS, the output would sometimes contain `#f`, and that is fixed
here by not trying to add position information when it's not available.
2021-01-07 07:44:29 -07:00
Matthew Flatt
bdc43a891a cs: force all foreign callbacks to be in atomic mode
Non-atomic mode is questionable at best with BC, and more so with CS.

With BC, a thread swap at least copies the fragment of the C stack
that is between a foreign call and a callback; that can work with some
C libraries, but it goes wrong often enough that it really shouldn't
be relied on. On the plus side, if it's going to go wrong, at least it
tends to go wrong right away (i.e., something in the C frame tends to
get broken in normal runs).

With CS, the C stack is not captured as part of a thread, and so
non-atomic mode 's even more broken. Non-atomic mode could work if you
know that no other thread is running that can involve foreign calls
and callbacks, but that assumption is usually not a good one. Worse,
when things finally go wrong, it's likely several scheduling steps and
thread interleavings away from the problem (e.g., #3459).

There's a chance that this change will stop some existing programs
from working ok on CS. It's more likely to make existing programs work
as intended on CS; the common case is that atomic mode is technically
needed even though non-atomic mode happened to work in practice with
BC.
2021-01-07 05:39:35 -07:00
yjqww6
e71c217758
cs: inline non-authentic struct predicate 2021-01-06 13:29:07 -07:00
Sorawee Porncharoenwase
f41b180b48 fix typos in datum->syntax error message 2021-01-06 14:12:12 -05:00
Davis Silverman
17b7033402
Fix typo and trailing whitespace in box-cas! docs (#3601) 2021-01-05 08:31:53 -06:00
Pavel Panchekha
b56276c670 Allow variables in unquote-splicing terms
I think that in general, `null-terminated?` should admit all patterns
that _could_ match a list, instead of just the ones that _only_ match
a list. That means that `(app f)` patterns and many others should also
be valid, though those are harder to implement, so I haven't tried
those yet.
2021-01-04 18:42:30 -06:00
Matthew Flatt
4c6bb055b0 cs: fix transparent internal structure types
Commit d96273bc0a broke internal "system" structures in the expander
that need to be transparent.
2021-01-04 06:28:32 -07:00
Matthew Flatt
27a13cd060 replace hack that enables an unreliable timing test 2021-01-03 21:26:14 -07:00
shhyou
dc76e1b7e0 regexp-split perf. test is unreliable on Windows 2021-01-03 18:52:58 -06:00
Matthew Flatt
d96273bc0a object-name: return #f for some built-in kinds of values
This change is mostly for making CS consistent with BC, but in the
case of `(object-name #'x)`, it also makes BC consistent with BC
before the macro-expander rewrite.

Closes racket/pconvert#9
2021-01-03 09:49:01 -07:00
Matthew Flatt
ecd2234d56 syntax/module-reader: make language name after meta-reader syntax-original?
Thanks to Robby for the test.
2021-01-02 16:44:28 -07:00