Skip to content

Admit binary computed object keys in call args - #3012

Merged
rogeralsing merged 1 commit into
mainfrom
codex/unified-bytecode-loop-52-binary-computed-key
Jun 1, 2026
Merged

Admit binary computed object keys in call args#3012
rogeralsing merged 1 commit into
mainfrom
codex/unified-bytecode-loop-52-binary-computed-key

Conversation

@rogeralsing

Copy link
Copy Markdown
Contributor

Summary

  • admit simple binary computed object keys in call-argument object literals for production unified bytecode routing
  • split the previous complex computed-key decline so call-expression keys remain a CallDependency proof
  • add a runtime route-hit proof for receiver({ [a + b]: v }) and update the decline contract row

Verification

  • focused route proof: 9 tests passed
  • broad bytecode proof: 889 tests passed
  • docs/decline proof: 3 tests passed
  • engine build: 2 projects, 0 errors, 0 warnings
  • AST seam scan: no EvaluateExpression/ProfileEvaluateExpression hits in execution-plan runner files
  • git diff --check: clean

Copilot AI review requested due to automatic review settings June 1, 2026 21:13
@rogeralsing
rogeralsing merged commit 07f3958 into main Jun 1, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.md to reflect the revised CallDependency contract 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 _);
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.

2 participants