Admit deep computed member calls#3022
Merged
rogeralsing merged 1 commit intoJun 1, 2026
Merged
Conversation
There was a problem hiding this comment.
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
thisbinds 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.
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
root.child.branch.leaf[key](value)from a stale property-read boundary decline to an admitted production shapethisVerification
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