In a pattern like
(let loop ([l l])
(define v (syntax-e l))
(cond
[(null? v) 'done]
[else
(loop (datum->syntax #f (cdr v)))]))
the running time was O(N^2) for a list of syntax objects of length N.
That pattern is relevant for traversals that use `syntax-case` like
(let loop ([l l])
(syntax-case l ()
[(a . b) (loop #'b)]
[() 'done]))
Avoid bad behavior by recording in an weak hash table certain pairs
that were previously been produced by `datum->syntax` internally so
that they can be used as-is.
Mainly for cross-compilation with a Windows target, the Racket CS
build process may need to run `lz4` as an external program. In that
case, complain when `lz4` isn't found, instead of letting `system*`
complain about getting `#f`.
Change the condition for filtering leaf contracts via `eq?`.
Before, we looked for flat or chaperone contracts.
After, look for flat or trusted contracts. So:
1. untrusted chaperones with side effects that are unsafe to drop are not
dropped, and
2. impersonator contracts can now be dropped (object/c, recursive-contract)
When compiling with -Werror (./configure CFLAGS="-Werror" ...),
the test to see if mbsrtowcs exists
failed with pointer type of incompatible type, is char **, should be
const char **. It would proceed to assume mbsrtowcs didn't exist.
Ensures proper noreturn annotations for error functions. Implemented
cross-platform unreachable annotation. No warnings in tested clang or
gcc with default flags. Tested as well on MacOS and Windows.
The schemify pass collects known-value information as the first step
of processing a linklet body, but the main pass to process the linklet
body may simplify it in a way that exposes new information. For
example, in
(define (call) (values 1 2))
(define-values (x y) (call))
the main pass will inline `call` and expose the fact that `x` and `y`
are always 1 and 2, respectively.
Adjust schemify to inspect the simplified form of a definition and
potentially add new information to known-value information, which is
useful later in the ame linklet body and also as cross-module
information.
Like other optimizations that schemify duplicates, constant folding
helps support cross-module optimization. Related "no-prompt"
declarations for primitives can reduce `call-with-module-prompt`s in
schemified output, too, which can interfere with Chez Scheme's
optimizer.
This is probably related to #2712.
It's the only occurrence of SCHEME_NO_EXN pointing to the fact that
this is an historical artifact that can be removed.
Recognize `(define-values (id ...) (values rhs ...))` and split to
multiple `define`s after simplifying the right-hand side of
`define-values`. Also, don't split if a define variable is referenced
too early.