- fixed a bug in which instantiating a static foreign-callable code object
fails with an invalid memory reference because the collector has
discarded its relocation information. foreign-callable code objects
are now flagged as "templates", and the collector now refuses to
discard relocation information for code objects marked as templates
when copying them to the static generation.
cmacros.ss, cpnanopass.ss,
gc.c,
7.ms
- committing updated boot/*/equates.h (without the boot files, which are
still usable for bootstrapping)
boot/*/*.h
- updated release notes
release_notes.stex
original commit: 71d3abba684e04b134720ea1bd9a8c847c38ac5f
fix#389 (apply doesn't throw exception when last argument isn't a list)
fold-primref and fold-primref2 ignored app-convention when
attempting to fold certain primitive calls in 'test and 'effect
context and when falling back on the default primitive handler.
We now residualize primitive references if the app-convention
is not 'call. The original fold-primref2 already bypassed the
inline handler when the app-convention was not 'call.
original commit: f9d10c4cf2e6cd184ad7429f251360a738600959
The `dofretu...*` intrinsics used %ac1 without declaring it as a used
registers, which effectively broke register allocation for handling
string/bytevector foreign-call results or callable arguments.
original commit: 993fb9036acad5445319f458fd971b1a1d8e9f84
Add a parameter to constrain the compiler (off by default) to
implement `+`, `*`, and variants as left-associative when given
multiple arguments.
original commit: d126ba3364893e66263c65af1cd6dbdd8b021439
reclaimed by the collector and must be released explicitly by the
programmer via (profile-release-counters).
pdhtml.ss, primdata.ss,
globals.h, externs.h, fasl.c, prim5.c, prim.c, alloc.c, scheme.c,
misc.ms,
release_notes.stex, system.stex
original commit: 68e20f721618dbaf4c1634067c2bee24a493a750
In safe compilation modes, avoid turning an error like
(let ([x (values 1 2)]) x)
or
(car (list (values 1 2)))
into a program that returns multiple values or
(if (list (values 1 2)) 3 4)
into a program that returns without an error.
In addition, refrain from moving an expression from a non-tail
position within a procedure to a tail position, unless the expression
is not only single valued but also gauarnteed not to inspect the
immediate continuation (e.g., using `call/cc` and comparing the result
to a previously captured continuation). This constraint applies even
in unsafe compilation modes, because the intent it to provide some
guarantees about non-tail positions to complement existing guarantees
of tail positions.
original commit: 91e9631576e7b97137be856e985609320e327f32
Also adds `get-initial-thread`, since threa values are useful with
`compute-size[-increments]`.
Changes the compiler to inline `weak-pair?` and `ephemeron-pair?`,
since that provides better performance for `compute-size-increments`.
original commit: 57d0cc13f8e932972cba3837b4f54e9c86786091
Aviod turning an error like
(let ([x (values 1 2)]) x)
or
(car (list (values 1 2)))
into a program that returns multiple values.
original commit: 4efb3d6f226d9131f87023e45ff2b7e4713da8ae
When writing a fasl stream, add extra graph points as needed
to limit recursive reading to about 500 non-tail recursions.
original commit: a6759efdc6ac68e45ec8755a5fe9b75038e173a5
Also, for completeness, correct the listing of callee-save registers
in callable return for x86 & x86_64.
original commit: 4cd942be6ab2eb5e02f6d6c5c509db3131bd015f
- when thread_get_room exhausts the local allocation area, it now
goes through a common path with S_get_more_room to allocate a new
local allocation area when appropriate. this can greatly reduce
the use of global allocation (and the number of tc mutex acquires
in threaded builds) when a lot of small objects are allocated by
C code with no intervening Scheme-side allocation or dirty writes.
alloc.c, types.h, externs.h
original commit: 93dfa7674a95837e5a22bc622fecc50b0224f60d
- the compiler now uses a temporary variable to hold the return
value of a nested call across the restore-local-saves form to
properly handle the case where the destination lvalue is an mref
whose base and/or index is a local save.
cpnanopass.ss,
misc.ms
original commit: 835cbc2430be4f7381cee27133d42e77ace2b37f
The `object-references` function is intended to support debugging of
memory leaks by providing a mapping from each live object to the
object that retained it.
original commit: 61f6602b7e6c388c529f3c5995dcf71a7c42e005
A program can use `make-arity-wrapper-procedure` to synthesize a
function that reports a given arity mask (without calling `compile`).
In addition, `set-arity-wrapper-procedure!` suports modifying the
implementation of a synthesized procedure. Although similar
functionality could be achieved with `(lambda args (apply (unbox proc)
args))`, an arity wrapper procedure can dispatch to another procedure
without allocating a list for the arguments.
The interpreter now uses an internal variant of arity wrappers to
cooperate with `procedure-arity-mask`.
original commit: 5fede14302840b55edbeb7565e28d09350a4b2e9
bootstrap failures after small changes like the recent change to
procedure names, so we don't have to rebuild the boot files as often.
Mf-base
original commit: 94aaebe54807780791b8373017c979f59e6c45f1
In some cases, such as
(define g (let ([f (lambda (x) x)]) f))
the inner name `f` could get replaced by the outer name `g`.
Prefer the inner name so that macros can use a `let` wrapper
to reliably name a procedure.
original commit: 9ae0f856b0f81610c6caea13a5bfdf3b135de5b0
Libraries incorporated via compile-whole-program are, by default,
not visible to environment or eval, unless libs-visible? is true;
complain if we try to visit such libraries.
original commit: 220dca39d0cb482a1cff3f31b8a3197f8b5ee1bc
Improve error reporting and improve docs as suggested by Andy, and
adjust `conv` -> `conv*` to fit a naming convention.
original commit: b34817aea5d3c4862e7bb313ee9f5281472a832f
Embarrassingly, I committed this change on the wrong branch initially.
Added -Wno-implicit-fallthrough flag to macOS C makefiles.
c/Mf-a6osx, c/Mf-i3osx, c/Mf-ta6osx, c/Mf-ti3osx
original commit: 8eb8336a7d2870f8e592f060bab8321703e40b48
- fixed an issue with the library system where an exception that occurs
during visit or revisit left the library in an inconsistent state that
caused it to appear that it was still in the process of running. This
manifested in it raising a cyclic dependency exception, even though
there really is not a cyclic dependency. The various library
management functions involved will now reset the part of the library
when an exception occurs. This also means that if the library visit
or revisit failed for a transient reason (such as a missing or
incorrect library version that can be fixed by updating the
library-directories) it is now possible to recover from these errors.
expand-lang.ss, syntax.ss, interpret.ss, compile.ss, cprep.ss,
8.ms
original commit: 6dbd72496fb4eaf5fb65453d0ae0a75f0ef2ad80
the signal handler could trip over the NULL jumpbuf in a CCHAIN record.
schlib.c
remade boot files
original commit: d8c270403121547101cb523cc1f80a569dbb0378
So the reduced version checks that p is a procedure
Also make the same change for #2%for-each.
cp0.ss, 4.ms
original commit: 5caa11c85bc74c0af25ac215d48b7f5f0c1d3e42
commonizatio pass and support for specifying default record
equal and hash procedures:
- more staid and consistent Mf-cross main target
Mf-cross
- cpletrec now replaces the incoming prelexes with new ones so
that it doesn't have to alter the flags on the incoming ones, since
the same expander output is passed through the compiler twice while
compiling a file with macro definitions or libraries. we were
getting away without this just by luck.
cpletrec.ss
- pure? and ivory? now return #t for a primref only if the prim is
declared to be a proc, since some non-proc prims are mutable, e.g.,
$active-threads and $collect-request-pending.
cp0.ss
- $error-handling-mode? and $eol-style? are now properly declared to
be procs rather than system state variables.
primdata.ss
- the new pass $check-prelex-flags verifies that prelex referenced,
multiply-referenced, and assigned flags are set when they
should be. (it doesn't, however, complain if a flag is set
when it need not be.) when the new system parameter
$enable-check-prelex-flags is set, $check-prelex-flags is
called after each major pass that produces Lsrc forms to verify
that the flags are set correctly in the output of the pass.
this parameter is unset by default but set when running the
mats.
cprep.ss, back.ss, compile.ss, primdata.ss,
mats/Mf-base
- removed the unnecessary set of prelex referenced flag from the
build-ref routines when we've just established that it is set.
syntax.ss, compile.ss
- equivalent-expansion? now prints differences to the current output
port to aid in debugging.
mat.ss
- the nanopass that patches calls to library globals into calls to
their local counterparts during whole-program optimization now
creates new prelexes and sets the prelex referenced, multiply
referenced, and assigned flags on the new prelexes rather than
destructively setting flags on the incoming prelexes. The
only known problems this fixes are (1) the multiply referenced
flag was not previously being set for cross-library calls when
it should have been, resulting in overly aggressive inlining
of library exports during whole-program optimization, and (2)
the referenced flag could sometimes be set for library exports
that aren't actually used in the final program, which could
prevent some unreachable code from being eliminated.
compile.ss
- added support for specifying default record-equal and
record-hash procedures.
primdata.ss, cmacros.ss, cpnanopass.ss, prims.ss, newhash.ss,
gc.c,
record.ms
- added missing call to relocate for subset-mode tc field, which
wasn't burning us because the only valid non-false value, the
symbol system, is in the static generation after the initial heap
compaction.
gc.c
- added a lambda-commonization pass that runs after the other
source optimizations, particularly inlining, and a new parameter
that controls how hard it works. the value of commonization-level
ranges from 0 through 9, with 0 disabling commonization and 9
maximizing it. The default value is 0 (disabled). At present,
for non-zero level n, the commonizer attempts to commonize
lambda expressions consisting of 2^(10-n) or more nodes.
commonization of one or more lambda expressions requires that
they have identical structure down to the leaf nodes for quote
expressions, references to unassigned variables, and primitives.
So that various downstream optimizations aren't disabled, there
are some additional restrictions, the most important of which
being that call-position expressions must be identical. The
commonizer works by abstracting the code into a helper that
takes the values of the differing leaf nodes as arguments.
the name of the helper is formed by concatenating the names of
the original procedures, separated by '&', and this is the name
that will show up in a stack trace. The source location will
be that of one of the original procedures. Profiling inhibits
commonization, because commonization requires profile source
locations to be identical.
cpcommonize.ss (new), compile.ss, interpret.ss, cprep.ss,
primdata.ss, s/Mf-base,
mats/Mf-base
- cpletrec now always produces a letrec rather than a let for
single immutable lambda bindings, even when not recursive, for
consistent expand/optimize output whether the commonizer is
run or not.
cpletrec.ss,
record.ms
- trans-make-ftype-pointer no longer generates a call to
$verify-ftype-address if the address expression is a call to
ftype-pointer-address.
ftype.ss
original commit: b6a3dcc814b64faacc9310fec4a4531fb3f18dcd
a non-procedure exception when the first argument is not a procedure, even
when the rest of the program is compiled at optimize level 3.
4.ms, root-experr-compile-0-f-f-f, patch-compile-0-t-f-f,
patch-compile-0-f-t-f, patch-interpret-0-f-t-f, patch-interpret-0-f-f-f,
patch-interpret-3-f-t-f, patch-interpret-3-f-f-f
original commit: 7916447d1a482ec91ae63927692053d727d9b459