Skip to content

Admit deep computed member calls#3022

Merged
rogeralsing merged 1 commit into
mainfrom
codex/unified-bytecode-loop-62-deep-computed-call
Jun 1, 2026
Merged

Admit deep computed member calls#3022
rogeralsing merged 1 commit into
mainfrom
codex/unified-bytecode-loop-62-deep-computed-call

Conversation

@rogeralsing

Copy link
Copy Markdown
Contributor

Summary

  • allow computed member-call preparation to use the existing deep named receiver-chain support
  • convert root.child.branch.leaf[key](value) from a stale property-read boundary decline to an admitted production shape
  • add a runtime route-hit proof that preserves the deepest receiver as this

Verification

  • rtk dotnet test tests/Asynkron.JsEngine.Tests -c Release --filter 'FullyQualifiedName~UnifiedBytecodeProductionEligibilityTests.Evaluate_PropertyReadAdjacentFamilies_DeclineWithExplicitCodes|FullyQualifiedName~UnifiedBytecodeProductionEligibilityTests.Evaluate_DeeperNamedMemberCallExpressionPlan_AcceptsExecutableInvocationBoundary|FullyQualifiedName~UnifiedBytecodeProductionInvocationTests.DeepComputedMemberCall_UsesUnifiedBytecodeProductionFastPathAndPreservesThis|FullyQualifiedName~UnifiedBytecodeProductionInvocationTests.DeeperNamedMemberCall_BindsThisToDeepestReceiver|FullyQualifiedName~UnifiedBytecodeProductionInvocationTests.ComputedMemberCallWithExpressionKey_UsesUnifiedBytecodeProductionFastPathAndPreservesThis'\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:27
@rogeralsing rogeralsing merged commit 1367478 into main Jun 1, 2026
1 check passed
@rogeralsing rogeralsing deleted the codex/unified-bytecode-loop-62-deep-computed-call branch June 1, 2026 22:27

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 support to admit deep computed member calls (e.g. root.child.branch.leaf[key](value)), reusing the existing deep named receiver-chain handling so these shapes can take the fast path while preserving correct this binding.

Changes:

  • Allow deep named receiver chains during computed member-call target preparation in both eligibility evaluation and compilation.
  • Update eligibility expectation for deep computed callees from a boundary decline to eligible (None).
  • Add an invocation test proving the unified-bytecode-production fast path is used and that this binds to the deepest receiver for a deep computed member call.

Reviewed changes

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

File Description
tests/Asynkron.JsEngine.Tests/UnifiedBytecodeProductionInvocationTests.cs Adds a runtime proof test for deep computed member calls using the unified fast path and preserving this.
tests/Asynkron.JsEngine.Tests/UnifiedBytecodeProductionEligibilityTests.cs Updates expected eligibility code to reflect newly-supported deep computed member call shape.
src/Asynkron.JsEngine/Execution/UnifiedBytecode/UnifiedBytecodeProductionEligibility.cs Enables deep receiver-chain support (allowDeepChain: true) for first-boundary computed call target preparation eligibility.
src/Asynkron.JsEngine/Execution/UnifiedBytecode/UnifiedBytecodeCompiler.cs Enables deep receiver-chain support (allowDeepChain: true) when emitting computed member call target preparation bytecode.

💡 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