Skip to content

Admit object literal named property reads - #3020

Merged
rogeralsing merged 1 commit into
mainfrom
codex/unified-bytecode-loop-60-object-literal-property-read
Jun 1, 2026
Merged

Admit object literal named property reads#3020
rogeralsing merged 1 commit into
mainfrom
codex/unified-bytecode-loop-60-object-literal-property-read

Conversation

@rogeralsing

Copy link
Copy Markdown
Contributor

Summary

  • admit simple object-literal spans followed by named property read chains in production eligibility
  • move { ...box }.value out of the property-read boundary decline row
  • add route-hit coverage for object-spread literal property reads

Verification

  • rtk dotnet test tests/Asynkron.JsEngine.Tests -c Release --filter 'FullyQualifiedNameUnifiedBytecodeProductionEligibilityTests.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

Copilot AI review requested due to automatic review settings June 1, 2026 22:17
@rogeralsing
rogeralsing merged commit 1bcab06 into main Jun 1, 2026
1 check passed
@rogeralsing
rogeralsing deleted the codex/unified-bytecode-loop-60-object-literal-property-read branch June 1, 2026 22:18

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 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 }.value to expect UnifiedBytecodeProductionDeclineCode.None.
  • Add an invocation test that asserts { ...box }.value both 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.

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