Valid once #16 is merged.
Repro:
Update the repro program by changing Main to contain try/catch/finally and calling some new methods from the catch and finally regions.
Fix:
- Work is done in MethodBodyNode.cs
- Use
bodyBlock.ExceptionRegions to get to the exception regions in the original method
- Update GetStaticDependencies to report the catch clause type token dependency
- Include exception regions when rewriting the method body in Write.
- The code already uses InstructionEncoder so just add a ControlFlowBuilder to it
- Use the ControlFlowBuilder to add labels for the try/catch/finally blocks
- Add exception regions
- Remap the catch clause type tokens
Don't forget (or add an issue for) about filter blocks.
Valid once #16 is merged.
Repro:
Update the repro program by changing Main to contain try/catch/finally and calling some new methods from the catch and finally regions.
Fix:
bodyBlock.ExceptionRegionsto get to the exception regions in the original methodDon't forget (or add an issue for) about filter blocks.