The result of `mktime` is -1 for an error. The result is also -1 if
the time is 1 second before the epoch. That's not useful, so ignore
it.
original commit: aa8ca31cef223128fd8ed1abdc76beb31a0e077a
With this flag the primitive is not tested in primvars.ms but other
parts of the compiler can use the signature/flags.
Also, add a signature to every system boolean primitive.
primvars.ms, primdata.ss
original commit: ee023c673bda6557bc223de7f8b0e732600619bc
Probably makes no difference right now, since these internal functons
rarely show up in the process of optimizing user programs, but just in
case.
original commit: b54a288b31731368dbcf57c95b78f0a162c29147
Can't simply use a continuation reified by an attachment
operation, because it is probably a 1-shot continuation
that needs to be promoted.
original commit: 8201aff06df8011ffbc41f217d50e4c430d75bb5
Effectively, change a `call/cc` call to `let/cc` when it appears in
the tail position of a function. This change takes advantage of
continuation-reification support that was built for continuation
attachments.
original commit: 4c015a5b55f7d04839a0efd8e5554fc237e4663b
The MRG32k3a generator is fast when using unboxed floating-point
arithemtic. Since the Scheme compiler doesn't yet support that,
build MRG32k3a into the kernel and provide access via
`pseudo-random-generator` functions.
original commit: 3dd74679a6c2705440488d8c07c47852eb50a94b
If normal 1-shot continuations are mixed with opportunistic 1-shot
continuations created by `call-setting-continuation-attachment`, then
promoting an opportunistic 1-shot at a GC is wrong unless the whole
chain is promoted.
original commit: 2dfac475666763b60935e382386af4438f3029e0
Include an extra part in the Chez Scheme version number, which both
helps indicates the Racket fork and versions it.
original commit: 00678e29bb9f05de2ccaec8585126e967cdcc6f4
Also, rename `call-with-current-continuation-attachment` to
`call-getting-continuation-attachment`.
original commit: e2a00e6d641b92918c4911c27ba14949748fd291
Add a shortcut check when refiying the continuation frame in tail
position, which is significantly cheaper when the frame is already
there. We pay down the check by skipping an attachment-lists check
that is not needed if the frame is newly reified.
Aslo, add a one-shot continuation-frame cache, which makes a shallow
temporary attachment cheaper, as in
(let loop ([i N])
(if (zero? i)
0
(loop (call-setting-continuation-attachment
i
(lambda ()
(f (sub1 i)))))))
The cache is just one frame. Keeping a chain of allocated-by-not-GCed
frames doesn't pay off.
Meanwhile, remove the leftover `$shift-attachment` library entry.
original commit: 1f454f536b1d7efe20fe9e793cda31e54e31e5f4
Weak pairs, ephemeron pairs, some symbols, and some ports were handled
incorerctly when locked multiple times.
original commit: 847fc1c84496f67cd363c8411d0023339f4d6246
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