Admit captured compound property writes to bytecode - #3043
Merged
rogeralsing merged 1 commit intoJun 2, 2026
Conversation
rogeralsing
deleted the
codex/unified-bytecode-loop-83-captured-compound-logical
branch
June 2, 2026 02:01
There was a problem hiding this comment.
Pull request overview
This PR extends the unified-bytecode production pipeline to treat captured dynamic-identifier bases as eligible for first-boundary compound (+=, etc.) and logical (&&=, ||=) property mutations (both named and computed). This fits into the engine’s broader “unified bytecode” effort by widening the set of expression shapes that can be safely VM-owned without falling back to the legacy IR/execution paths.
Changes:
- Updated unified-bytecode eligibility analysis to accept named/computed compound + logical property writes when the base is a captured dynamic identifier and dynamic reads are admitted.
- Threaded
allowsDynamicIdentifiersthrough the relevant compiler helpers so base/key/RHS dynamic identifier reads can be compiled without widening optional/private/super-adjacent cases. - Added new eligibility and invocation tests covering captured arrow/function-expression compound/logical property writes and refreshed the unified bytecode expansion contract documentation accordingly.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Asynkron.JsEngine.Tests/UnifiedBytecodeProductionInvocationTests.cs | Adds invocation-route proofs that captured compound/logical property writes hit the unified-bytecode fast path for arrow + function expressions. |
| tests/Asynkron.JsEngine.Tests/UnifiedBytecodeProductionEligibilityTests.cs | Adds eligibility proofs ensuring dynamic-identifier-base compound/logical property writes are accepted when dynamic reads are admitted. |
| src/Asynkron.JsEngine/Execution/UnifiedBytecode/UnifiedBytecodeProductionEligibility.cs | Extends candidate detection to permit dynamic-identifier bases and threads the dynamic-admission flag through relevant checks. |
| src/Asynkron.JsEngine/Execution/UnifiedBytecode/UnifiedBytecodeCompiler.cs | Threads allowsDynamicIdentifiers into property-mutation compilation helpers and emits LoadDynamicIdentifier where appropriate. |
| docs/unified-bytecode-expansion-contract.md | Updates the contract language to include compound/logical property writes in the captured dynamic-base VM-owned surface. |
💡 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
Proof
Evaluate_NamedCompoundPropertyWriteWithDynamicIdentifierBase_AcceptsWhenDynamicReadsAreAdmitted|FullyQualifiedNameEvaluate_ComputedCompoundPropertyWriteWithDynamicIdentifierBase_AcceptsWhenDynamicReadsAreAdmitted|FullyQualifiedNameEvaluate_LogicalAndAssignment_DynamicIdentifierBase_AcceptsWhenDynamicReadsAreAdmitted|FullyQualifiedNameEvaluate_LogicalOrAssignment_ComputedDynamicIdentifierBase_AcceptsWhenDynamicReadsAreAdmitted|FullyQualifiedNameArrowFunction_CapturedPropertyCompoundWriteExpression_UsesUnifiedBytecodeProductionFastPath|FullyQualifiedNameFunctionExpression_CapturedPropertyCompoundWriteExpression_UsesUnifiedBytecodeProductionFastPath|FullyQualifiedNameArrowFunction_CapturedComputedPropertyCompoundWriteExpression_UsesUnifiedBytecodeProductionFastPath|FullyQualifiedNameFunctionExpression_CapturedComputedPropertyCompoundWriteExpression_UsesUnifiedBytecodeProductionFastPath|FullyQualifiedNameArrowFunction_CapturedPropertyLogicalWriteExpression_UsesUnifiedBytecodeProductionFastPath|FullyQualifiedNameFunctionExpression_CapturedPropertyLogicalWriteExpression_UsesUnifiedBytecodeProductionFastPath|FullyQualifiedNameArrowFunction_CapturedComputedPropertyLogicalWriteExpression_UsesUnifiedBytecodeProductionFastPath|FullyQualifiedNameFunctionExpression_CapturedComputedPropertyLogicalWriteExpression_UsesUnifiedBytecodeProductionFastPath" — 12 passedExpressionProgramCoverageMapTests&FullyQualifiedNameUnifiedBytecodeExpansionContract_ListsRequiredHeadingsAndCurrentEnums" — 1 passed