Repository navigation
0.0.11 - 2026-10-24
Added
egcl-ext:with-locked-hash-tableis implemented. It was documented but undefined. It runs its body holding a recursive lock of the table's own, so the bodies ofwith-locked-hash-tableforms on one table exclude each other, as in SBCL (#547).EGCL-MOPaddsmethod-function(AMOP's function ofargsandnext-methods, whosecall-next-methodruns those methods in turn),generic-function-method-combinationandfind-method-combination(a method-combination object forstandardor a built-in short form, asdefgeneric's:method-combinationchose it),generic-function-method-classandgeneric-function-declarations. Generic functions now print as#<STANDARD-GENERIC-FUNCTION name>, including(setf name)ones, instead of#<FUNCTION>. The closer-mop fork imports the new names (#512).EGCL-MOPreads generic functions and methods:generic-function-name,generic-function-lambda-list,generic-function-argument-precedence-order,method-specializers,method-generic-function,method-lambda-list,specializer-direct-methods,specializer-direct-generic-functions,compute-applicable-methods-using-classes(AMOP's two values) andeql-specializer-object. A program can find every generic function with a method on a class and write a congruent method of its own on each; answers followremove-methodand redefinition.method-generic-functionnow also answers a(setf name)generic function instead ofnil. The closer-mop fork imports these, so thec2mop:names work on EGCL (#511).egcl-ext:map-readtable-macro-characterscalls a function once for each macro character of a readtable, with its reader function, whether it is non-terminating, and, for a dispatching character, its sub-characters and their functions. Libraries such as named-readtables no longer need to probe all 1,114,112 character codes, which took about 9 seconds permerge-readtables-into; with this function a merge takes a few milliseconds.get-macro-characternow returns a function for a dispatching macro character made withmake-dispatch-macro-characterinstead ofnil(#489).EGCL_T2_LOGand thecompiletrace (EGCL_LOG=compile=trace) say why a function never left the interpreter on x86-64 Linux: a captured closure environment, an&rest/&key/&auxlambda list, a special or boxed parameter, or the first bytecode instruction the native compiler refuses. Such functions never reach T2, and used to be absent fromEGCL_T2_LOGor logged only as "mapped native entry unavailable". A mapped T2 decline now names the refused instruction too (#462).- When the native compiler itself refuses a function,
EGCL_T2_LOGand thecompiletrace name the failing step -- for example the mapped emitter's error or a control scope a transfer site cannot recover -- instead of the generic "native emission declined" (#469). EGCL_T2_LOGnow explains the remaining hot functions that stayed at T0 without a word. A function orDEFMETHODbody the bytecode compiler cannot lower logsNAME: not compiled to bytecode (REASON), naming the construct, such as a special variable used as a lambda-list parameter, an unsupportedSETFplace, or a method defined inside a lexical binding. A function whose closure needs its capturedBLOCK/TAGBODYlogs a T1 decline, and a function blacklisted after repeated guard deopts logs one summary line naming where T0 resumed and the disproved speculation. Deopt lines now use the same plain function name as the rest of the log (#480).EGCL-EXT:INFLATEdecompresses raw deflate, zlib and gzip data in the runtime, checking each format's trailer. EGCL's port of chipz uses it, so unpacking a package withocicl installno longer runs chipz's inflate in interpreted code: extracting a 120 KB tar archive takes 3 s instead of 23 s (#455).- Shared libraries can travel inside a saved executable.
egcl-ffi:embed-foreign-libraryreads one on the build host, andload-foreign-librarythen finds it by SONAME, path or alias on any host. The executable's appended data is now a zip archive, sounzip -l applists the embedded libraries and ordinary zip tools can extract, replace, add or remove them, as the LGPL requires users to be able to. On glibc builds with thec-ffibackend a library is loaded from a sealed, CRC-checked in-memory file, never extracted to disk, and embeddedDT_NEEDEDdependencies are loaded the same way (#445). EGCL-EXT:CRYPTO-SHA512-BLOCK,CRYPTO-SHA512-WORDS,CRYPTO-KECCAK-F1600andCRYPTO-KECCAK-ABSORB: native SHA-512/384 compression and Keccak permutation for Ironclad, whose 64-bit words are bignums in Lisp. With the EGCL fork of Ironclad, a repeated HTTPS request through pure-tls drops from about 11 s to 7 s (#453).
Performance
-
A minor garbage collection no longer keeps dead lists alive because they were built by setting a cons's cdr, as
loop ... collect,(setf (cdr tail) ...)andnconcdo. Every such store was recorded as a root for the next minor collection, even when the cons itself was new and already garbage, so the collector copied most of the 64 MB nursery each time. A loop that collects 50-element lists 300,000 times spent 12.4 s in collection and now spends 0.06 s (#631). -
On AArch64, a self-recursive function calls itself through a register entry instead of generic dispatch:
fib 27at T2 drops from 334 ms to 34 ms, and a self-recursive sum from 938 ms to 44 ms (#622). A hot tail-recursive function now promotes to T2 and runs at loop speed instead of 16 times slower, and its declared integer ranges are enforced (#592). -
The System Z, ppc64le and AArch64 ports compile more code natively: captured variables, closure factories, register entries for resolved callees, raw double-float operations and four-argument callees on System Z, and closure factories on ppc64le and AArch64 (#475, #477, #484, #485, #486, #505, #531, #612, #613, #614).
-
On x86-64 Linux, a loop in a function that is called only once now leaves the interpreter part-way through: once it has gone round 100,000 times, the function is compiled and the running loop continues in native code from the same iteration. Before, such a loop ran interpreted to the end. Without any warm-up, 10,000,000 iterations of a fixnum sum loop take 0.21 s instead of 14.5 s, of a loop that calls another function 4.7 s instead of 16.8 s, of a loop that reads a special variable 2.9 s instead of 14.6 s, and 3,000,000 of a consing loop 4.3 s instead of 9.4 s; three calls of a 2,000,000-iteration driver of a double-float step function take 6.1 s instead of 21.5 s. A loop inside the same function's
handler-case,unwind-protect,catchor special binding, a loop that computes with double-floats, and a loop at top level still run interpreted (#630). -
On x86-64 Linux, a function whose loop uses
push,decforloop ... collectnow gets the fast register calling convention when it is optimized, as other loops already did, so calling it is cheaper: 100,000 calls of a 50-iterationpushloop take 0.34 s instead of 0.50 s (#630). -
loop ... collectno longer callsrplacdandlastfor every element it collects: a collected element is a fresh one-element list, so it becomes the new tail directly. A compiled(loop repeat 50 collect x)drops from about 287 µs to 80 µs (#628). -
On x86-64 Linux, optimized code allocates conses and double-float boxes itself, bumping the thread's allocation buffer, instead of calling the runtime for each one. A warmed
(cons 1 2)in a loop drops from about 0.26 µs to 0.013 µs,(list a b c d)from 0.52 µs to 0.044 µs and(list* a b c d)from 6.2 µs to 0.063 µs; 50pushes take 2 µs instead of 13 µs and(make-list 50)about 9 µs instead of 20 µs, and consing a double computed in the loop drops from 0.38 µs to 0.035 µs. Collections andEGCL_GC_STRESSbehave as before;EGCL_INLINE_ALLOC=0turns inline allocation off (#625). -
On x86-64 Linux, a function whose body loops (
dotimes,dolist,do,loopor atagbody) now calls other compiled functions with a direct machine call once it is optimized, instead of building a managed activation for each call, and its loop no longer calls into the runtime on every iteration. A warmed call to a two-argument function from such a loop drops from about 690 ns to 12 ns. Calls to functions with&optionalor&keyparameters, andapply, also get cheaper:applyof a function object from a loop drops from about 1.8 µs to 0.75 µs andfuncallof a symbol from 2.7 µs to 1.6 µs (#621). -
On x86-64 Linux, optimized code now calls more kinds of functions with a direct machine call, as it calls fixed-arity functions since #621:
- A function whose trailing parameters are
&optional(at most three parameters): a warmed call from a loop drops from about 640 ns to 15 ns. - A function with
&keyparameters whose defaults are constants, binding at most three variables: about 680 ns to 30 ns. - A function that computes with raw double-floats, and a loop that accumulates them: a call to a function returning
(+ x 1d0)drops from about 880 ns to 180 ns, most of which is boxing the argument and the result.
(#623)
- A function whose trailing parameters are
-
On x86-64 Linux, optimized code also calls a function with declared parameter types, such as
(declare (fixnum x)), with a direct machine call; the function's entry checks the declarations and signals the sametype-erroras before. A warmed call from a loop drops from about 700 ns to 14 ns.(funcall f ...)from optimized code, wherefis the current definition of a named function, now enters that function directly too:(funcall #'f s 1)in a loop drops from about 660 ns to 19 ns (#624). -
On x86-64 Linux, optimized double-float code no longer falls back to generic arithmetic when it combines a declared fixnum with a double-float under
(safety 0), as in(* i 1d-3); the fixnum is converted to the nearest double, as before.+,-and*of three or more double-floats now also compute on unboxed doubles. GH #594'sstep-plaindriver, which does both, drops from about 2.4 µs to 0.14 µs per call (#627). -
On x86-64 Linux, optimized code computes
sqrt, unary-and/of double-floats natively on unboxed doubles instead of calling the builtin. The answers are unchanged:sqrtof a negative double still returns a complex,(sqrt -0d0)and(- 0d0)are still-0.0d0, and dividing by zero still signalsdivision-by-zero. Over 10M iterations, a loop adding(sqrt (* x x))drops from about 5.1 s to 0.09 s, one adding(/ x 3d0)from 3.7 s to 0.085 s, and one negating its sum from 4.2 s to 0.09 s. GH #594'sstep-sqrtdriver drops from about 0.49 µs to 0.16 µs per call (2.7 µs before the previous change) (#627). -
More than 50 builtins called from compiled code no longer rebuild and re-evaluate their call form each time. They include
evenp,oddp,/,memberandassocwith:testor:key,mapcar,map,format,type-of,boundp,string=,make-hash-table,find-class,random,concatenate,float,sqrtand the other transcendental functions, and the array, pathname and file predicates and accessors. A:test,:keyor mapped function that is a builtin, such as#'equalor#'1+, is called directly. On x86-64 Linux,(oddp e)in a compiled loop drops from about 14 µs to 0.6 µs, so(count-if #'oddp list)costs about 2.9 µs per element instead of 28 µs.type-of,boundpandstring=drop from 19–26 µs to about 4.5 µs a call,memberandassocwith:testfrom about 30 µs to 7 µs, andmapcarandformat nilfrom about 32 µs to 14 µs (#618). -
(require :asdf)takes about half as long: 6.4 s instead of 11.8 s on an x86-64 Linux release build, which shortens every start whose~/.egclrcloads ASDF. UIOP'sdefine-packagespent most of that time in symbol and package lookups.find-symbol,intern,export,import,unintern,symbol-package,package-use-listandpackage-used-by-listno longer scan every symbol of a package, or of every package, to find one symbol, and they no longer allocate a string for each lookup. Called from compiled code, these functions andstring,list,gethashstores and(setf car)/(setf cdr)now cost about 1 µs instead of 3-27 µs.equalhash tables with string keys hash and compare the keys in place (#610). -
On s390x, a loop whose entry carries a hoisted fixnum proof can be entered mid-loop at T2. Such loops previously installed optimized code with no on-stack-replacement entry to land on, so they could only be replaced into T1. Measured on a z16, one counted integer loop runs at about 0.022 µs per iteration entered at T2 against about 0.088 µs entered at T1; across the tier-differential corpus 24 more functions now publish at least one on-stack-replacement entry. A loop in a function that never reaches T2 at all is unaffected (#611).
-
substitute,substitute-ifandsubstitute-if-noton a whole list without:countor:from-endmake one pass over the list, asremovedoes since #607. Substituting in an 8-element list drops from about 207 µs to 90 µs (#608). -
remove,remove-if,remove-if-not,deleteanddelete-ifon a whole list without:countor:from-endmake one pass over the list, instead of copying it into a vector, collecting the matching positions and then searching those positions once per element.(remove 1 nil)drops from about 88 µs to 10 µs, and removing from an 8-element list from about 190 µs to 70 µs (#607). -
sortandstable-sortcalled from compiled code no longer rebuild and re-evaluate their call form each time, and a builtin predicate or key such as#'<or#'caris called directly instead of through the general function-call path on every comparison. On x86-64 Linux, sorting 100,000 elements drops from about 25 µs to 13 µs per element with alambdapredicate, from 16 µs to 6.3 µs with#'<, and from 28 µs to 2.3 µs for a vector sorted with:key #'car(#606). -
A minor garbage collection costs time in proportion to the data that survives it, not to how much was allocated since the last one. It no longer walks every object in the 64 MB nursery to find pinned objects, and no longer clears every byte of the reclaimed space during the pause; the space is cleared as it is handed out again. On x86-64 Linux a loop that allocates heavily but keeps nothing alive pauses about 7 ms per collection instead of about 48 ms (#605).
-
funcallandapplyof a function object whose optimized native code is already installed run that code directly, instead of working out again on every call how to call the object. On x86-64 Linux, a warmed loop of(funcall f s 1)drops from about 2.0 µs to 0.65 µs a call for adefun'd function, from 2.5 µs to 0.63 µs for alambda, from 4.0 µs to 1.6 µs for a closure, and from 0.9 µs to 0.3 µs for#'+. Higher-order functions written in Lisp gain the same way:reduce,find-ifandmapcarover 100,000 elements run two to four times faster, andsortwith alambdapredicate about twice as fast. Argument-count and keyword errors, multiple values, non-local exits and redefinition behave as before (#604). -
make-instanceof a class reuses what it worked out for the class's previous instances: which slots each initarg fills, the default initargs and initforms to run, and the:aftermethods oninitialize-instanceandshared-initializethat apply. Compiled code,funcallandapplycall it directly instead of building and evaluating a form. On x86-64 Linux, in a hot function,(make-instance 'point :x i :y i)drops from about 40 µs to 1 µs, and a subclass with a third slot from about 54 µs to 1.1 µs. Initarg checking, default initargs, initforms, user methods, class redefinition andmake-instances-obsoletebehave as before; adding or removing a method or redefining a class makes the next call work everything out again (#596). -
Compiled calls to structure accessors and to class
:reader,:writerand:accessorfunctions read or store the slot directly. A read such as(point-x p)drops from about 3.2 µs to 0.2 µs, and a store such as(setf (point-x p) v)from about 5 µs to 0.2 µs, on x86-64 Linux in a hot function. User methods on the accessor, redefinitions of the accessor or its class, and slot type checks behave as before. A(setf place)writer installed with(setf fdefinition)ordefunis now also used when a compiledsetfof that place calls it by name, as#'(setf place)already did (#588). -
On x86-64 Linux, single-float code compiles natively. A function with a single-float literal, such as
(defun f1 (x) (+ x 1.0)), used to stay in the interpreter; now single-float+,-,*and the comparisons<,<=,>,>=and=run as native code in the T1 and T2 tiers, with the interpreter's results. A single-float Fibonacci,(ffib 27.0), drops from about 2.1 s to 0.02 s, and(+ x 1.0)called ten million times from about 21 s to 5.5 s, the same as its fixnum version. A cold call site that was guessed to be fixnum now recompiles after its first wrong guess instead of after eight deoptimizations (#590). -
On x86-64 Linux, double-float arithmetic compiles natively in the T2 tier.
+,-and*of two numbers, at least one of them a double-float, and the comparisons<,<=,>,>=and=on double-floats now run on unboxed doubles. A double stays in a register from one operation to the next and across loop iterations, and is boxed only when it is returned, passed to a call or stored. Results are the interpreter's, including contagion with fixnums, signed zeros, infinities and comparisons with NaN. Ten million iterations of(setq s (+ s 1d0))drop from about 2.9 s to 0.05 s, the same as the fixnum loop, and a double-float Fibonacci,(ffib 27d0), from about 3.2 s to 0.15 s (#602). -
A function containing
load-time-valuecompiles in the running image, with eachload-time-valueform evaluated once when the function is compiled. It stayed in the interpreter and evaluated the forms on every call, so CL-UNICODE rebuilt a literal cl-ppcre scanner per call (#566). -
On x86-64 Linux, a hot function that calls a small helper that can deoptimize, such as
(defun pick (x y) (car y)), now reaches the optimizing T2 tier. Inlining the helper used to make T2 refuse the caller, which then stayed at T1. A loop that calls such a helper 2,000,000 times drops from about 6.6 s to 1.2 s (#557). -
A function whose
restart-caseclause does agoto an enclosingtagbodytag or areturn-fromto an enclosingblocknow compiles; it ran in the interpreter (#555). -
MEMBER-IF,MEMBER-IF-NOTandREAD-DELIMITED-LISTleave the interpreter. All three usedDO, whose expander is defined later in the same prelude file, so the bytecode compiler refused their bodies and no later call could lift them -- they ran tree-walked for the life of the image. Scanning a 2000-element list 300 times withMEMBER-IFdrops from 50.3 s to 0.9 s, and it is now faster than the equivalentCOUNT-IF(#523). -
Linux AArch64 compiles more code natively. Its optimising compiler refused the type predicates (
TYPEP,SYMBOLP,INTEGERP,STRINGP,HASH-TABLE-P),LENGTHon a simple string, memory fences, and the unreachable path after a call that never returns; its baseline compiler refused closure creation, memory fences, one of the two conditional branches, and the result check a declaredFTYPEends in. A refused operation does not merely run slowly -- it costs the WHOLE function its native code, so a declared return type or a single closure kept a function interpreted. Over the tier-differential corpus, 75 functions now reach the optimising tier where 59 did. Numeric code also stops saving and reloading values the collector can never move around each runtime call (#501). -
On x86-64 Linux, interpreted code calling a function that has been compiled to native code no longer pays for a system call on every call: the runtime asked the kernel for the thread's shadow-stack status each time it entered native code, and now asks once per thread. Such a call also skips work that cannot change its outcome -- the tier bookkeeping for a callee already at T2, a fresh root for the callee's identity, and reloading unchanged floating-point control registers. A two-argument fixnum
+called from aCOMPILE-FILEd loop that stays in the interpreter fell from about 2.5 us to 1.0 us per call net of the loop; the same call with the callee left in the interpreter costs about 0.8 us, so a compiled callee is still slightly slower from interpreted code. A call with one&keyargument fell from about 6.3 us to 3.8 us, against about 1.5 us interpreted, andFUNCALLof a closure from about 9 us to 6 us (#499). -
On x86-64 Linux, a call from interpreted code to a function compiled to the optimizing tier's direct native calling convention takes a shorter entry path, so such a call is now cheaper than calling the same function interpreted. A two-argument fixnum
+called from aCOMPILE-FILEd loop that stays in the interpreter fell from about 0.95 us to 0.7 us per call net of the loop, against about 0.8 us with the callee interpreted. Compiled code calling a builtin such asELT, or a compiled&keyfunction calling a function such asCHAR, no longer looks the callee up again or prepares an unusable call frame on every call. A call with one&keyargument whose body callsCHARfell from about 3.8 us to 2.4 us, which is still slower than the 1.5 us it costs interpreted (#502). -
On x86-64 Linux, optimized (T2) code reads
CHAR,SCHARandELTof a simple string inline instead of calling the function. Any other argument, such as a list, a string with a fill pointer, or an index out of range, still calls the function, with the same result or error as before. A call from aCOMPILE-FILEd loop that stays in the interpreter to(defun kw (s &key (start 0)) (char s start))fell from about 2.6 us to 0.9 us net of the loop, about half its 1.7 us cost withKWleft interpreted.CHARitself, which is defined withELT, is cheaper to call from interpreted code once compiled than left interpreted (#506). -
On x86-64 Linux, a closure that reads or sets variables captured from the function or
LETthat created it --(lambda (y) (+ x y k)), a counter's(lambda () (incf n)), or a wrapper such as(lambda (&rest a) (apply original a))installed with(setf (symbol-function 'f) ...)-- now compiles to native code and can reach the optimizing tier, including by on-stack replacement of a running loop, instead of staying in the interpreter. All closures made by oneLAMBDAshare one compiled body. This applies when the creating code is itself compiled, as it is for files built withCOMPILE-FILEor ASDF and for functions called often enough to compile.EGCL-EXT:FUNCTION-TIERnow reports the tier such a closure runs at. A closure whose&optionalor&keydefault reads a variable of its creator, such as(lambda (x &key (off base)) ...), no longer signalsUNBOUND-VARIABLEwhen the creator is compiled (#494). -
A closure whose creator has not been compiled -- a function called only once, such as
(defun outer (x) (let ((k 3)) (lambda (y) (+ x y k)))), or a toplevelLETthat installs a wrapper with(setf (symbol-function 'f) ...)-- is now compiled itself once it has been called a few times, and can then reach native code and the optimizing tier. Such closures used to run in the interpreter however hot they became, andEGCL-EXT:FUNCTION-TIERreturnedNILfor them. A closure that calls a local function of its creator'sFLETorLABELS, or that sees a localSPECIALdeclaration, still runs in the interpreter (#497). -
A minor collection's pause no longer grows with the old generation on Linux. To find references into the nursery the collector traced every older object twice per minor collection, about 3-5 ms per MB of live conses: with 150 MB of conses retained, each minor collection took 0.4-0.8 s. It now asks the kernel which pages were written since the previous minor collection (soft-dirty tracking) and scans only those. The same minor collections take 44-68 ms with 0-250 MB retained, and 48-50 ms with 0-150 MB of fixnum vectors (previously up to 174 ms). Tracking costs a page fault on the first write to each page of the process after every collection, mostly nursery pages, so it starts only once the old generation reaches a quarter of the nursery's size (16 MB by default);
EGCL_GC_SOFT_DIRTY=1uses it always andEGCL_GC_SOFT_DIRTY=0never. Kernels without soft-dirty support and other systems keep the full scan (#491). -
A call to a function with
&optional,&rest,&keyor&auxparameters no longer re-parses its lambda list and binds it through the interpreter on every call. The lambda list is parsed once, and calls whose omitted parameters default to constants bind straight into the frame; a default that must be evaluated,:allow-other-keysin a call, or a malformed keyword list still takes the general binder. A one-&keycall from bytecode into native code, which had become slower than the bytecode call it replaced, is now about half its previous cost and faster than the bytecode call; calls with several&keyparameters are back to about the bytecode call's cost, and every call from bytecode into native code is cheaper. A function the baseline compiler declined, including every closure made from a declined(lambda ...), is no longer re-checked for tier-up on each call, andEGCL_LOG=compile=tracelogs that decline instead of a dispatch line per call (#495). -
On x86-64 Linux, a function whose
LAMBDAmakes aRETURN-FROM,RETURNorGOto a block or tag that theLAMBDAitself establishes, such as(mapcar (lambda (x) (dolist (y x) (when (p y) (call (lambda () (return y)))))) list), is now compiled natively and can reach the optimizing tier. Only a closure that exits past theLAMBDAit belongs to still keeps its creator in the interpreter. A function also no longer establishes its implicit block when its onlyRETURN-FROMforms name other blocks (#479). -
On ppc64le, functions that use
MULTIPLE-VALUE-LISTorMULTIPLE-VALUE-PROG1now reach the optimizing tier instead of stopping one tier below it, and functions that create a closure capturing no local variables --(mapcar (lambda (x) (* x 2)) l),(sort l (lambda ...)),(remove-if (lambda ...) l)-- compile to native code and reach the optimizing tier instead of staying in the interpreter entirely. x86-64 Linux gained these through its mapped native entry; POWER has no mapped entry, so its emitters call the same runtime helpers directly. A function creating a closure that does capture a variable now compiles to baseline native code there as well, instead of staying in the interpreter; it still does not reach the optimizing tier, as on x86-64 (#478). -
A
BLOCKorTAGBODYthat containsASSERT,CHECK-TYPE,IGNORE-ERRORS,HANDLER-CASEorRESTART-CASEis no longer registered by name unless a closure or restart clause created inside it exits to it by name. Registration cost three allocations each time the block was entered, and on x86-64 Linux the native compiler declined any function containing such a block ("PushBlock needs an executing identity"). Those functions can now compile to native code, although other limits still apply: a function stays in T0 bytecode when a closure exits to its block (for example aHANDLER-BINDhandler that doesRETURN-FROM), or when aRETURN-FROMorGOleaves aHANDLER-CASE,IGNORE-ERRORSorUNWIND-PROTECTbody. A cold Babel load compiles six more ASDF and UIOP functions to native code, among themMAKE-ACTION-STATUS,COMPUTE-ACTION-STATUS,TRUENAMIZEandFEATUREP(#481). -
Calling a natively compiled function from interpreted code is cheaper on x86-64 Linux. Each such call used to rebuild the activation state for every call site in the function, which was one of the largest costs of loading Babel; the state of a finished call is now reused. The T1 compiler also no longer rescans the whole function for each removed trivial phi, each block's predecessors or each loop poll. A cold
(asdf:load-system :babel)drops from about 44 s to 32 s (CPU time from 37.9 s to 26.0 s), which also undoes the slowdown that compiling more functions natively had caused (#483). -
COUNT,COUNT-IFandCOUNT-IF-NOTcompile to bytecode instead of being tree-walked on every call, andFIND,FIND-IF,FIND-IF-NOTand theCOUNTfamily no longer build a closure for each call. Counting over a 100-element sequence is about 45x faster (COUNT-IFabout 12x) andFINDabout 2x faster. None of these functions is refused native compilation for a closure environment any more, and with keyword functions now compiling natively they reach T1 and T2 when hot (#465). -
Methods hot by call count compile to native code on x86-64 Linux. A method's compiled body is named
(METHOD ...), which the T1 compiler tried to read back as a symbol; it failed, so any method needing the optimizing frontend stayed interpreted and never reached T2. Loading Babel now compiles 23 more ASDF methods to T1, and a method called past the T2 threshold is optimized like aDEFUN(#469). -
A
(return-from NAME ...)inside aFLETorLABELSfunction compiles to bytecode: the compiler now establishes the implicit block named after the local function, as the tree-walker does. Such a return used to send the whole enclosing function to the tree-walker. chipz's inflate state machine is one, and inflating a 2.7 KB gzip member drops from 50 s to 2.7 s (#449). -
REPLACEbetween simple vectors or simple strings,SEARCHwith the defaultEQLtest and no key on them, andFILLof a simple vector or simple string run natively instead of element by element in Lisp. Parsing a 121-certificate CA bundle with pure-tls drops from 20 s to about 14 s, and zeroing a 1 KB octet buffer withFILLfrom 4.4 ms to 28 us (#450). -
Writing a slot of a structure that has typed slots stores through the accessor fast path once the value satisfies the slot's type, instead of running the writer method's body: about 12 us per write instead of 61 us. A value of the wrong type still signals the correctable
TYPE-ERROR(#452). -
MAKE-ARRAYof a plain vector -- a fixnum length, at most:ELEMENT-TYPEand either:INITIAL-ELEMENTor:INITIAL-CONTENTS, and an element type that upgrades to T -- is built natively instead of through the full option parsing:(make-array 16)takes about 12 us instead of 31 us, and a four-element vector from a list about 17 us instead of 88 us (#454). -
On x86-64, functions that multiply, left-shift or compare a fixnum by a constant wider than 32 bits, such as
(* a 1000000000000),(ash a 40)or(< a 1000000000000), now reach the optimizing tier instead of stopping one tier below it (#456). -
Functions whose lambda list has
&optionalparameters, but no&rest,&keyor&aux, now compile to native code on x86-64 Linux. They used to stay in the interpreter there, because the native entry required every argument; it now fills in omitted optional arguments itself, so these functions reach T1 and then T2 like fixed-arity ones (#457). -
Functions whose lambda list has
&rest,&keyor&auxparameters now compile to native code on x86-64 Linux too, provided no closure captures those parameters. The native entry binds the lambda list with the same binder as the interpreter, so keyword checking, supplied-p variables and defaults behave as before. Prelude functions such asSTRING-UPCASE,POSITION-IF,REDUCEandPARSE-INTEGERnow reach T1 and then T2 instead of staying in the interpreter (#470). -
Functions that create closures over their own parameters or local variables now compile to native code on x86-64 Linux, for example
REMOVE,REMOVE-IFand any function that builds aLAMBDAover aLETbinding it later changes. Such functions used to stay in the interpreter. The native entry now builds the shared closure environment the same way the interpreter does, so closures still see and change the same bindings, including after on-stack replacement into T2 and after deoptimization. Closure bodies that read bindings from the function that created them still run interpreted (#482). -
FLOOR,CEILING,TRUNCATE,ROUND,MODandREMon bignums divide once instead of going through exact rational arithmetic, which reduceda/bwith a gcd first. AMODof a 4096-bit number by a 2048-bit one is about 45x faster, an RSA-2048 signature check through Ironclad about 65x, and a repeated HTTPS request through pure-tls drops from about 38 s to 11 s (#443). -
LOOPclauses that step a numeric index (for i below n,for i from a to b, withcollect,append,nconc,sum,countand the like) now reach the optimizing T2 tier. Guard elimination left their IR failing verification, so such loops stayed at T1 (#458). -
A function whose arithmetic first runs natively on a path it had not yet taken, for example double-float code compiled before it was profiled or a branch first reached with double floats, no longer drops back to the interpreter for good. Its failed fixnum guesses now recompile it from the types seen since, so it stays native and can reach T2 (#459).
-
On x86-64 Linux, a hot function that names another with
#'f-- such as(apply #'+ l),(mapcar #'1+ l),(funcall #'f x), or aSETFof a structure or class accessor -- is now compiled by the optimizing T2 tier instead of stopping at T1. It still looks the function up on every call, so redefining it takes effect as before (#460). -
Functions that use
MULTIPLE-VALUE-LISTorMULTIPLE-VALUE-PROG1now compile to native code on x86-64 Linux and reach the optimizing tier. They used to stay in the bytecode interpreter (#461). -
Functions that build lists with backquote now compile to native code on x86-64 Linux and can reach the optimizing tier; they used to stay in the bytecode interpreter. In a cold
(asdf:load-system :babel)this moves functions such asUIOP:NORMALIZE-PATHNAME-DIRECTORY-COMPONENTandASDF:MAKE-OPERATIONout of the interpreter (#464). -
Native code returns NIL for
CARorCDRof NIL instead of falling back to the interpreter. Each such fallback counted as a failed speculation, so functions that routinely reach the end of a list --CDDR,CADR, or ASDF'sABSOLUTE-PATHNAME-Pon a pathname without a directory -- were sent back to the interpreter for good after eight of them. They now keep their native code and stay eligible for further tier-up (#472).
Fixed
-
A ppc64le background T2 worker no longer aborts with "no entry found for key" when it inlines a callee whose blocks are laid out out of order (#503).
-
An allocation that fails because the collector could not run now reports the collector's error, instead of "GC heap unavailable" or "memory allocation of 24 bytes failed" (#550).
-
Compiling a
restart-casekeeps its already-compiled clauses alive while later clauses compile, so a collection in between can no longer leave one dangling (#553). -
(compile nil '(lambda ...))keeps the lambda'sthetype checks (#571). -
(abs -0d0)returns0.0d0, as(abs -0.0)already returned0.0; it returned-0.0d0(#629). -
A function whose optimized code arrives while one of its loops is still running inside a call from another function no longer crashes with "ordinary entry is not an OSR destination". The running loop now jumps into the optimized code at the right place, as it already did for an outermost call (#626).
-
A garbage collection no longer fails because another thread is late to stop for it. A thread compiling a large function to native code checks for a pending collection only when the compile finishes, which under load could take more than the second the collector allowed; every collection requested meanwhile failed with "safepoint handshake failed", and could then abort the process. The collector now waits up to 60 seconds (
EGCL_SAFEPOINT_TIMEOUT_MS), and prints a note if a wait exceeds 5 seconds (#617, #609). -
Compiled code calls
vector,string,find-packageandgensymdirectly, and compiled(setf (aref ...)),(setf (elt ...))and
(setf (car|cdr ...))store directly. Each used to be rebuilt as a form
and re-evaluated on every call:(vector ...)from compiled code went from
about 16.6 µs to 3.3 µs
(#603). -
reducewalks only its:start/:endrange, in place. It copied the
whole sequence into lists first, so it allocated in proportion to the
sequence and ran about twice as slowly
(#601). -
A joined thread no longer keeps about 88 KB of memory on the default
x86-64 musl build. The thread-caching allocator now gives an exiting
thread's cached blocks back, and each thread's links to the functions it
compiled are released once it has exited. The issue's joined churn now grows
by about 1.5 KB per thread, down from 88 KB, so a thread-per-connection
server no longer leaks most of that per connection
(#598). -
make-instancecallsallocate-instanceandinitialize-instanceas
generic functions, andinitialize-instance's standard method calls
shared-initialize, as CLHS 7.1 requires. User primary,:beforeand
:aroundmethods oninitialize-instanceandshared-initialize, and
methods onallocate-instance, used to be skipped; only:aftermethods
ran. A primary method that does not call the next method now leaves the
slots uninitialized, as in other implementations. Amake-instance,
allocate-instanceor other standard generic function with only:around,
:beforeor:aftermethods of the user's no longer signals "no primary
method found": the standard method is its primary method. A user
make-instancemethod with&keyparameters no longer makes every other
initarg an invalid keyword argument. Classes with no such methods keep the
fast path (#600). -
Allocating an instance or a structure no longer discards every cached
class precedence list, and a structure constructor no longer recomputes
its class's precedence list on each call
(#593). -
A thread made with
egcl-thread:make-threadthat finishes without being
joined no longer keeps its memory. Each kept its OS thread stack, Lisp
stack and thread-local storage, about 90 KB of RSS, until a join that a
thread-per-connection server never makes, so such a server ran out of
memory. Its OS thread and stacks are now released when another thread starts
or finishes.join-threadstill returns its values once, and
thread-namestill answers until then
(#595). -
Iterating the symbols of a package that does not exist, with
loopor
with-package-iterator, signalspackage-errorinstead of iterating
nothing (#589). -
Allocation no longer takes the global heap lock on every object: each
thread counts its allocations privately and publishes them when its
allocation buffer is retired. A cons-heavy loop runs about 20% faster, and
threads that allocate no longer serialise on that lock or on a cache line
shared between the signal-activity word and per-thread recovery slots
(#587). -
(make-pathname :directory '(:relative))keeps its(:relative)
directory instead of turning it into NIL, so as apathname-match-p
wildcard it no longer matches every directory
(#585). -
Several stream functions now follow the standard more closely:
read-char-no-hangon an exhausted string stream returns the eof value
or signalsend-of-file, instead of returningnil. It also rejects a
fifth argument with aprogram-error.- The
end-of-filethatread-char,read-char-no-hangandpeek-char
signal now carries the stream that ran out, sostream-error-stream
returns that stream. - An echo stream echoes each character only once. A character returned by
unread-charis not echoed again when it is read, andpeek-chardoes
not echo the character it peeks. peek-charwith a peek type oftskips the characters the current
readtable treats as whitespace.- A broadcast stream's
stream-external-formatandfile-string-length
come from its last component. With no components they are:default
and 1. - A string output stream made with a
base-charelement type, including
one fromwith-output-to-string, returns asimple-base-string.
(#586)
-
A file stream opened through a logical pathname reports that pathname:
pathnameof the stream returns it, andlogical-pathnameaccepts the stream.pathnamereturned the translated physical pathname, andlogical-pathnamerejected every stream (#584). -
A logical pathname keeps its version.
(parse-namestring "host:temp.dat.newest")has version:newestand the namestring"HOST:TEMP.DAT.NEWEST"; the version was dropped (#583). -
type-ofa pathname returnspathname, and of a logical pathnamelogical-pathname. Both returnedt(#582). -
egcl-ext:atomic-incfandegcl-ext:atomic-decfon a structure or CLOS accessor place work in compiled functions andcompiled lambdas. They signalled "not a structure-slot accessor" (#580). -
A lambda parameter declared or proclaimed special is bound dynamically as soon as it is bound, so later
&optional,&keyand&auxinit forms, and the functions they call, see its new value.define-compiler-macroaccepts a(setf name)function name, andcompiler-macro-functionreturns it. A compiler macro called on a(funcall #'name ...)form destructures the arguments after the function, as the standard requires (#581). -
A
letof a variable whose name has earmuffs, such as*x*, is lexical unless the variable was proclaimed special bydefvar,defparameter,declaimor aspecialdeclaration, as the standard requires. Every such binding was dynamic, so a localspecialdeclaration leaked into nested bindings and the functions they called. The standard and built-in special variables are still special (#579). -
A macro named
atomic-incforatomic-decfin any package runs its own expansion. Such calls ranegcl-ext:atomic-incf/atomic-decfinstead, matched by name, which broke the Atomics library and AllegroServe (#578). -
(setf (symbol-function x) f)signals atype-errorwhenxis not a symbol, as the standard requires. It signalled asimple-error(#575). -
(require :asdf)works on machines other than the one that built egcl. It loadedlib/asdf.lispfrom the build's source tree; it now falls back to a copy of ASDF compiled into the binary.EGCL_ASDF_FILEnames a different ASDF to load (#573). -
Strings a program produces are garbage-collected.
format nil,get-output-stream-string,with-output-to-string,read-lineandprinc-to-stringused to keep every distinct result forever, so a long-running program that produced strings grew without bound, about 14 MB per 100,000 short strings. These functions now return fresh strings: tworead-lineresults with the same text are no longereq, and modifying one no longer changes the other. A finalizer on a string now runs once the string is unreachable, and a weak hash table now drops a dead key that had survived several collections (#577). -
typepagainst a(mod n)type handles bignums: a bignum object in range answered NIL, and a bignum modulus crashed the runtime (#572). -
Character case follows Unicode instead of covering ASCII only.
char-upcase,char-downcase,upper-case-p,lower-case-p,both-case-p, thestring-upcase,string-downcaseandstring-capitalizefamilies,char-equalandstring-equaland their ordering relatives,equalp,equalphash tables and the~(format directive all agree, as in SBCL:(char-upcase #\é)is#\Éand(string-upcase "ö")is"Ö". A character has case only when its mapping is one-to-one, so#\ß, whose uppercase is two characters, is returned unchanged, and~:@(no longer turns"straße"into"STRASSE"(#570). -
applysignals atype-errorwhen its last argument is not a proper list;(apply #'list 1 2)returned(1).(/= #c(1 2))returns T instead of signalling.defpackagesignals apackage-errorfor:import-froma package that does not exist, before making the package.(setf subseq)signals atype-errorfor a non-integer or out-of-range bound instead of clamping it (#569). -
A loop that evaluates a capturing
fletorlabelsno longer grows without bound. Each closure's code and captured variables were released only by a full garbage collection, which nothing triggered, so 600,000 evaluations of(let ((x i)) (flet ((f () x)) (f)))held 584 MB. Memory now stays at about 40 MB without an explicit(egcl-ext:gc :full t)(#568). -
disassembleof a closure object that has been compiled, such as alambdaor alabelsfunction taken with#', shows its compiled code. It reported "not a compiled EGCL function" althoughegcl-ext:function-tiergave its tier (#567). -
compile-fileno longer installs a file'sdefgenericanddefmethodforms while compiling it, as SBCL does not; they take effect when the fasl is loaded. A method compiled into the running image could run before the rest of its file had loaded: ASDF-FLV'sasdf:perform :aroundmethod found its owndefvarunbound, which stopped pure-tls's tests from loading (#565). -
egcl --load FILEno longer leaves stale heap pointers in the top-level environment when a garbage collection runs while the load is starting. UnderEGCL_GC_VERIFYwithEGCL_GC_STRESS, every--loadfailed verification (#564). -
compile-filecompiles a top-level(defgeneric (setf name) ...)again. Since #538 it signalled aprogram-errorwith no message, so usocket, and everything built on it, no longer compiled (#562). -
Sandbox mode refuses
egcl::%socket-listenandegcl::%socket-accept, as it already refusedegcl::%socket-connect. A sandboxed program could open a listening socket (#560). -
(compile nil '(lambda ...))and(compile 'name '(lambda ...))compile the lambda expression to bytecode, expanding its macros duringcompile. The result expanded them at its first call, so a macro with a compile-time effect had not run whencompilereturned (#559). -
(compile 'name)of a function defined withdefuncompiles it to bytecode now, keeping the same function object. It returned success and left the function interpreted until enough calls made it hot (#558). -
makunbound,egcl-ext:casandegcl-ext:atomic-incf/atomic-decfsignal an error for a constant (nil,t, a keyword or adefconstantname).(makunbound 'pi)madepiunbound,cascould replacepi's value, andcasoratomic-incfonnilortpanicked in the runtime (#554). -
In a file compiled with
compile-file, arestart-caseclause that names an enclosing local variable only through a macro now reads and sets that local, as in SBCL. It used the global value instead (#552). -
In compiled code, a
setqorsetfof a variable declared special by an enclosinglocallyor binding form'sdeclarenow sets the dynamic value, as in SBCL. When a lexical binding of the same name enclosed the declaration, the store went to that lexical binding instead; inside a closure orrestart-caseclause this happened in every tier.setnow changes the symbol's value cell, never a lexical binding of the same name (#551). -
A closure saved in an image keeps the
macroletdefinitions of the place it was written. After the image was restored, a closure that called such a local macro signalled an error (#548). -
A user method on
make-instancecancall-next-methodinto the built-in behaviour, andnext-method-pis true there. It signalled that CALL-NEXT-METHOD was undefined.(make-instance 'name ...)also now runs methods specialized on the class object, as(make-instance (find-class 'name) ...)does. A method that is the only applicable one now sees its ownnext-method-p, not an enclosing method's (#546). -
In compiled code, a LOOP's
itnow means the conditional's test value only as the bare operand of the first clause afterwhen,iforunless, as inwhen x collect it. Before, everyitin that branch got the test value. This included anitinside a compound form, which hid an enclosing variable namedit, and anitin a laterandorelseclause. As a result,(loop for x in '(1 nil 2) when x collect (cons it it))returned((1 . 1) (2 . 2))instead of signalling an unbound-variable error, as SBCL and the interpreter do (#545). -
A
labelsfunction called from inside amacroletthat defines a macro of the same name as one of its siblings now calls that sibling, as in SBCL. It signalled an undefined-function error, because the function looked up its siblings where it was called rather than where it was defined (#544). -
Compiled code now leaves a
letcorrectly on a non-local exit when a closure captures one of its variables. This covers athrowto acatch, areturn-from, ago, anunwind-protectcleanup and ahandler-caseclause. Before, the code after the exit kept thatlet's bindings. A variable theletshadowed read the inner value, and a closure created afterwards captured the inner binding. The interpreter was already correct (#542). -
A closure or
flet/labelsfunction run by the source evaluator (eval, or a formcompile-filekeeps as source) expands local macros with themacrolets where it was written, not the caller's. A(loop-finish)in a closure now ends the loop that lexically contains it: inside an inner loop it used to end that inner loop, or signalGO: no such tag(#539). -
typepwith anor,andorcomplextype specifier whose earlier part runs asatisfiespredicate ordeftypeexpander that allocates now tests the later parts correctly. A collection during the earlier test could leave the later parts read from moved memory, and the test answered wrongly (#540). -
A
defunthatcompile-filekeeps as source, such as one whose body contains adefclass,defmethodordefmacro, has its macros expanded at compile time. Loading the fasl expanded them again, where*compile-file-pathname*is NIL, so LIFT'sdeftestsuiteinside a function failed to load (#538). -
compile-fileprocesses the body of a top-levelmacroletorlocallyas top-level forms, so an(eval-when (:compile-toplevel) ...)that amacrolet's macros expand into runs during compilation, not only when the fasl is loaded. CFFI'stypes.lispcompiles again (#537). -
A
restart-caseclause whose restart is named:loopno longer makescompile-filefail withUnsupported LOOP action "NIL", and defining such a function no longer signals that error to the caller's handlers. Restart andhandler-caseclauses, andhandler-bindtypes, are no longer walked as code when a function body is macroexpanded, so a clause type such as(or error storage-condition)in adefunalso matches.(macro-function :loop)is NIL (#536). -
handler-caseandhandler-bindclauses whose type is a compound type specifier, such as(or error storage-condition)or(and error (not warning)), now match a condition of that type, astypepdoes. They never matched, so the condition went on to outer handlers. A*break-on-signals*set to a compound type is also tested withtypep. An outerhandler-casethat catches a condition an inner one declined now receives the condition; it received NIL (#535). -
~wFwith a width and no digit count no longer keeps the zeros left by rounding a value just off a short decimal:(format nil "~8F" -112.400000000001d0)prints" -112.4", not"-112.400", as in SBCL (#534). -
print-unreadable-objectwith:identity tprints the object's address, so different objects print differently. It printedsxhash, which is the same for every standard object, so all instances shared one identity (#526). -
make-instancecalled through#'make-instance(withapplyorfuncall) inside aninitialize-instance :aftermethod of an instance that was itself made that way no longer signals "no applicable method for generic function MAKE-INSTANCE". flexi-streams makes its streams this way, so(flex:make-flexi-stream s :external-format :utf-8)failed (#525). -
(make-hash-table :synchronized t)now makes a synchronized table. The option was ignored, so threads sharing such a table could corrupt it:gethashreturned another key's value, and the table kept duplicate keys and lost writes.egcl-ext:hash-table-synchronized-p, documented but missing, now reports the option (#524). -
evalof adefunordefmethodwhose bodysetfs an accessor (or any(setf name)function) no longer signals a spuriousprogram-errorto the caller'shandler-bindhandlers. A handler that answers a genuine macro-expansion error during such anevalwithreturn-from,go,throw, ahandler-caseclause orinvoke-restartnow leaves as it should;evalused to return normally after the handler ran. Test harnesses such as LIFT reported a correct run-timedefclass/define-objecttest as failing (#515). -
compile-filereports an error a macro's expander signals while the file is compiled, as SBCL and CCL do: it prints acaught ERRORnote naming the definition and the form to*error-output*, returnstfor bothwarnings-pandfailure-p, and compiles the form into code that signals aprogram-error("Execution of a form compiled with errors") when it is reached. EGCL used to print nothing, returnnilfor both, and expand the macro again at run time, so a function compiled this way behaved differently from the rest of its fasl. Macros used indefmethodbodies are still expanded when the method is loaded (#517). -
A generic function created implicitly by
defmethodnow has&keywith no keyword names in its lambda list, as CLHS 7.6.1 specifies, so a later method may accept different keywords. EGCL used to copy the first method's keyword names into the generic function and reject such a method as not congruent. Keywords declared bydefgenericare still required of every method, and a call still rejects a keyword no applicable method accepts (#510). -
A function with more than 16 parameters no longer reads garbage for its 17th and later parameters once it is compiled to native code on x86-64. Native entry loaded parameter i from
[rdi + 8*i]with an 8-bit displacement, so the 17th parameter's offset of 128 wrapped to -128 and read the caller's stack: stale values, function objects or raw words. Loop entry (OSR) into a function with more than 16 locals read the same wrong slots. Since&optional,&restand&keyfunctions enter native code, keyword-heavy functions hit it; pure-tls's TLS handshake signalledThe value :CLIENT-PRIVATE-KEY is not of type FIXNUM, so every HTTPS download inocicl installfailed. These loads now use a 32-bit displacement when they need one (#509). -
Deep recursion no longer signals a spurious
STORAGE-CONDITIONon Linux AArch64. That target used a 512 KiB control stack, the fallback for platforms without native compilation, although its native frames are the largest of any supported target. Recursion overflowed somewhere between 5,000 and 10,000 deep, where x86-64 and IBM Z manage 50,000; AArch64 now gets the same 4 MiB they do.EGCL_STACK_SIZEstill overrides it, and the mapping stays lazy, so untouched pages cost no resident memory (#501). -
EGCL_T2_LOGand thecompiletrace now say why the AArch64 compilers refused a function. Every refusal shared one opaque code, so the log named neither the operation nor the place that declined it; a decline now names the refused operation, or the exact emitter line for a shape peculiar to that target (#501). -
Compiled code no longer returns stale multiple values from a form that yields one value. When one arm of an
IF,WHEN,UNLESSorANDcould return several values and the other could not, the single-valued arm returned its value together with the values of an earlier call:(let ((r (floor 7 2))) (if neg (not r) r))returned 3 and 1, and(multiple-value-list (if neg (g n) 5))could give(3 1)instead of(5).TAGBODYlikewise returned its last statement's values instead ofNIL, andTHROWof a single-valued form transferred stale values with it. The interpreter was already correct; compiled code was wrong at every tier. Such functions can now also use the optimizing tier's direct-call entry, which cuts the cost of calling them from native code by about 40% (#500). -
COMPILE-FILEcompiles a file whose top-levelMACROLETexpands to(defgeneric (setf NAME) ...), as zpb-ttf'sbounding-box.lispdoes. It used to warn "could not pre-read this file (PROGRAM-ERROR)" and write a source-only artifact that re-read the text at load time. A:METHODoption in such aDEFGENERICnow also sees theMACROLET's local macros (#488). -
In an image restored with
--imageor a delivered executable, a function that came with the image reports the tier its native code runs at.egcl-ext:function-tierused to answer 0 for it by name and by object after its T1 or T2 code was installed and running, and its invocation count kept advancing after its T2 code was installed; functions defined after the restore were unaffected. The saved image no longer carries a second copy of each such function's body (#490). -
A foreign library handle from
egcl-ffi:load-foreign-librarysaved in an image is now usable after--imageor in a saved executable. Restoring an image reopens its libraries in load order under the same handles, as SBCL does. A handle whose library cannot be reopened is dead: a symbol lookup through it names the library and the reason, closing it does nothing, and saving the image again keeps it so a later restore retries the library. Before, image save reset every handle to null, so lookups signalled "null library handle" and closing one signalled an error, which broke reload code that closes a library before loading it again. Images now use format version 12; images saved by older releases must be rebuilt (#492). -
INTERNinto theKEYWORDpackage keeps a colon in its string as part of the symbol's name.(intern ":DECK" :keyword)used to nameDECKand(intern "A:B" :keyword)namedB; they now name":DECK"and"A:B",
print as:|:DECK|and:|A:B|, read back as the same symbols, and survive
COMPILE-FILEandLOAD.FIND-SYMBOL,SYMBOL-NAMEand the printer agree
with them, and:|:DECK|reads as the keyword named":DECK". In any
package, an escaped colon right after a single package marker is part of the
name:GQ:|:X|, which is how an exported symbol named":X"prints, reads
back as that symbol instead of asGQ::X
(#493). -
--heap-sizeandEGCL_HEAP_SIZEsize the heap. Both were parsed and then
ignored, so the heap stayed at 512 MB unlessEGCL_HEAP_MBwas set.
--heap-sizetakes precedence overEGCL_HEAP_SIZE, which takes precedence
overEGCL_HEAP_MB. A heap smaller than 256 MB gets a nursery of a quarter of
the heap rather than a fixed 64 MB, and a restored image that does not fit the
requested heap grows it to three times the image's data instead of failing.
A size of 0 is rejected, and a heap the system cannot reserve is reported as
such at startup instead of panicking at the first allocation
(#498). -
When live data outgrows the heap, the program gets a
STORAGE-CONDITION
instead of a panic with "GC minor evacuation exhausted regions", in
interpreted and compiled code alike. Nothing moves when the survivors cannot
be placed, and a major collection runs before the condition is signalled, so a
program that handles it and drops its data can continue. Compiled code that
has a handler,UNWIND-PROTECTor dynamic binding of its own active at that
moment can still report "invalid native transfer capture" instead
(#498). -
A
THROWfrom the default form of a&keyor&auxparameter to a
CATCHin the interpreted caller reaches that catch. Once the caller had
been called a few times, the throw escaped as an internal error such as
__THROW__:1758instead
(#470). -
On x86-64, a fully optimized function that left-shifted a masked value, such
as(ash (logand a #xFFFFFFFFFF) 30), returned a wrapped fixnum instead of
the bignum result. It now checks the shift for overflow
(#456). -
MULTIPLE-VALUE-LISTreturns exactly one value once its function is
compiled. Compiled code used to leave the collected values behind as stale
secondary values, so(multiple-value-bind (a b) (f))around a function
ending inMULTIPLE-VALUE-LISTsawbas the second collected value instead
ofNIL(#461). -
A backquote form returns exactly one value in the bytecode interpreter.
It used to pass on the values of its last evaluated operand, so
(multiple-value-list `(,(values 1 2)))returned(1 2)instead of
((1))(#464). -
Compiled code calls another package's
LENGTH,FIRST,ELTand the
other functions the compiler calls directly, rather than the CL function
of the same name. A generic function such as(defgeneric my:length (x))
was bypassed by callers compiled withCOMPILE-FILE, which signalled
"The value 42 is not of type SEQUENCE"
(#446). -
A saved image keeps every special proclamation. A valueless
(defvar flag?)
without earmuffs, the shape of Parenscript's compiler flag, became lexical
after a restore, so aLETof it no longer reached the functions reading it.
The image format is now version 11; images saved by 0.0.10 must be saved
again (#447). -
A thread made by
egcl-thread:make-threadgets the main thread's stack size
(the softRLIMIT_STACK, else 8 MiB), orEGCL_STACK_SIZEwhen that is set,
instead of Rust's 2 MiB. Threads overflowed withSTORAGE-CONDITIONat about
a quarter of the main thread's recursion depth; a largerRUST_MIN_STACKis
still honoured (#448). -
On x86-64 Linux, a function that creates a closure capturing no local
variables, such as(mapcar (lambda (x) (* x 2)) list), is now compiled
natively and can reach the optimizing tier. Previously anyLAMBDAkept the
whole function in the interpreter. Closures that capture variables still
run interpreted
(#463).