Admit object literal named property reads - #3020
Merged
rogeralsing merged 1 commit intoJun 1, 2026
Merged
Conversation
rogeralsing
deleted the
codex/unified-bytecode-loop-60-object-literal-property-read
branch
June 1, 2026 22:18
There was a problem hiding this comment.
Pull request overview
This PR expands unified bytecode production eligibility to allow simple object-literal constructions (including spreads) followed immediately by a named-property read chain (e.g. { ...box }.value), and adds coverage to ensure the fast-path route is hit for this shape.
Changes:
- Admit “simple object literal span + named property read chain” as a valid first property-read boundary shape in
UnifiedBytecodeProductionEligibility. - Update the eligibility test case for
{ ...box }.valueto expectUnifiedBytecodeProductionDeclineCode.None. - Add an invocation test that asserts
{ ...box }.valueboth evaluates correctly and uses the unified-bytecode-production fast path.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/Asynkron.JsEngine.Tests/UnifiedBytecodeProductionInvocationTests.cs | Adds a route-hit test asserting { ...box }.value runs on the production fast path and returns the correct value. |
| tests/Asynkron.JsEngine.Tests/UnifiedBytecodeProductionEligibilityTests.cs | Updates the expected eligibility result for { ...box }.value from declined to eligible. |
| src/Asynkron.JsEngine/Execution/UnifiedBytecode/UnifiedBytecodeProductionEligibility.cs | Adds an eligibility predicate for object-literal spans followed by non-optional, non-private named property reads. |
💡 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
{ ...box }.valueout of the property-read boundary decline rowVerification
UnifiedBytecodeProductionEligibilityTests.Evaluate_PropertyReadAdjacentFamilies_DeclineWithExplicitCodes|FullyQualifiedNameUnifiedBytecodeProductionInvocationTests.ObjectLiteralSpreadNamedPropertyRead_UsesUnifiedBytecodeProductionFastPath|FullyQualifiedNameUnifiedBytecodeProductionInvocationTests.ObjectLiteralSpread_UsesUnifiedBytecodeProductionFastPathAndCopiesSymbolKeys|FullyQualifiedNameUnifiedBytecodeProductionInvocationTests.ObjectLiteralSpread_PreservesOverwriteOrder_OnFastPath|FullyQualifiedNameUnifiedBytecodeProductionInvocationTests.ObjectLiteralConstruction_UsesUnifiedBytecodeProductionFastPathAndCoercesComputedKeys'\n- rtk dotnet test tests/Asynkron.JsEngine.Tests -c Release --filter 'FullyQualifiedNameUnifiedBytecodeProductionEligibilityTests|FullyQualifiedNameUnifiedBytecodeProductionInvocationTests|FullyQualifiedNameUnifiedBytecodeProductionSpreadCallTests|FullyQualifiedNameUnifiedBytecodeProductionConstructCallTests|FullyQualifiedNameExpressionProgramLoweringTests|FullyQualifiedNameExpressionProgramCoverageMapTests|FullyQualifiedNameAstFreeExecutionAssertionTests'\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