Fast Compiler for C# Expression Trees and the lightweight LightExpression alternative. Diagnostic and code generation tools for the expressions.
1.16k
stars
82
forks
source link
Diagnostics: calculate the stack population depth after each emit to expose the problematic cases #403
Open
dadhi opened 6 months ago
Using the
OpCode.StackBehaviourPop
andOpCode.StackBehaviourPush
we may calculate the stack balance in the DEBUGDemit
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 thePrintIL
in tests. Then the value for System Compile and Fast Compile can be compared to see the discrepancies.