js-on-sx: native prototypes inherit from Object.prototype
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 39s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 39s
Per ES, every native prototype's [[Prototype]] is Object.prototype (and Function.prototype.[[Prototype]] is too). Was missing those links, so Object.prototype.isPrototypeOf(Boolean.prototype) returned false (the explicit isPrototypeOf walks __proto__, not the recent fallback). Added 5 dict-set! lines to the post-init. built-ins/Boolean: 22/27 → 23/27, built-ins/Number: 44/50 → 45/50. conformance.sh: 148/148.
This commit is contained in:
@@ -4646,6 +4646,11 @@
|
||||
(dict-set! Array "__proto__" (get js-function-global "prototype"))
|
||||
(dict-set! Number "__proto__" (get js-function-global "prototype"))
|
||||
(dict-set! String "__proto__" (get js-function-global "prototype"))
|
||||
(dict-set! Boolean "__proto__" (get js-function-global "prototype")))
|
||||
(dict-set! Boolean "__proto__" (get js-function-global "prototype"))
|
||||
(dict-set! (get Array "prototype") "__proto__" (get Object "prototype"))
|
||||
(dict-set! (get Number "prototype") "__proto__" (get Object "prototype"))
|
||||
(dict-set! (get String "prototype") "__proto__" (get Object "prototype"))
|
||||
(dict-set! (get Boolean "prototype") "__proto__" (get Object "prototype"))
|
||||
(dict-set! (get js-function-global "prototype") "__proto__" (get Object "prototype")))
|
||||
|
||||
(define js-global {:undefined js-undefined :JSON JSON :parseInt parseInt :Object Object :isNaN js-global-is-nan :Infinity inf :NaN 0 :String String :Boolean Boolean :Array Array :Math Math :parseFloat parseFloat :Number Number :console console :isFinite js-global-is-finite})
|
||||
|
||||
@@ -40,6 +40,6 @@
|
||||
]
|
||||
],
|
||||
"pinned_commit": "d5e73fc8d2c663554fb72e2380a8c2bc1a318a33",
|
||||
"elapsed_seconds": 32.3,
|
||||
"elapsed_seconds": 38.2,
|
||||
"workers": 1
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
# test262 scoreboard
|
||||
|
||||
Pinned commit: `d5e73fc8d2c663554fb72e2380a8c2bc1a318a33`
|
||||
Wall time: 32.3s
|
||||
Wall time: 38.2s
|
||||
|
||||
**Total:** 44/50 runnable passed (88.0%). Raw: pass=44 fail=6 skip=0 timeout=0 total=50.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user