Summary
Sloppy calls box primitive/nullish this as required and strict calls preserve exact this values; direct and .call forms agree with ECMAScript.
Affected Test262 rows
Perry actual behavior from report
- 4 x runtime-fail: Uncaught exception: 'this' had incorrect value!
- 2 x runtime-fail: Uncaught exception: f() Expected SameValue(«"undefined"», «"undefined"») to be false
- 1 x runtime-fail: Uncaught exception: bar.call("1") Expected SameValue(«"string"», «"object"») to be true
- 1 x runtime-fail: Uncaught exception: bar.call() Expected SameValue(«"undefined"», «"object"») to be true
- 1 x runtime-fail: Uncaught exception: bar.call(1) Expected SameValue(«"number"», «"object"») to be true
Node / ECMAScript expected behavior
Sloppy calls box primitive/nullish this as required and strict calls preserve exact this values; direct and .call forms agree with ECMAScript.
Likely subsystem
function call dispatch / this-binding conversion
Acceptance criteria
bar.call(1), bar.call("1"), and bar.call() rows return the expected typeof this.
- Generator/strict variants no longer report incorrect
this.
- Direct function calls match strict/sloppy
this rules.
Validation
Run the Test262 differential against the affected area and confirm these rows leave the gap report:
scripts/test262_subset.py --root vendor/test262 --dir language/function-code --sample-cap 99999 --report /tmp/FUNC_THIS_BINDING.json
This is Perry language/runtime semantics triage, not a Node core API compatibility issue.
Summary
Sloppy calls box primitive/nullish
thisas required and strict calls preserve exactthisvalues; direct and.callforms agree with ECMAScript.Affected Test262 rows
// targets: wasm— currently fails to link on every native target #219 language/function-code/10.4.3-1-13-s.js (runtime-fail: Uncaught exception: f() Expected SameValue(«"undefined"», «"undefined"») to be false)whoamicrate'sGetUserNameExWlink fails on every doc-test (missingsecur32import lib) #220 language/function-code/10.4.3-1-13gs.js (runtime-fail: Uncaught exception: 'this' had incorrect value!)Perry actual behavior from report
Node / ECMAScript expected behavior
Sloppy calls box primitive/nullish
thisas required and strict calls preserve exactthisvalues; direct and.callforms agree with ECMAScript.Likely subsystem
function call dispatch / this-binding conversion
Acceptance criteria
bar.call(1),bar.call("1"), andbar.call()rows return the expectedtypeof this.this.thisrules.Validation
Run the Test262 differential against the affected area and confirm these rows leave the gap report:
This is Perry language/runtime semantics triage, not a Node core API compatibility issue.