Admit computed object keys from identifier calls - #3024
Merged
rogeralsing merged 1 commit intoJun 1, 2026
Conversation
rogeralsing
deleted the
codex/unified-bytecode-loop-64-computed-object-key-call
branch
June 1, 2026 22:43
There was a problem hiding this comment.
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.
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
{ [fn()]: value }object-literal computed keys whenfnis an activation-resolved zero-argument identifier callVerification
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