Evaluate instruction types independent of Reflection.Emit
Author: pardeikeCreated Sep 8, 2026Updated Sep 8, 2026
Labelsenhancementneeds more info/work
Investigation for the Harmony 3 backlog.
Wrapper construction already uses CodeInstruction lists, but public instruction metadata and local/label APIs still expose Reflection.Emit types. #586 discusses going further and replacing those dependencies with Harmony-owned representations.
Evaluate the benefit and cost of that change before committing to a rewrite.
Completion criteria:
- Inventory the public and internal dependencies, including OpCode, Label, LocalBuilder, ILGenerator, exception regions and signature operands.
- Identify concrete problems a new representation solves beyond a small transpiler context or body importer.
- Assess source/binary compatibility, external transpilers, conversion between Harmony copies, MonoMod integration and the supported runtime matrix.
- Compare targeted adapters with a new representation and emission boundary.
- Record a go/no-go decision and migration constraints; prototype only the narrowest unresolved point.
The existing CodeInstruction wrapper refactor is already implemented. Removing these dependencies must not be presented as proof of AOT or IL2CPP patching support.
Follow-up to the architectural discussion in #586. Current CodeInstruction.
Source: pardeike/Harmony