Move `NORETURN` of 2e3a618b00 to start of function declaration, where
it works for both GCC and MSVC.
original commit: 10fc4a2406ecd34fa686d9d643ee63d7c12d6f97
Merging ".o" files to one "kernel.o" can be convenient for further
linking, but it requires running `ld` directly. Running `ld` directly
sometimes runs into a mismatch between the C compiler and the default
`ld`. It's better to use the more typical approach of collecting
objects into an archive.
original commit: 7d5b60c7566570655e567495d86d546101cf8fb4
Use OSSP UUID on {Free,Open}BSD and native UUID on NetBSD.
Building on OpenBSD requires a filesystem mounted with wxneeded.
original commit: e964d7d01a6d115e469c01626896b683d421d599
A few shift lefts cause ub because of `(1 << n)` where `n` is 31.
The constant 1 is signed causing ub. Initially my fix was to do `(1U << n)` however, I have seen the pattern `((U32)1 << n)` elsewhere in the file so decided to follow this.
Caught by ubsan racketcs.
original commit: a902c9ab67010f521f786e2027d4e197d78975a4
According to ubsan we get several times into undefined behaviour due to signed overflow:
foreign.c:91:21: runtime error: signed integer overflow: 3291370622602663862 * 3 cannot be represented in type 'long int'
This happens only when the symbol name is relatively large like as for the call:
symhash (s=0x5555558caab8 "(cs)set_enable_object_backreferences")
original commit: 1e1c91869443d8a22beeebfcbe6fa14f9c3e2a6e
On a 64-bit platform, the test for "short" arguments to
avoid overflow was incorrect, because `(- (expt 2 30))`
counted as short.
original commit: 6d05b70e86987c0e7a07f221ba5def492300aaaf
- added compress-level parameter to select a compression level for
file writing and changed the default for lz4 compression to do a
better job compressing. finished splitting glz input routines
apart from glz output routines and did a bit of other restructuring.
removed gzxfile struct-as-bytevector wrapper and moved its fd
into glzFile. moved DEACTIVATE to before glzdopen_input calls
in S_new_open_input_fd and S_compress_input_fd, since glzdopen_input
reads from the file and could block. the compress format and now
level are now recorded directly the thread context. replaced
as-gz? flag bit in compressed bytevector header word with a small
number of bits recording the compression format at the bottom of
the header word. flushed a couple of bytevector compression mats
that depended on the old representation. (these last few changes
should make adding new compression formats easier.) added
s-directory build options to choose whether to compress and, if
so, the format and level.
compress-io.h, compress-io.c, new-io.c, equates.h, system.h,
scheme.c, gc.c,
io.ss, cmacros.ss, back.ss, bytevector.ss, primdata.ss, s/Mf-base,
io.ms, mat.ss, bytevector.ms, root-experr*,
release_notes.stex, io.stex, system.stex, objects.stex
- improved the effectiveness of LZ4 boot-file compression to within
15% of gzip by increasing the lz4 output-port in_buffer size to
1<<18. With the previous size (1<<14) LZ4-compressed boot files
were about 50% larger. set the lz4 input-port in_buffer and
out_buffer sizes to 1<<12 and 1<<14. there's no clear win at
present for larger input-port buffer sizes.
compress-io.c
- To reduce the memory hit for the increased output-port in_buffer
size and the corresponding increase in computed out_buffer size,
one output-side out_buffer is now allocated (lazily) per thread
and stored in the thread context. The other buffers are now
directly a part of the lz4File_out and lz4File_in structures
rather than allocated separately.
compress-io.c, scheme.c, gc.c,
cmacros.ss
- split out the buffer emit code from glzwrite_lz4 into a
separate glzemit_lz4 helper that is now also used by gzclose
so we can avoid dealing with a NULL buffer in glzwrite_lz4.
glzwrite_lz4 also uses it to writing large buffers directly and
avoid the memcpy.
compress-io.c
- replaced lz4File_out and lz4File_in mode enumeration with the
compress format and inputp boolean. using switch to check and
raising exceptions for unexpected values to further simplify
adding new compression formats in the future.
compress-io.c
- replaced the never-defined struct lz4File pointer in glzFile
union with the more specific struct lz4File_in_r and Lz4File_out_r
pointers.
compress-io.h, compress-io.c
- added free of lz4 structures to gzclose. also changed file-close
logic generally so that (1) port is marked closed before anything is
freed to avoid dangling pointers in the case of an interrupt or
error, and (2) structures are freed even in the case of a write
or close error, before the error is reported. also now mallocing
glz and lz4 structures after possibility of errors have passed where
possible and freeing them when not.
compress-io.c,
io.ss
- added return-value checks to malloc calls and to a couple of other
C-library calls.
compress-io.c
- corrected EINTR checks to look at errno rather than return codes.
compress-io.c
- added S_ prefixes to the glz* exports
externs.h, compress-io.c, new-io.c, scheme.c, fasl.c
- added entries for mutex-name and mutex-thread
threads.stex
original commit: 722ffabef4c938bc92c0fe07f789a9ba350dc6c6
(and possibly all and only even-numbered releases going forward)
and use 9.5.3 (and possibly all and only odd-numbered releases going
forward) for development.
original commit: 47110f36cea47a44078b3144c82d212de79774ce
- updated version to 9.5.2
bintar/Makefile rpm/Makefile pkg/Makefile 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 rpm/Makefile pkg/Makefile
wininstall/Makefile wininstall/a6nt.wxs wininstall/i3nt.wxs
wininstall/ta6nt.wxs wininstall/ti3nt.wxs
- fixed handling of bintar, rpm, pkg make files
newrelease
- fixed a bug in the fasl representation and reading of mutually
recursive ftypes where one of the members of the cycle is the
parent of another, which manifested in the fasl reader raising
bogus "incompatible record type" exceptions. (The bug could also
affect other record-type descriptors with cycles involving parent
rtds and "extra" fields.) object files created before this fix
are incompatible with builds with this fix, and objects files
created after this fix are incompatible builds without this fix.
fasl.ss, strip.ss,
fasl.c,
ftype.ms,
release_notes.stex
original commit: 766d591c18c2779866d1a059700e6ff1c02cb3c5
controversial, unless I damaged something in the process of integrating
them with other recent changes. the user's guide and release notes
have been updated as well to reflect the changes of interest to end
users.
- the body of load-library is now wrapped in a $pass-time with
to show the time spent loading libraries separately from the time
spent in expand.
syntax.ss
- interpret now plays the pass-time game
interpret.ss
- added compile-time-value? predicate and
compile-time-value-value accessor
syntax.ss, primdata.ss,
8.ms, primvars.ms, root-experr*
- $pass-stats now returns accurrate stats for the currently timed
pass.
7.ss
- compile-whole-program and compile-whole-library now propagate
recompile info from the named wpo file to the object file
to support maybe-compile-program and maybe-compile-library in
the case where compile-whole-{program,library} overwrites the
original object file.
compile.ss,
7.ms, mat.ss, primvars.ms
- replaced the ancient and unusable bintar with one that creates
a useful tarball for binary installs
bintar
- generated Mf-install InstallBin (InstallLib, InstallMan) now
correctly indirects through InstallPrefix if the --installbin
(--installlib, --installman) configure flag is not present.
src/configure
- removed definition of generate-procedure-source-information
patch.ss
- guardian tconc cells are now allocated in generation 0 in the hope
that they can be released more quickly.
gc.c
- added ftype-guardian syntax: (ftype-guardian A) creates a new
guardian for ftype pointers of type A, the first base field (or
one of the first base fields in the case of unions) of which must
be a word-sized integer with native endianness representing a
reference count. ftype pointers are registered with and retrieved
from the guardian just like objects are registered with and
retrieved from any guardian. the difference is that the garbage
collector decrements the reference count before resurrecting an
ftype pointer and resurrects only those whose reference counts
become zero, i.e., are ready for deallocation.
ftype.ss, cp0.ss, cmacros.ss, cpnanopass.ss, prims.ss, primdata.ss,
gc.c,
4.ms, root-experr*
- fixed a bug in automatic recompilation handling of missing include
files specified with absolute pathnames or pathnames starting with
"./" or "..": was erroring out in file-modification-time with a
file-not-found or other exception rather than recompiling.
syntax.ss,
7.ms, root-experr*, patch*
- changed inline vector-for-each and string-for-each code to
put the last call to the procedure in tail position, as was
already done for the library definitions and for the inline
code for for-each.
cp0.ss,
5_4.ms, 5_6.ms
- the compiler now generates better inline code for the bytevector
procedure. instead of one byte memory write for each argument,
it writes up to 4 (32-bit machines) or 8 (64-bit machines) bytes
at a time, which almost always results in fewer instructions and
fewer writes.
cpnanopass.ss,
bytevector.ms
- packaged unchanging implicit reader arguments into a single record
to reduce the number of arguments.
read.ss
- recoded run-vector to handle zero-length vectors. it appears
we're not presently generating empty vectors (representing empty
groups), but the fasl format permits them.
7.ss
original commit: 7be1d190de7171f74a1ee71e348d3e6310392686
An attachment continuation link can be a 1-shot continuation, but
the existing 1-short continuation implementation tends to work
less well than mutishot continuations. An opportunistic 1-shot
continuation is like a multi-shot continuation, but if it is
called from a stack that is adjacent to the continuation, then
the stack is merged with the continuation's stack.
original commit: ea1eb3c5192d644ad4c4cbf755bcb6fd438cc364
- 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
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
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
When starting a new segment to keep an object on a single segment,
terminate the old one with e forwarding marker.
original commit: 1f1db6d3d2cd930455a3592f2d76a465b30a5592
When writing a fasl stream, add extra graph points as needed
to limit recursive reading to about 500 non-tail recursions.
original commit: a6759efdc6ac68e45ec8755a5fe9b75038e173a5
Use `vfasl-convert-file` to convert to the vfasl format, something
like this:
(vfasl-convert-file "orig/petite.boot" "new/petite.boot" '())
(vfasl-convert-file "orig/scheme.boot" "new/scheme.boot" '("petite"))
(vfasl-convert-file "orig/racket.boot" "new/racket.boot" '("petite" "scheme"))
original commit: a40886e2fba741ca8cfc5ebd16b902d6414da0ae
To support a more minimal build enviornment, offer the possibility of
building without "curses.h" and "libcurses" (which disables the
expeditor, although the expeditor's code is still included).
original commit: 9a17f73e6fc5e117c19333e15c6afb797dd6b08f
- 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 `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
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