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:
1
lib/js/test262-slice/closures/adder.expected
Normal file
1
lib/js/test262-slice/closures/adder.expected
Normal file
@@ -0,0 +1 @@
|
||||
44
|
||||
1
lib/js/test262-slice/closures/adder.js
Normal file
1
lib/js/test262-slice/closures/adder.js
Normal file
@@ -0,0 +1 @@
|
||||
function mk(n) { return x => x + n; } let add7 = mk(7); add7(10) + add7(20)
|
||||
1
lib/js/test262-slice/closures/counter.expected
Normal file
1
lib/js/test262-slice/closures/counter.expected
Normal file
@@ -0,0 +1 @@
|
||||
4
|
||||
1
lib/js/test262-slice/closures/counter.js
Normal file
1
lib/js/test262-slice/closures/counter.js
Normal file
@@ -0,0 +1 @@
|
||||
function mkc() { let n = 0; return () => { n = n + 1; return n; }; } let c = mkc(); c(); c(); c(); c()
|
||||
1
lib/js/test262-slice/closures/multi_closure.expected
Normal file
1
lib/js/test262-slice/closures/multi_closure.expected
Normal file
@@ -0,0 +1 @@
|
||||
42
|
||||
1
lib/js/test262-slice/closures/multi_closure.js
Normal file
1
lib/js/test262-slice/closures/multi_closure.js
Normal 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()
|
||||
1
lib/js/test262-slice/closures/nested_scope.expected
Normal file
1
lib/js/test262-slice/closures/nested_scope.expected
Normal file
@@ -0,0 +1 @@
|
||||
3
|
||||
1
lib/js/test262-slice/closures/nested_scope.js
Normal file
1
lib/js/test262-slice/closures/nested_scope.js
Normal file
@@ -0,0 +1 @@
|
||||
function outer() { let a = 1; function inner() { let b = 2; function deepest() { return a + b; } return deepest(); } return inner(); } outer()
|
||||
1
lib/js/test262-slice/closures/sum_sq.expected
Normal file
1
lib/js/test262-slice/closures/sum_sq.expected
Normal file
@@ -0,0 +1 @@
|
||||
55
|
||||
1
lib/js/test262-slice/closures/sum_sq.js
Normal file
1
lib/js/test262-slice/closures/sum_sq.js
Normal 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])
|
||||
Reference in New Issue
Block a user