Skip to content

Admit typeof unresolved identifiers - #3026

Merged
rogeralsing merged 1 commit into
mainfrom
codex/unified-bytecode-loop-66-typeof-dynamic
Jun 1, 2026
Merged

Admit typeof unresolved identifiers#3026
rogeralsing merged 1 commit into
mainfrom
codex/unified-bytecode-loop-66-typeof-dynamic

Conversation

@rogeralsing

Copy link
Copy Markdown
Contributor

Summary

  • convert unresolved typeof eligibility from stale DynamicLookupDependency coverage to the ordinary dynamic-name opcode path
  • add direct runtime route-hit coverage for typeof missing returning undefined
  • update the unified-bytecode expansion contract wording for admitted ordinary dynamic-name paths

Verification

  • Focused proof: 4 tests passed
  • Broad unified-bytecode/lowering pack: 901 tests passed
  • Build: 0 errors, 0 warnings
  • AST seam scan: no EvaluateExpression/ProfileEvaluateExpression matches
  • git diff --check clean

Copilot AI review requested due to automatic review settings June 1, 2026 22:57
@rogeralsing
rogeralsing merged commit 43c94c2 into main Jun 1, 2026
@rogeralsing
rogeralsing deleted the codex/unified-bytecode-loop-66-typeof-dynamic branch June 1, 2026 22:57

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 pull request widens unified-bytecode production support to admit typeof on unresolved identifiers via the ordinary dynamic-name opcode path, adds runtime coverage for the typeof missing === "undefined" behavior, and updates the unified-bytecode expansion contract to reflect the widened admission surface.

Changes:

  • Added a runtime invocation test asserting typeof of an unresolved identifier returns "undefined" while still hitting the unified-bytecode production fast path.
  • Updated eligibility tests to accept typeof missing when AllowsOrdinaryDynamicIdentifierEnvironmentOperations is enabled, asserting emission of TypeOfDynamicIdentifier.
  • Updated the unified-bytecode expansion contract wording to include the ordinary dynamic-name environment path.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
tests/Asynkron.JsEngine.Tests/UnifiedBytecodeProductionInvocationTests.cs Adds runtime route-hit coverage for typeof on an unresolved identifier returning "undefined" via the production fast path.
tests/Asynkron.JsEngine.Tests/UnifiedBytecodeProductionEligibilityTests.cs Updates eligibility expectations so unresolved typeof is admitted when ordinary dynamic-name ops are enabled, and asserts the dynamic typeof opcode is emitted.
docs/unified-bytecode-expansion-contract.md Updates contract wording for dynamic-lookup declines to reflect the newly admitted ordinary dynamic-name path.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

| `ClassConstructorActivation` | Activation descriptor gate for class constructor activation outside the admitted simple base constructor route and explicit derived-constructor `super(...)` route with post-super `this` body reads/writes | Constructor route | Constructor boundary lane | `rtk dotnet test tests/Asynkron.JsEngine.Tests --filter "FullyQualifiedName~UnifiedBytecodeProductionConstructCallTests&FullyQualifiedName~Constructor"` |
| `CallDependency` | Direct eval outside the one-argument non-spread eval-identifier boundary, out-of-boundary call-target preparation, complex call arguments excluding admitted simple/binary template-literal substitutions, simple/binary computed object keys, and zero-argument activation-resolved identifier-call computed object keys, and descriptor-level non-parameter callee calls | Existing sync IR call route | Wider call invocation lane | `rtk dotnet test tests/Asynkron.JsEngine.Tests --filter "FullyQualifiedName~UnifiedBytecodeProductionEligibilityTests&FullyQualifiedName~Evaluate_ActivationDependencies_DeclineBeforeCompile"` |
| `DynamicLookupDependency` | Unresolved identifier loads/stores/typeof/update outside the with-backed dynamic-name path | Existing sync IR / environment lookup route | Dynamic-name lane | `rtk dotnet test tests/Asynkron.JsEngine.Tests --filter "FullyQualifiedName~UnifiedBytecodeProductionEligibilityTests&FullyQualifiedName~Evaluate_DynamicIdentifierLookup_DeclinesWithDynamicLookupDependency"` |
| `DynamicLookupDependency` | Unresolved identifier loads/stores/update outside the admitted ordinary and with-backed dynamic-name paths | Existing sync IR / environment lookup route | Dynamic-name lane | `rtk dotnet test tests/Asynkron.JsEngine.Tests --filter "FullyQualifiedName~UnifiedBytecodeProductionEligibilityTests&FullyQualifiedName~Evaluate_DynamicIdentifierLookup_DeclinesWithDynamicLookupDependency"` |
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