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

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:
2026-05-08 06:03:54 +00:00
parent 16f7a14506
commit b1023f11d9
4 changed files with 45 additions and 43 deletions

View File

@@ -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))))