Admit binary computed object keys in call args - #3012
Merged
rogeralsing merged 1 commit intoJun 1, 2026
Conversation
There was a problem hiding this comment.
Pull request overview
This PR widens unified-bytecode production routing to admit simple binary computed object keys inside call-argument object literals (e.g. receiver({ [a + b]: v })), while keeping call-expression keys as a CallDependency decline proof. It also adds focused runtime/eligibility coverage and updates the expansion contract documentation.
Changes:
- Extend simple object-literal span detection/compilation to accept a limited “simple binary key expression” shape before
ResolvePropertyKey. - Add eligibility + runtime fast-path tests for
{ [a + b]: v }, and split the previous “complex computed key” decline proof to specifically cover call-expression keys. - Update
docs/unified-bytecode-expansion-contract.mdto reflect the revisedCallDependencycontract and proof command.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/Asynkron.JsEngine.Tests/UnifiedBytecodeProductionInvocationTests.cs | Adds a runtime proof that binary computed object keys route through the unified-bytecode production fast path and store the expected value. |
| tests/Asynkron.JsEngine.Tests/UnifiedBytecodeProductionEligibilityTests.cs | Adds acceptance coverage for binary computed keys and keeps a targeted decline proof for call-expression computed keys. |
| src/Asynkron.JsEngine/Execution/UnifiedBytecode/UnifiedBytecodeProductionEligibility.cs | Admits a simple binary-key op span as a valid computed-key payload inside “simple object literal” call-arg spans. |
| src/Asynkron.JsEngine/Execution/UnifiedBytecode/UnifiedBytecodeCompiler.cs | Emits unified bytecode for the new binary computed-key shape when compiling simple object literal spans. |
| docs/unified-bytecode-expansion-contract.md | Updates the CallDependency row to include the newly admitted simple/binary computed object keys and references the new decline proof test. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+6205
to
+6218
| TryAppendSimpleOperandLoad( | ||
| expressionProgram.GetOperation(i), | ||
| expressionProgram, | ||
| activationSlots, | ||
| unified, | ||
| literalConstants, | ||
| out _); | ||
| TryAppendSimpleOperandLoad( | ||
| expressionProgram.GetOperation(i + 1), | ||
| expressionProgram, | ||
| activationSlots, | ||
| unified, | ||
| literalConstants, | ||
| out _); |
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
Verification