Skip to content

test(parity): broaden uncurry-this builtin-proto coverage (#4276)#4293

Merged
proggeramlug merged 1 commit into
mainfrom
add-test-uncurry-this-builtin-proto
Jun 3, 2026
Merged

test(parity): broaden uncurry-this builtin-proto coverage (#4276)#4293
proggeramlug merged 1 commit into
mainfrom
add-test-uncurry-this-builtin-proto

Conversation

@proggeramlug
Copy link
Copy Markdown
Contributor

Summary

Test-only follow-up to #4276. The "uncurry-this" idiom
Function.prototype.call.bind(Object.prototype.<method>) on builtin-prototype
receivers was fixed by #4279 (merged) — proto thunks now call their underlying
ops directly, so no js_native_call_method re-dispatch recursion occurs.

This adds a broader regression fixture than the one #4279 landed
(function-call-bind-builtin-prototypes.ts). It additionally exercises:

  • TypeError.prototype / RangeError.prototype receivers
  • Object.prototype.isPrototypeOf and propertyIsEnumerable uncurried
  • typeof-of-result assertions (the bug returned the empty-object sentinel)
  • the direct .call form and plain method form as anchors

Why not the original PR #4282

#4282 (now closed) re-introduced the js_native_call_method re-dispatch and
guarded around it — redundant with #4279's simpler direct-call fix already on
main. This salvages only the superior test coverage; no runtime change.

Validation

  • target/release/perry built from main + this fixture
  • Output byte-identical to node --experimental-strip-types

#4276 was fixed by #4279 (proto thunks call their ops directly, no
re-dispatch). This adds a wider regression fixture for the uncurry-this
idiom Function.prototype.call.bind(Object.prototype.<method>) on builtin
prototype receivers: also exercises TypeError/RangeError prototypes,
isPrototypeOf, propertyIsEnumerable, typeof-of-result, and the direct
.call form. Verified byte-identical to node --experimental-strip-types
on main.
@proggeramlug proggeramlug merged commit 2cfcb72 into main Jun 3, 2026
11 checks passed
@proggeramlug proggeramlug deleted the add-test-uncurry-this-builtin-proto branch June 3, 2026 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant