[codex] Align captured Object.assign value shape#4270
Merged
proggeramlug merged 1 commit intoJun 4, 2026
Merged
Conversation
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.
Linked issues
Summary
This PR aligns the captured
Object.assignvalue shape with Node for the React-reconciler style pattern:Current main already routes the captured call through the
Object.assignalias-call rewrite, so the copy itself works. The value read still materializes as Perry's builtin sentinel, sotypeof assign,assign.name, andassign.lengthare wrong. This keeps value reads for the already-reifiedObjectstatics on the realObjectconstructor closure, where the runtime has function-valued static properties installed.It also corrects
Object.assign.lengthto Node's value of2while preserving the runtime rest-argument call arity used by the assign thunk.Why this cut
The issue is specifically about a captured
Object.assignalias used by React's HostRoot update queue. The HIR receiver-collapse fix and the existing runtime static metadata share the same behavior surface, so they belong in one small object-model PR. Broader React execution and other non-reified Object static values are intentionally left out.Tests
Added
node-suite/object/captured-object-assigncovering:typeof Object.assignafter capturenameandlengthValidation run locally with Node v26.3.0:
npm exec --yes --package=node@26 -- node --experimental-strip-types test-parity/node-suite/object/captured-object-assign.tscaptured-object-assignPERRY_NO_AUTO_OPTIMIZE=1 npm exec --yes --package=node@26 -- bash -lc 'node --version; ./run_parity_tests.sh --suite node-suite --module object --filter captured-object-assign'PERRY_NO_AUTO_OPTIMIZE=1 npm exec --yes --package=node@26 -- bash -lc 'node --version; ./run_parity_tests.sh --suite node-suite --module object --filter assign-coercion-errors'cargo fmt --all -- --checkcargo check -p perry-hir -p perry-runtimegit diff --check./scripts/check_file_size.shKnown limitations / non-goals
Object.assigncopy/descriptor/proxy behavior beyond captured value shape andlengthmetadata.