Skip to content

Admit computed object keys from identifier calls - #3024

Merged
rogeralsing merged 1 commit into
mainfrom
codex/unified-bytecode-loop-64-computed-object-key-call
Jun 1, 2026
Merged

Admit computed object keys from identifier calls#3024
rogeralsing merged 1 commit into
mainfrom
codex/unified-bytecode-loop-64-computed-object-key-call

Conversation

@rogeralsing

Copy link
Copy Markdown
Contributor

Summary

  • admit { [fn()]: value } object-literal computed keys when fn is an activation-resolved zero-argument identifier call
  • thread call-target constants through call-argument object-literal lowering for this narrow nested-key call shape
  • convert the stale CallDependency row to route coverage and update the expansion contract proof pointer

Verification

  • rtk dotnet test tests/Asynkron.JsEngine.Tests -c Release --filter 'FullyQualifiedName~UnifiedBytecodeProductionEligibilityTests.Evaluate_CallWithCallExpressionComputedKeyObjectArg_Accepts|FullyQualifiedName~UnifiedBytecodeProductionEligibilityTests.Evaluate_CallWithBinaryComputedKeyObjectArg_Accepts|FullyQualifiedName~UnifiedBytecodeProductionEligibilityTests.Evaluate_CallWithSimpleComputedKeyObjectArg_Accepts|FullyQualifiedName~UnifiedBytecodeProductionInvocationTests.CallWithCallExpressionComputedKeyObjectArg_UsesUnifiedBytecodeProductionFastPathAndStoresValue|FullyQualifiedName~UnifiedBytecodeProductionInvocationTests.CallWithBinaryComputedKeyObjectArg_UsesUnifiedBytecodeProductionFastPathAndStoresValue|FullyQualifiedName~ExpressionProgramCoverageMapTests.UnifiedBytecodeExpansionContract_ListsRequiredHeadingsAndCurrentEnums'\n- rtk dotnet test tests/Asynkron.JsEngine.Tests -c Release --filter 'FullyQualifiedName~UnifiedBytecodeProductionEligibilityTests|FullyQualifiedName~UnifiedBytecodeProductionInvocationTests|FullyQualifiedName~UnifiedBytecodeProductionSpreadCallTests|FullyQualifiedName~UnifiedBytecodeProductionConstructCallTests|FullyQualifiedName~ExpressionProgramLoweringTests|FullyQualifiedName~ExpressionProgramCoverageMapTests|FullyQualifiedName~AstFreeExecutionAssertionTests'\n- rtk dotnet build src/Asynkron.JsEngine/Asynkron.JsEngine.csproj -c Release\n- rtk rg "EvaluateExpression\\(|ProfileEvaluateExpression\\(" src/Asynkron.JsEngine/Ast/TypedAstEvaluator.ExecutionPlanRunner*\n- rtk git diff --check

Copilot AI review requested due to automatic review settings June 1, 2026 22:43
@rogeralsing
rogeralsing merged commit 9ecc6d3 into main Jun 1, 2026
1 check passed
@rogeralsing
rogeralsing deleted the codex/unified-bytecode-loop-64-computed-object-key-call branch June 1, 2026 22:43

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 expands unified bytecode production eligibility and compilation to admit object-literal computed keys of the form { [fn()]: value } when fn is an activation-resolved identifier call with zero arguments, enabling the unified-bytecode-production fast path for this previously-declined shape.

Changes:

  • Extend simple object-literal span eligibility to recognize zero-arg activation-resolved identifier-call computed keys.
  • Thread call-target constants / slot layout through call-argument object-literal lowering to compile the nested key call via PrepareIdentifierCallTarget + CallInvocationBoundary.
  • Update tests and the unified bytecode expansion contract documentation to reflect the new admitted shape and refreshed CallDependency coverage pointer.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/Asynkron.JsEngine.Tests/UnifiedBytecodeProductionInvocationTests.cs Adds an invocation test asserting the unified-bytecode-production fast path is used and the computed-key value is stored correctly.
tests/Asynkron.JsEngine.Tests/UnifiedBytecodeProductionEligibilityTests.cs Updates the eligibility test from “declines” to “accepts” and asserts key unified bytecode opcodes are present.
src/Asynkron.JsEngine/Execution/UnifiedBytecode/UnifiedBytecodeProductionEligibility.cs Admits the narrow { [fn()]: v } key-call shape during simple object-literal span measurement.
src/Asynkron.JsEngine/Execution/UnifiedBytecode/UnifiedBytecodeCompiler.cs Extends simple object-literal lowering (when used for call arguments) to compile the nested identifier call key and plumb call-target constants where needed.
docs/unified-bytecode-expansion-contract.md Updates the CallDependency row to reflect the newly-admitted shape and repoints the verification filter to current coverage.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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