v0.3.1
Added 4
- node:console Console instances write to process.stdout, process.stderr or other writable streams, with Node's ignoreErrors handling
- stream/consumers arrayBuffer() is supported
- ArrayBuffer and SharedArrayBuffer values print like Node
- Compound assignment and ++/-- work on bigint locals and fields
Changed 26
- Locals proven to stay within 32 bits are stored as 32-bit integers
- int32 parameters and results pass in integer registers on direct calls
- Integer sums that feed bitwise conversions wrap in 32 bits
- Loop accumulators keep uint32 ranges
- Filter, map, flatMap and slice chains feeding reduce, some, every, findIndex, forEach, length or a final array run as single loops without building intermediate arrays when callback effects allow it
- Arrays track a hole-free prefix whose reads and writes skip per-slot state
- Compound element updates are native
- Dense arrays sort without a snapshot
- Typed-array reads compared with numbers stay unboxed
- Calls are devirtualized by the classes a program constructs
- Closure bodies borrow unchanged reference parameters
- The comparator sort lends its slots
- Unchanged captures are read in place
- Awaiting a direct async call that completes without suspending creates no promise
- Synchronous generators run as stackless coroutines
- Comparisons and switch against string literals run inline
- Regex literals compile to native matchers at build time and literal sites reuse their compiled pattern
- Plain-text patterns and string replace/replaceAll scan directly
- BigInt arithmetic and text conversion use limb-based division, chunked radix conversion and Karatsuba multiplication
- BigInt literals are constants and small-value expressions run in 64-bit registers
- Reflective reads of typed values (for...in, Object.keys/values/entries, in, spread and JSON.stringify of typed records seen as unknown) read native fields instead of copying the record
- The cycle collector frees young garbage sooner and tears down typed children directly
- Types the cycle collector bypasses are measured again in probe windows
- The compiler's analyses walk the IR through typed fields, making compilation faster
- glibc's heap is left to the huge-page policy in core dumps
- Native program objects use runtime ABI v17, so external consumers must link the matching v0.3.1 runtime pack requirement raised · inferred, marked in the notes below
Fixed 3
- return p in an async function takes Node's microtask turns behavior changed · inferred, marked in the notes below
- A rejection of the returned promise reaches the caller instead of the function's own catch
- Core dumps leave out the allocator's untouched reservation, so crashing programs no longer write gigabytes of empty memory
2 changes to check, marked in the notes below
From scriptc
0.3.1
Features
node:consoleConsoleinstances write toprocess.stdout,process.stderror other writable streams, with Node'signoreErrorshandling.stream/consumersarrayBuffer()is supported, andArrayBufferandSharedArrayBuffervalues print like Node.- Compound assignment and
++/--work on bigint locals and fields.
Performance
- Integer code stays in integer registers. Locals proven to stay within 32 bits are stored as 32-bit integers, int32 parameters and results pass in integer registers on direct calls, integer sums that feed bitwise conversions wrap in 32 bits, and loop accumulators keep uint32 ranges.
- Array callback chains run as single loops.
filter,map,flatMapandslicechains feedingreduce,some,every,findIndex,forEach,lengthor a final array no longer build intermediate arrays when the callbacks' effects allow it. - Array element access does less work. Arrays track a hole-free prefix whose reads and writes skip per-slot state, compound element updates are native, dense arrays sort without a snapshot, and typed-array reads compared with numbers stay unboxed.
- Calls and closures retain less. Calls are devirtualized by the classes a program constructs, closure bodies borrow unchanged reference parameters, the comparator sort lends its slots, and unchanged captures are read in place.
- Async calls and generators are cheaper. Awaiting a direct async call that completes without suspending creates no promise, and synchronous generators run as stackless coroutines.
- Strings and regular expressions are faster. Comparisons and
switchagainst string literals run inline, regex literals compile to native matchers at build time, literal sites reuse their compiled pattern, and plain-text patterns and stringreplace/replaceAllscan directly. - BigInt arithmetic and text conversion are much faster, with limb-based division, chunked radix conversion and Karatsuba multiplication; literals are constants, and small-value expressions run in 64-bit registers.
- Reflective reads of typed values (
for...in,Object.keys/values/entries,in, spread andJSON.stringifyof typed records seen asunknown) read native fields instead of copying the record. - The cycle collector frees young garbage sooner and teardown is direct. Types the collector bypasses are measured again in probe windows, and typed children are torn down without the generic release path.
- The compiler is faster, because its own analyses walk the IR through typed fields.
Fixes
return pin an async function takes Node's microtask turns, and a rejection of the returned promise reaches the caller instead of the function's owncatch. behavior changed · inferred- Core dumps leave out the allocator's untouched reservation, so crashing programs no longer write gigabytes of empty memory, and glibc's heap is left to the huge-page policy.
- Native program objects use runtime ABI v17. Array, closure and regex layouts changed, so external object consumers must link the matching v0.3.1 runtime pack; the versioned marker rejects incompatible runtime objects at link time. requirement raised · inferred