On Apr 8, 6:30 am, Lotfi Gheribi <[email protected]> wrote:
> For dead code, we cannot just remove it ! ...
> Have a look at the following code :   ...
> This code is 100% valid, it has 1 single dead instruction at L2.
> If you remove this instruction, your code would be no longer valid !!!!

Perhaps it's valid according to the standard, but as I argued
previously, many real compilers need the platform to work differently.
I showed that the stack should be considered the same at L2 as at L1,
so there's a stack size conflict at L3. Branched from L6, the stack
size before L3 is 1; considered top-down, the stack size before L3 is
2. If it were my decision, I would throw an exception that the code is
invalid, when computing the max stack size.
--~--~---------~--~----~------------~-------~--~----~
--
mono-cecil
-~----------~----~----~----~------~----~------~--~---

Reply via email to