The `unlock-object` operation was O(N) with N currently locked objects
--- so, O(N^2) to lock N objects and then unlock them --- because
locked objects were stored in and searched in a global list. Also, GC
was O(N) at any generation with N locked objects across generations,
since every locked object was scanned.
Fix these poblems so that locking and unlocking is practically O(1)
and GC is not poportional to locked objects. More precisely, locking
and unlocking is now O(C) for locking an individual object C times to
be balanced by C unlocks. (Since multiple locks on a single object
is rare, this performance seems good enough.)
The implementation replaces the global list with segment-specific
lists. Backpointers are managed using the general generational
support, so that unmodified, old-generation locked objects do not
need to be swept duing a new-generation collection.
original commit: a57d256ca73a3d507792c471facb7e35afbe88b3
... and eq-hashtable-cell and symbol-hashtable-ref-cell,
which are just like hashtable-cell, except that if the given
key isn't present, they return #f instead of mutating the table.
original commit: c1ab89fc2152ba41f50c0a5b0e5857fc48fc63c1
p is a pointer that iterates over path, which is buffer.
We should not try to get to an address preceding its start.
Since there was an execution path that leads to that,
guard against it with an additional check.
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
original commit: de8d0e742f44c80735a682bd05019246c2087d56
Although `--kernelobj` is the default, allow it to be specified
explicitly, in case it makes sense eventually to change the default.
original commit: 46813ea67dd115d87924422373ea684b75e2772c
Previously it was using #!/bin/bash as its interpreter. It is not
compatible with FreeBSD because bash is not installed by default.
The update-revision script is #!/bin/sh compatible and there are
other examples of #!/bin/sh scripts in the codebase so the change
is consistent with them.
original commit: 0ad188cdbd618b369e7fe6d2b9446251fe92e891
Avoid tripping into +nan.0 by using 0 instead of 0.0
for the imaginary part of a real number and by using
`atan` with two arguments instead of one.
original commit: e3f499adfbcbe94726fe11869ca23176fa2c3b78
Correct the case that converting the second argument to an inexact
numbe produces an integer by losing precision.
original commit: 467db7fa1f1d068e9bad250b93044d157cd3806d
The `(cdr tc-ptr-offsets)` in the recrusrion was wrong, but use
`thread->objects` and `thread->stack-objects` to work more generally.
original commit: fd620699dc620d3d1a522800a7dfaff6cc0393bb
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
@gus-massa's adjustments to the Racket test suite exposed more places
where the "primdata.ss" spec was wrong.
original commit: 5cb4996c7b317307299e8dd55a25e8e58144a30e
It fails when the argument is +inf.0, so it's not possible to make it unsafe
automatically when the argument is a number.
original commit: 4d31d65b0e685adca7c01973cf7f30e716356a6b
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