Diagnostics: calculate the stack population depth after each emit to expose the problematic cases
dadhi opened this issue · 0 comments
dadhi commented
Using the OpCode.StackBehaviourPop
and OpCode.StackBehaviourPush
we may calculate the stack balance in the DEBUG Demit
calls. See https://source.dot.net/#System.Private.CoreLib/src/libraries/System.Private.CoreLib/src/System/Reflection/Emit/Opcode.cs,f10f1c9bbefdd170,references
Also, we may calculate the balance in the PrintIL
in tests.
Then the value for System Compile and Fast Compile can be compared to see the discrepancies.