Skip to content

Admit typeof implicit arguments#3030

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

Admit typeof implicit arguments#3030
rogeralsing merged 1 commit into
mainfrom
codex/unified-bytecode-loop-70-typeof-arguments

Conversation

@rogeralsing

Copy link
Copy Markdown
Contributor

Summary

  • Route bounded implicit typeof arguments through production unified bytecode as literal "object".
  • Keep full implicit arguments object access, update, and call behavior declined.
  • Update the unified-bytecode expansion contract and route tests.

Verification

  • rtk dotnet test tests/Asynkron.JsEngine.Tests -c Release --filter 'FullyQualifiedNameUnifiedBytecodeProductionEligibilityTests.Evaluate_TypeOfImplicitArgumentsObject_AcceptsLiteralObjectType|FullyQualifiedNameUnifiedBytecodeProductionEligibilityTests.Evaluate_ArgumentsAccess_DeclinesWithArgumentsDependency|FullyQualifiedNameUnifiedBytecodeProductionInvocationTests.TypeOfImplicitArgumentsObject_UsesUnifiedBytecodeProductionFastPath|FullyQualifiedNameUnifiedBytecodeProductionInvocationTests.TypeOfParameterNamedArguments_UsesUnifiedBytecodeProductionFastPath|FullyQualifiedNameUnifiedBytecodeProductionInvocationTests.ParameterNamedArguments_UsesUnifiedBytecodeProductionFastPath|FullyQualifiedNameExpressionProgramCoverageMapTests.UnifiedBytecodeExpansionContract_ListsRequiredHeadingsAndCurrentEnums'
  • rtk dotnet test tests/Asynkron.JsEngine.Tests -c Release --filter 'FullyQualifiedNameUnifiedBytecodeProductionEligibilityTests|FullyQualifiedNameUnifiedBytecodeProductionInvocationTests|FullyQualifiedNameUnifiedBytecodeProductionSpreadCallTests|FullyQualifiedNameUnifiedBytecodeProductionConstructCallTests|FullyQualifiedNameExpressionProgramLoweringTests|FullyQualifiedNameExpressionProgramCoverageMapTests|FullyQualifiedName~AstFreeExecutionAssertionTests'
  • rtk rg 'EvaluateExpression(|ProfileEvaluateExpression(' src/Asynkron.JsEngine/Ast/TypedAstEvaluator.ExecutionPlanRunner*
  • rtk dotnet build src/Asynkron.JsEngine/Asynkron.JsEngine.csproj -c Release
  • rtk git diff --check

Copilot AI review requested due to automatic review settings June 1, 2026 23:21
@rogeralsing rogeralsing merged commit 0046f52 into main Jun 1, 2026
@rogeralsing rogeralsing deleted the codex/unified-bytecode-loop-70-typeof-arguments branch June 1, 2026 23:21

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 extends production unified-bytecode routing to allow the specific case of typeof arguments when it refers to the implicit arguments object, compiling it as a literal "object" while keeping other implicit arguments behaviors (access/update/call-target) declined.

Changes:

  • Admit plans whose only implicit-arguments dependency is typeof arguments by scanning for that bounded pattern.
  • Compile typeof arguments (implicit, non-slot-resolved) as a LoadLiteral "object" in unified bytecode instead of declining compilation.
  • Update eligibility/invocation tests and the unified-bytecode expansion contract documentation to reflect the new admitted route.

Reviewed changes

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

Show a summary per file
File Description
tests/Asynkron.JsEngine.Tests/UnifiedBytecodeProductionInvocationTests.cs Updates invocation test to expect production unified-bytecode fast-path logging for typeof arguments.
tests/Asynkron.JsEngine.Tests/UnifiedBytecodeProductionEligibilityTests.cs Updates eligibility test to accept typeof arguments and assert "object" is emitted as a literal constant.
src/Asynkron.JsEngine/Execution/UnifiedBytecode/UnifiedBytecodeProductionEligibility.cs Adds bounded plan scan for the “only typeof arguments” pattern and removes the prior typeof arguments decline in expression scanning.
src/Asynkron.JsEngine/Execution/UnifiedBytecode/UnifiedBytecodeCompiler.cs Compiles implicit typeof arguments as a literal "object" when it cannot be resolved to an activation slot.
src/Asynkron.JsEngine/Ast/TypedAstEvaluator.SyncFunctionInvoker.cs Adds an activation-descriptor gate to bypass ArgumentsObjectDependency for the bounded typeof arguments case.
docs/unified-bytecode-expansion-contract.md Documents the new behavior for ArgumentsObjectDependency/pre-gate:usesArguments regarding implicit typeof arguments.

💡 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