Admit mixed with and ordinary dynamic names#3031
Merged
rogeralsing merged 1 commit intoJun 1, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the production unified-bytecode routing rules to allow a single function to combine a with-backed dynamic-name segment with ordinary (non-with) dynamic identifier operations, enabling the unified-bytecode fast path for this mixed case when key blockers (direct eval, captured activation, arguments-object dependency) are absent.
Changes:
- Allow the ordinary dynamic-name eligibility/fast-path gate to apply even when the function body contains a
withstatement. - Update eligibility and invocation tests to assert acceptance and fast-path routing for the mixed
with+ outside dynamic identifier scenario. - Update the unified-bytecode expansion contract documentation to reflect the new admitted mixed-lane behavior and updated test references.
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 | Updates the mixed with + outside dynamic identifier test to expect unified-bytecode production fast-path routing (log hit). |
| tests/Asynkron.JsEngine.Tests/UnifiedBytecodeProductionEligibilityTests.cs | Updates eligibility expectations to accept the mixed dynamic-name program when ordinary dynamic identifier environment ops are allowed. |
| src/Asynkron.JsEngine/Ast/TypedAstEvaluator.SyncFunctionInvoker.cs | Relaxes the ordinary dynamic-name fast-path gate to allow coexistence with with-statement bodies. |
| docs/unified-bytecode-expansion-contract.md | Updates contract text and referenced test filters for the new admitted mixed dynamic-name routing. |
💡 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
Verification
UnifiedBytecodeProductionEligibilityTests.Evaluate_WithThenOutsideDynamicIdentifier_AcceptsMixedDynamicNameProgram|FullyQualifiedNameUnifiedBytecodeProductionEligibilityTests.Evaluate_WithDynamicIdentifierOperations_AcceptsBoundedDynamicNameProgram|FullyQualifiedNameUnifiedBytecodeProductionEligibilityTests.Evaluate_OrdinaryDynamicIdentifierOperations_AcceptsEnvironmentOpcodes|FullyQualifiedNameUnifiedBytecodeProductionInvocationTests.WithThenOutsideDynamicIdentifier_UsesUnifiedBytecodeProductionFastPath|FullyQualifiedName~UnifiedBytecodeProductionInvocationTests.OrdinaryGlobalDynamicIdentifierOperations_UseUnifiedBytecodeProductionFastPath'UnifiedBytecodeProductionEligibilityTests|FullyQualifiedNameUnifiedBytecodeProductionInvocationTests|FullyQualifiedNameUnifiedBytecodeProductionSpreadCallTests|FullyQualifiedNameUnifiedBytecodeProductionConstructCallTests|FullyQualifiedNameExpressionProgramLoweringTests|FullyQualifiedNameExpressionProgramCoverageMapTests|FullyQualifiedName~AstFreeExecutionAssertionTests'