Repository navigation
test(gap): pin #3828 Function.prototype.call/apply/bind on function values (fixed by #3846) - #3856
Merged
Merged
Conversation
… reified proto methods (#3828)
Contributor
Author
|
Out-of-scope boxed-primitive JSON serialization noted above is filed as #3857. |
proggeramlug
pushed a commit
that referenced
this pull request
May 31, 2026
Admin-merges of #3818 and #3829 landed nested git conflict markers in four files, leaving main uncompilable. Restore those files to their last marker-free state (93425ba, #3823). #3855/#3856/#3858 did not touch them. The node-compat surface from #3818 (crypto legacy) and #3829 (constants.default alias) is reverted on these files and needs redoing from clean branches; the original fork branches carry committed markers.
proggeramlug
added a commit
that referenced
this pull request
May 31, 2026
…3863) Admin-merges of #3818 and #3829 landed nested git conflict markers in four files, leaving main uncompilable. Restore those files to their last marker-free state (93425ba, #3823). #3855/#3856/#3858 did not touch them. The node-compat surface from #3818 (crypto legacy) and #3829 (constants.default alias) is reverted on these files and needs redoing from clean branches; the original fork branches carry committed markers. Co-authored-by: Ralph Küpper <ralph@skelpo.com>
proggeramlug
added a commit
that referenced
this pull request
May 31, 2026
…test (#3865) PR #3856 (#3828) landed runtime changes that duplicate #3846 (Function.prototype.call.bind uncurry-this), which had already fixed #3828: - field_get_set: a second .call/.apply/.bind value-read reify block (mine) sat in front of #3846's reify_function_method_value, making the latter dead code. - global_this: install_noop_proto_methods was rewritten to emit BOUND_METHOD closures, which also bypassed #3846's js_native_call_value re-dispatch path (try_dispatch_value_called_proto_method, gated on the noop-thunk func_ptr). Both mechanisms are functionally equivalent; this reverts the #3856 runtime delta so #3846 is the single canonical implementation. The #3828 regression test is kept (it pins the function-bind shape that #3846's call.bind-idiom test does not). Verified: with #3856's runtime reverted, the runtime files match the #3846-only state, against which test_gap_3828_function_method_values.ts is byte-identical to node (both default and PERRY_NO_AUTO_OPTIMIZE paths). Co-authored-by: Ralph Küpper <ralph@skelpo.com>
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
#3828 (
Function.prototype.call/.apply/.bindon function values) wasfixed by #3846 (
Function.prototype.call.bind(method)uncurry-this), whichlanded on
mainshortly before this. I verified empirically: buildingmain'sruntime (with #3846, no other changes) makes the #3828
hasownstandalone reproreturn
true/false, and the gap test below is byte-identical to Node.This PR therefore drops the (now-redundant) runtime changes and keeps only a
regression test.
Why a separate test
#3846's test (
test_gap_3716_uncurry_this.ts) exercises theFunction.prototype.call.bind(method)idiom. This test pins the distinct, real-worldfunction-bind shape that #3828 calls out as the Express (#3527) blocker:
i.e. a captured
Function.prototype.callvalue re-applied through a userfunction-bindclosure withtarget.apply(that, args.concat(...))and runtime(non-literal) args — not the
call.bind(...)call form.It also covers
typeof fn.call/apply/bind, object-thisArgcall/apply/bind,the captured
Function.prototype.callvalue, andObject.prototype.hasOwnPropertyas a value.
Validation
node --experimental-strip-typeson both the default(auto-optimize) and
PERRY_NO_AUTO_OPTIMIZE=1paths, against amain-with-fix(runtime): Function.prototype.call.bind(method) uncurry-this (#3716) #3846runtime.
Note
The minimal repros (1)/(2) in #3828 use a string thisArg (
f.apply("T", …));the residual
{}-vs-"T"difference there is a separate boxed-primitiveJSON.stringifybug, filed as #3857 — unrelated to call/apply/bind dispatch.