Commit Graph

43189 Commits

Author SHA1 Message Date
Jarhmander
68d8c8acc2 add alternative (R7RS) spelling of booleans (#563) 2021-05-04 15:01:50 -06:00
Jarhmander
da2a9969ef Mention an up-to-date crt.dll for Windows (#564) 2021-05-04 15:01:50 -06:00
Jack Firth
59100868e0 Improve documentation for hash update functions
Changes the prose explanations of `hash-update` and `hash-update!` to more explicitly describe how the hash table is updated, instead of just deferring to the explanations in `hash-ref` and `hash-set` / `hash-set!`. Additionally, adds example code.
2021-05-04 09:32:32 -04:00
Matthew Flatt
d777cd28d7 fix contract checks for number <-> representation bytes
... especially for CS, but there's also one BC correction.

Reported in tweet by KenHatesSoftwar.
2021-05-03 20:08:15 -06:00
Matthew Flatt
9a65aaf444 makefile: fix pb-fetch after starting with --single-branch mode 2021-05-03 16:42:01 -06:00
Matthew Flatt
9c60382461 info.rkt: allow regexps in compile-omit-paths
Closes #1400
2021-05-03 16:38:37 -06:00
Matthew Flatt
c663d13fab cs: sync schemified
Rebuild schemified files to take advantage of correction for unsafe
`fxlshift` and `fxrshift`.
2021-05-03 10:18:21 -06:00
Matthew Flatt
ef43f26f62 net/base64: speed up encoding and decoding, especially on byte strings
Base64 encoding and decoding are common and simple enough to
specialize for byte strings, where they can be much faster.
2021-05-03 07:47:50 -06:00
Matthew Flatt
d20292b80c cs: fix fx{lr}shift conversion for (#%declare #:unsafe) 2021-05-03 07:33:05 -06:00
Matthew Flatt
9d53990e18 net/base64: faster encode
Make encoding almost twice as fast by treating input chunks of 3 that
turn into output chunks of 4.
2021-05-03 07:33:05 -06:00
Matthew Flatt
7179df6009 configure: improve platform detection and reporting 2021-05-03 07:33:05 -06:00
Bogdan Popa
0c8e3765f2 cs,thread: fix thread-receive-evt retry proc
Fixes #3813
2021-05-03 07:32:53 -06:00
Matthew Flatt
d9c128fe65 add namespace-call-with-registry-lock
Lazy require benefits from using a lock on a namespace registry for
much the same reason as on-demand instantiation of ready modules. Make
lazy require use the lock that's alerady in place for on-demand
instantiation, and expose `namespace-call-with-registry-lock` for
other potential uses.

Thanks to @m4burns for tracking down the problem and its solution.

Related to #3805
2021-05-02 12:10:30 -06:00
Matthew Flatt
406dcc9ff3 Chez Scheme: make pb build accomocate WRITE_XOR_EXECUTE_CODE
Although W^X is useless to pb, allowing it to build with
`-DWRITE_XOR_EXECUTE_CODE` can be helpful.
2021-05-01 09:26:59 -06:00
Matthew Flatt
1f0223fef1 Chez Scheme: repair to W^X mode
Fix single-segment flipping to accomodate write regions that span
segments.
2021-05-01 08:58:47 -06:00
Matthew Flatt
8ea5b58393 cs: add configuration for {Free,Open,Net}BSD on {ARMv6,AArch64,PowerPC}
It's not clear how many of these combinations work right now, but they
should be close, and the intent is that they're supported. I
succcessfully built for FreeBSD on AArch64 and Chez Scheme for NetBSD
on PowerPC32.
2021-05-01 06:57:32 -06:00
Matthew Flatt
c0af3a253b Chez Scheme: fix fence preproceddore conditional for AArch64
The memory-fence macros were not being used on non-Apple AArch64.
2021-04-30 12:22:12 -06:00
Matthew Flatt
b058be9bfc Chez Scheme: clean up "Mf-<unix>" and "<unix>.def"
Replace lots of mostly-duplicated "Mf-<platform>" and "<platform>.def"
files with just a few "Mf-unix" and and "unix.def" files plus
configuration within "configure" and "workarea". Also change
"version.h" to infer more OS details (as was used for pb, anyway).
This change simplifies setting up configurations for different
platforms, and it makes it easier to share among similar
configurations.
2021-04-30 09:08:14 -06:00
Matthew Flatt
744d8d6d25 zo-lib: documentation and a little support for non-BC linklets
Closes #3073
2021-04-29 14:09:54 -06:00
Matthew Flatt
85e2282b66 reference: improve cross referencing on source locations
Closes #2785
2021-04-29 13:09:44 -06:00
Matthew Flatt
0eeb8d26f3 net/url: trim whitespace when getting enviornment variables like http_proxy
For compatibility with other systems, trmi whitespace from environment
variables.

Closes #2663
2021-04-29 11:33:03 -06:00
Matthew Flatt
6f1875c384 bc: fix interaction of prop:object-name and prop:procedure
Document the fact that `prop:object-name` takes precedence for the
`object-name` result, and make printing also use `object-name` instead
of the propcedure's name when they're differet.

Also, repair constructor-style printing of a transparent structure
type that has `prop:object-name`.

Closes #2585
2021-04-29 11:23:15 -06:00
Matthew Flatt
5ae19c56e1 fix submodule loading when a ".zo" file is referenced directly
The default load/use-compiled handler was not consistent with the
default load handler in the treatment of submodules from module files.

Closes #2363
2021-04-29 10:05:11 -06:00
Matthew Flatt
ed115af6b2 windows makefile: fix liblz4.dll linking
Link "liblz4.dll" with the right LZ4 library for /MT mode. It looks
like VS 2017 links anyway, but VS 2015 (and probably earlier) does not
link with the wrong library.

In a normal build, "liblz4.dll" is not needed, but it's linked in case
it turns out to be useful to compress or decompress boot files. A
normal build will construct boot files with the intended final
compression, at least when all the right flags are passed around to
the right places.
2021-04-29 10:05:02 -06:00
Matthew Flatt
a1452ab399 configure: add -lrt for BC on Linux
Linking with `-lrt` is needed for `clock_gettime` on older Linux
distributions.
2021-04-29 08:24:07 -06:00
Matthew Flatt
9bd71dec93 fix open-output-file #:permissions` test again
When tests are run as root, checking for write permission through the
summary from `file-or-directory-permissions` still doesn't work.
2021-04-29 08:16:49 -06:00
Matthew Flatt
0ef092e948 fix open-output-file #:permissions` test
Fix the permissions integer. Also, for the benefit of tests running in
a container, use `file-or-directory-permissions` instead of another
`open-output-file` to check permissions.
2021-04-29 06:40:06 -06:00
Matthew Flatt
cfa10d5f30 fix typo in in-value change
Thanks to @yjqww6
2021-04-28 20:29:46 -06:00
Matthew Flatt
bd94ac6b27 fix impersonator-prop:application-mark for keyword arguments
Closes #1836
2021-04-28 17:51:05 -06:00
Matthew Flatt
387f5dc3ba add current-inexact-monotonic-milliseconds
Closes #1826
2021-04-28 17:29:38 -06:00
Matthew Flatt
4eed365e1f class: fix name-conflict checking with local names
Closes #1819
2021-04-28 16:20:08 -06:00
Matthew Flatt
3e9a8ccf59 mixin: fix error-message construction
Closes #1693
2021-04-28 14:30:31 -06:00
Matthew Flatt
94725ffb4e in-value: fix inlined binding
The inlined version of `in-value` in a `for` form did not bind the
left-hand identifier at the right layer relative to other bindings in
`for/fold`, which caused the inlined `in-value` to behave differently
than a non-inlined `in-value`. Confusing about this `in-value`, in
turn, had led to incorrect documentation on `for/fold`.

It would be nice to clean up a little more of the evaluator and
availability of bindings in `for/fold`, but doing so runs a
significant risk of breaking existing code (unlike fixing `in-value`,
which behaved even worse and where the repair seems less likely to
break existing programs).

Closes #1659 (again)
2021-04-28 14:19:50 -06:00
Matthew Flatt
09480c86e8 open-output-file et al.: add #:permissions argument
Add a `#:permissions` optional argument that is a permissions integer
in the same style as `file-or-directory-permissions` and that is used
when a file is created. On Unix, the given permissions are combined
with the process's umask.

Closes #1654
2021-04-28 13:58:12 -06:00
Matthew Flatt
bff31f0768 expander: allow syntax-local-lift-require during #%module-begin expansion
Making `syntax-local-lift-require` during `#%module-begin` expansion
provides a solution to a long-standing problem with composing
languages via `#%module-begin`, where the bindings of some lanuage
should be made available for expanding the module body by
`#%module-begin` expansion (i.e., the language is *not* the initial
import). If the language does not support `require`, then there was no
way to expand and expose the language import dependency.

Closes #1352
2021-04-28 08:30:20 -06:00
Matthew Flatt
f4ccd0fdc6 expander: correct some namespace-mismatch error formats
Related to #1352
2021-04-28 07:13:06 -06:00
Matthew Flatt
8962b027fe docs: clarifications on raco test and module instantiations
Closes #1338
2021-04-28 07:13:06 -06:00
Matthew Flatt
547678f7de raco test: fix --place mode (non-)rackunit counting
When a test run by `--place` mode doesn't increment any rackunit
counts, treat the count as 0 instead of 1 for consistency with
`--direct` and `--process` modes.

Closes #1358
2021-04-28 07:13:06 -06:00
Matthew Flatt
8cea33baa1 racket/unitsig: fix location on indirect reference
Set the source location of a function call that implements an indirect
import to be the original identifier, so a use-before-definition error
has the right location.

Closes #1324
2021-04-28 07:13:06 -06:00
Matthew Flatt
bf4fb553b3 raise-syntax-error: accomodate cyclic S-expressions
Closes #1016
2021-04-28 07:13:06 -06:00
Matthew Flatt
09b61f06c1 search page: avoid propagating "q" query
When you search in a page other than the main search page, the search
request is communicated as a "q" query in the URL. Meanwhile, the search
page generally propagates all query arguments, as a kind of store-passing
facility, which means that the "q" query was passed along. Avoid adding the
"q" to search results, so it doesn't get propagated so much.

Closes #936
2021-04-28 07:13:06 -06:00
Matthew Flatt
613e142447 typo in comment 2021-04-28 07:13:06 -06:00
plan-do-break-fix
0cdede88c3 Chez Scheme: corrects typos in project documentation 2021-04-27 19:43:22 -03:00
Matthew Flatt
6e3a94b6ac openssl: fix waiting on input or output
As noted by @rmculpepper, using an underlying input port as an evt to
indicate more SSL input is not right if data can be pumped from the
underlying input port meanwhile. This commit uses progress evts (real
or synthesized) to avoid that problem.

[The commit include more whitespace changes than I'd normally like,
but it seems like some past tabify went wrong.]

Closes #3804
2021-04-27 12:50:07 -06:00
Matthew Flatt
2f9cd5446b cs: auto-flush stdout/stderr only when terminals
Match BC's long-standing behavior of only flushing the original output
and error ports on input from the original input port when the output
and/or error port is a terminal port.
2021-04-27 11:55:59 -06:00
Matthew Flatt
a385788971 cs: make flush-output error if port is closed
Closes #3803
2021-04-27 09:23:32 -06:00
Matthew Flatt
9ae6d66449 bc: fix sync when a guard-evt turns into choice-evt late
During the time that the procedure in a guard-evt is called by `sync`,
it's possible for the `sync` evt choice to become determined. If the
guard-evt procedure then returns a choice-evt, the BC implementation
of `sync` could lose track of the selected evt; the selection is
represented by an index, and choice-evt splicing can shift indices.

Possibly related to #3004
2021-04-27 08:39:40 -06:00
Matthew Flatt
f4a9058941 stream-{ref,tail,take}: avoid retaining stream for potential error
Although retaining the original stream argument to `stream-ref`,
`stream-tail`, or `stream-take` can enable a better error message if
the stream runs out of elements too soon, it can also interfere with
the intended memory use of a stream.

Closes #2870
2021-04-26 20:03:55 -06:00
Matthew Flatt
a2d724fff6 security-guard-check-network: fix contract
CS was correct, but BC and the documentation were too strict.

Closes #1763
2021-04-26 18:14:00 -06:00
Matthew Flatt
5b66a2e590 racket/rerequire: fix submodule handling
Closes #971
2021-04-26 16:32:08 -06:00