Skip to content

Remove private Reflection.Emit inspection - #1335

Merged
nickna merged 1 commit into
mainfrom
feat/aot-emit-state
Jul 30, 2026
Merged

Remove private Reflection.Emit inspection#1335
nickna merged 1 commit into
mainfrom
feat/aot-emit-state

Conversation

@nickna

@nickna nickna commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • remove the disabled-by-default ILLabelValidator that reflected over private PersistedAssemblyBuilder label, branch, type, method, and constructor state
  • remove the generator yield-star reader of private IL bytes and stack-depth fields; state-machine multi-operand emission already uses SpillBoxed locals before suspension
  • lower the AOT analyzer ratchet from 116 to 102 warnings and update the Native AOT plan

Trade-off

GenerateMetadata remains the mandatory validator for unmarked branch targets, but failures no longer receive the optional SHARPTS_VALIDATE_LABELS pre-pass's method-specific context. Preserving that duplicate diagnostic faithfully would require routing 2,126 GetILGenerator acquisitions across 250 files through a wrapper.

Verification

  • dotnet test SharpTS.Tests/SharpTS.Tests.csproj --no-restore: 16,266 passed
  • focused generator/yield-star/IL verification suites: 653 passed
  • AOT analyzer: 102 warnings (IL2075 36 -> 22; all other categories unchanged)
  • win-arm64 Native AOT publish and Examples/AotCompileGate/main.ts smoke: 42
  • native image: 93,400,064 bytes (98,816 bytes smaller than the prior checkpoint)

@nickna
nickna merged commit bcdf0f7 into main Jul 30, 2026
4 checks passed
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.

1 participant