Versions nyinaa v0.1.1077 Aug 2026JavaScript ne JIT Feed

Wɔakyerɛw release ho nsɛm no wɔ Borɔfo kasa mu.

Recursive functions with locals and captured constants, in native code

The engine already compiled simple recursive number-crunchers (like a bare Fibonacci) all the way to machine code. It now compiles the recursive functions people actually write: ones that declare their own local variables and ones that capture a constant from an outer scope. The ordinary `function fib(n){ if(n<2){ return n; } var a = fib(n-1); var b = fib(n-2); return a+b; }` now runs as native code - measured about 18.6x faster than the previous tier (19ms vs 356ms on the same work) - and so does a recursion that closes over a constant, `const K = 3; function pow(n){ return n<1 ? 1 : K*pow(n-1); }`. It stays correct by construction: the compiler only takes a body it can prove is pure and numeric, a local is only read once it definitely holds a number on every path that reaches it, and a captured value is checked to be a number once before any native code runs - anything else quietly falls back to the interpreter with an identical result. Proven bit-for-bit against the interpreter across two differential fuzzers (nine thousand generated programs) and a three-tier equivalence check. JavaScript performance (JIT) moves 42 to 44; overall holds at 51.

Deɛ asesa

nsesaeɛ 3
  1. JavaScript ne JITThe native recursion compiler now accepts bodies with their own LOCAL variables, including the everyday `var a = f(n-1); var b = f(n-2); return a+b` shape with an early base-case return. Each local becomes a machine register; a definite-assignment analysis proves a local is only ever read once it holds a number on every path, so a hoisted-but-not-yet-assigned variable is refused rather than misread. Measured about 18.6x faster than the interpreter tier on fib-with-locals.
  2. JavaScript ne JITRecursive functions that CAPTURE a numeric constant from an outer scope now compile too - `const K=3; function pow(n){ return n<1 ? 1 : K*pow(n-1); }`. The captured value is checked to be a number once, before any native code runs, and passed through the recursion; a captured non-number (a string, an object) simply falls back to the interpreter with the same answer.
  3. JavaScript ne JITCorrect by construction and proven: the compiler only takes a body it can show is pure and numeric with no heap effect, so a depth or fuel limit can abort and redo the whole call one tier down with a bit-identical result. Two differential fuzzers (about nine thousand generated recursive programs) and a three-tier equivalence check compare the native output to the interpreter bit-for-bit, NaN and overflow included. A separately measured non-recursive-helper case came out flat and was deliberately left on the existing tier.
Biribiara fi v0.1.107 wɔ baabi korɔ

Versions

v0.1.0 - 0.1.9 · 10 Jul 2026418v0.1.427 · 25 Nov 2026