test(parity): broaden uncurry-this builtin-proto coverage (#4276)#4293
Merged
Conversation
#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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test-only follow-up to #4276. The "uncurry-this" idiom
Function.prototype.call.bind(Object.prototype.<method>)on builtin-prototypereceivers was fixed by #4279 (merged) — proto thunks now call their underlying
ops directly, so no
js_native_call_methodre-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.prototypereceiversObject.prototype.isPrototypeOfandpropertyIsEnumerableuncurriedtypeof-of-result assertions (the bug returned the empty-object sentinel).callform and plain method form as anchorsWhy not the original PR #4282
#4282 (now closed) re-introduced the
js_native_call_methodre-dispatch andguarded 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/perrybuilt from main + this fixturenode --experimental-strip-types