js-on-sx: baseline commit (278/280 unit, 148/148 slice, runner stub)

Initial commit of the lib/js/ tree and plans/ directory. A previous
session left template-string work in progress — 278/280 unit tests pass
(2 failing: tpl part-count off-by-one, escaped-backtick ident lookup).
test262-runner.py and scoreboard are placeholders (0/8 with 7 timeouts);
fixing the runner is the next queue item.
This commit is contained in:
2026-04-23 19:42:16 +00:00
parent 14b6586e41
commit 9e568ad886
310 changed files with 7056 additions and 0 deletions

View File

@@ -0,0 +1 @@
44

View File

@@ -0,0 +1 @@
function mk(n) { return x => x + n; } let add7 = mk(7); add7(10) + add7(20)

View File

@@ -0,0 +1 @@
4

View File

@@ -0,0 +1 @@
function mkc() { let n = 0; return () => { n = n + 1; return n; }; } let c = mkc(); c(); c(); c(); c()

View File

@@ -0,0 +1 @@
42

View File

@@ -0,0 +1 @@
function mkPair() { let x = 0; let y = 0; let setX = v => { x = v; }; let setY = v => { y = v; }; let get = () => x + y; setX(17); setY(25); return get(); } mkPair()

View File

@@ -0,0 +1 @@
3

View File

@@ -0,0 +1 @@
function outer() { let a = 1; function inner() { let b = 2; function deepest() { return a + b; } return deepest(); } return inner(); } outer()

View File

@@ -0,0 +1 @@
55

View File

@@ -0,0 +1 @@
function sumSq(xs) { let t = 0; for (let i = 0; i < xs.length; i = i + 1) t = t + xs[i] * xs[i]; return t; } sumSq([1,2,3,4,5])