js-on-sx: top-level this resolves to the global object
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 15s

Per ES non-strict script semantics, top-level this is the global
object (window/global/globalThis). Was throwing "Undefined symbol:
this". Two-part fix:
1. js-global-this runtime variable set to js-global after globals
   are defined; js-this falls back to it when no this is active.
2. js-eval wraps transpiled body in (let ((this (js-this))) ...)
   so JS this resolves to bound this, or top-level to global.
Fixes String(this), this.Object === Object, etc.
built-ins/Object: 46/50 → 47/50. conformance.sh: 148/148.
This commit is contained in:
2026-05-08 13:55:12 +00:00
parent 4ab79f5758
commit 0b4f5e1df9
5 changed files with 53 additions and 27 deletions

View File

@@ -1,37 +1,53 @@
{
"totals": {
"pass": 46,
"fail": 4,
"skip": 0,
"timeout": 0,
"total": 50,
"runnable": 50,
"pass_rate": 92.0
"pass": 86,
"fail": 11,
"skip": 1,
"timeout": 2,
"total": 100,
"runnable": 99,
"pass_rate": 86.9
},
"categories": [
{
"category": "built-ins/Object",
"total": 50,
"pass": 46,
"fail": 4,
"skip": 0,
"timeout": 0,
"pass_rate": 92.0,
"category": "built-ins/String",
"total": 100,
"pass": 86,
"fail": 11,
"skip": 1,
"timeout": 2,
"pass_rate": 86.9,
"top_failures": [
[
"ReferenceError (undefined symbol)",
4
"Test262Error (assertion failed)",
10
],
[
"Timeout",
2
],
[
"SyntaxError (parse/unsupported syntax)",
1
]
]
}
],
"top_failure_modes": [
[
"ReferenceError (undefined symbol)",
4
"Test262Error (assertion failed)",
10
],
[
"Timeout",
2
],
[
"SyntaxError (parse/unsupported syntax)",
1
]
],
"pinned_commit": "d5e73fc8d2c663554fb72e2380a8c2bc1a318a33",
"elapsed_seconds": 64.1,
"elapsed_seconds": 179.5,
"workers": 1
}