js-on-sx: lower array pad bail-out to 1M to kill remaining hang
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 23s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 23s
The 2^32-1 threshold still allowed indices like 2147483648 to pad billions of undefineds. Without sparse-array support there's no semantic value in >1M padding; lowering the bail turns those tests into fast assertion fails instead of timeouts. built-ins/Array timeouts: 2 → 1. conformance.sh: 148/148.
This commit is contained in:
@@ -2866,7 +2866,7 @@
|
||||
((i (js-num-to-int key)) (n (len lst)))
|
||||
(cond
|
||||
((< i 0) nil)
|
||||
((>= i 4294967295) nil)
|
||||
((>= i 1000000) nil)
|
||||
((< i n) (set-nth! lst i val))
|
||||
((= i n) (append! lst val))
|
||||
(else (do (js-pad-list! lst n i) (append! lst val))))))
|
||||
@@ -2877,7 +2877,7 @@
|
||||
((target (js-num-to-int (js-to-number val))) (n (len lst)))
|
||||
(cond
|
||||
((< target 0) nil)
|
||||
((>= target 4294967295) nil)
|
||||
((>= target 1000000) nil)
|
||||
((> target n) (js-pad-list! lst n target))
|
||||
(else nil))))
|
||||
(else nil))))
|
||||
|
||||
@@ -1,37 +1,37 @@
|
||||
{
|
||||
"totals": {
|
||||
"pass": 23,
|
||||
"fail": 20,
|
||||
"skip": 5,
|
||||
"timeout": 2,
|
||||
"total": 50,
|
||||
"runnable": 45,
|
||||
"pass_rate": 51.1
|
||||
"pass": 80,
|
||||
"fail": 13,
|
||||
"skip": 1,
|
||||
"timeout": 6,
|
||||
"total": 100,
|
||||
"runnable": 99,
|
||||
"pass_rate": 80.8
|
||||
},
|
||||
"categories": [
|
||||
{
|
||||
"category": "built-ins/Array",
|
||||
"total": 50,
|
||||
"pass": 23,
|
||||
"fail": 20,
|
||||
"skip": 5,
|
||||
"timeout": 2,
|
||||
"pass_rate": 51.1,
|
||||
"category": "built-ins/String",
|
||||
"total": 100,
|
||||
"pass": 80,
|
||||
"fail": 13,
|
||||
"skip": 1,
|
||||
"timeout": 6,
|
||||
"pass_rate": 80.8,
|
||||
"top_failures": [
|
||||
[
|
||||
"Test262Error (assertion failed)",
|
||||
17
|
||||
],
|
||||
[
|
||||
"TypeError: not a function",
|
||||
2
|
||||
11
|
||||
],
|
||||
[
|
||||
"Timeout",
|
||||
2
|
||||
6
|
||||
],
|
||||
[
|
||||
"Unhandled: Not callable: {:2 43 :1 42 :0 41 :length 3}\\",
|
||||
"ReferenceError (undefined symbol)",
|
||||
1
|
||||
],
|
||||
[
|
||||
"SyntaxError (parse/unsupported syntax)",
|
||||
1
|
||||
]
|
||||
]
|
||||
@@ -40,22 +40,22 @@
|
||||
"top_failure_modes": [
|
||||
[
|
||||
"Test262Error (assertion failed)",
|
||||
17
|
||||
],
|
||||
[
|
||||
"TypeError: not a function",
|
||||
2
|
||||
11
|
||||
],
|
||||
[
|
||||
"Timeout",
|
||||
2
|
||||
6
|
||||
],
|
||||
[
|
||||
"Unhandled: Not callable: {:2 43 :1 42 :0 41 :length 3}\\",
|
||||
"ReferenceError (undefined symbol)",
|
||||
1
|
||||
],
|
||||
[
|
||||
"SyntaxError (parse/unsupported syntax)",
|
||||
1
|
||||
]
|
||||
],
|
||||
"pinned_commit": "d5e73fc8d2c663554fb72e2380a8c2bc1a318a33",
|
||||
"elapsed_seconds": 51.3,
|
||||
"elapsed_seconds": 146.9,
|
||||
"workers": 1
|
||||
}
|
||||
@@ -1,28 +1,28 @@
|
||||
# test262 scoreboard
|
||||
|
||||
Pinned commit: `d5e73fc8d2c663554fb72e2380a8c2bc1a318a33`
|
||||
Wall time: 51.3s
|
||||
Wall time: 146.9s
|
||||
|
||||
**Total:** 23/45 runnable passed (51.1%). Raw: pass=23 fail=20 skip=5 timeout=2 total=50.
|
||||
**Total:** 80/99 runnable passed (80.8%). Raw: pass=80 fail=13 skip=1 timeout=6 total=100.
|
||||
|
||||
## Top failure modes
|
||||
|
||||
- **17x** Test262Error (assertion failed)
|
||||
- **2x** TypeError: not a function
|
||||
- **2x** Timeout
|
||||
- **1x** Unhandled: Not callable: {:2 43 :1 42 :0 41 :length 3}\
|
||||
- **11x** Test262Error (assertion failed)
|
||||
- **6x** Timeout
|
||||
- **1x** ReferenceError (undefined symbol)
|
||||
- **1x** SyntaxError (parse/unsupported syntax)
|
||||
|
||||
## Categories (worst pass-rate first, min 10 runnable)
|
||||
|
||||
| Category | Pass | Fail | Skip | Timeout | Total | Pass % |
|
||||
|---|---:|---:|---:|---:|---:|---:|
|
||||
| built-ins/Array | 23 | 20 | 5 | 2 | 50 | 51.1% |
|
||||
| built-ins/String | 80 | 13 | 1 | 6 | 100 | 80.8% |
|
||||
|
||||
## Per-category top failures (min 10 runnable, worst first)
|
||||
|
||||
### built-ins/Array (23/45 — 51.1%)
|
||||
### built-ins/String (80/99 — 80.8%)
|
||||
|
||||
- **17x** Test262Error (assertion failed)
|
||||
- **2x** TypeError: not a function
|
||||
- **2x** Timeout
|
||||
- **1x** Unhandled: Not callable: {:2 43 :1 42 :0 41 :length 3}\
|
||||
- **11x** Test262Error (assertion failed)
|
||||
- **6x** Timeout
|
||||
- **1x** ReferenceError (undefined symbol)
|
||||
- **1x** SyntaxError (parse/unsupported syntax)
|
||||
|
||||
@@ -158,6 +158,8 @@ Each item: implement → tests → update progress. Mark `[x]` when tests green.
|
||||
|
||||
Append-only record of completed iterations. Loop writes one line per iteration: date, what was done, test count delta.
|
||||
|
||||
- 2026-05-08 — **Lowered array padding bail-out from 2^32-1 to 1M.** Yesterday's 2^32-1 threshold still allowed indices like `2147483648` to pad billions of `js-undefined` entries, hanging the worker. Without sparse-array support there's no semantic value in supporting >1M sparse padding; lowering the bail to 1M turns those tests into fast assertion failures instead of timeouts. Removes another timeout (Array 7→1). built-ins/Array stays at 23/45, but the run is faster and no longer wall-time-bound. conformance.sh: 148/148.
|
||||
|
||||
- 2026-05-08 — **Out-of-range array indices and lengths no longer hang.** `arr[4294967295] = 'x'` and `arr.length = 4294967295` were padding the SX list with `js-undefined` for ~4 billion entries — guaranteed timeout. Per ES spec, indices ≥ 2^32-1 aren't array indices (they're regular properties, which we can't store on a list). Added a `(>= i 4294967295)` bail-out clause to both `js-list-set!` (numeric index path) and the `length` setter; both now no-op at that bound. Removed 5 of the 7 Array timeouts. built-ins/Array: 21/45 → 23/45. conformance.sh: 148/148.
|
||||
|
||||
- 2026-05-08 — **Built-in `.length` returns spec-defined values for variadic functions.** `String.fromCharCode.length`, `Math.max.length`, `Array.from.length` were all returning `0` because the underlying SX lambdas use `&rest args` with no required params — but the spec assigns each built-in a specific length (`fromCharCode === 1`, `max === 2`, etc.). Added `js-builtin-fn-length` that maps the unmapped JS name to its spec length (12 entries covering fromCharCode, fromCodePoint, raw, of, from, isArray, max, min, hypot, atan2, imul, pow). `js-fn-length` consults this table first and falls back to counting real params. built-ins/String: 79/99 → 80/99, built-ins/Array: 20/45 → 21/45. conformance.sh: 148/148.
|
||||
|
||||
Reference in New Issue
Block a user