Hey, On 6/19/07, Dries Vanoverberghe <[EMAIL PROTECTED]> wrote: > I guess MethodBody.Simplify should also transform the leave.s > instruction into a leave instruction. > and making the OpcodeType of OpCodes.Leave_S a OpCodeType.Macro
Fixed: http://lists.ximian.com/pipermail/mono-patches/2007-June/095037.html http://lists.ximian.com/pipermail/mono-patches/2007-June/095039.html > 1. When this case in MethodBody.Simplify() is used > > case Code.Ldc_I4_S : > SimplifyFromSByte (i, OpCodes.Ldc_I4); > break; > > I get a cast problem in CodeWriter.cs, more specifically at line 145 > (The middle one) > > case OperandType.InlineI : > m_codeWriter.Write ((int) > instr.Operand); > break; > > When I take a look in the debugger, instr.Operand is of type object > {sbyte} I can't reproduce this one, could you update cecil, test, and provide me with a test case? Thanks! > Commenting the case in MethodBody.Simplify() prevents the problem from > happening. I am not sure how to solve it :) > > 2. When this case in MethodBody.Simplify() is used > > case Code.Ldloca_S : > Simplify (i, OpCodes.Ldloca, > CodeReader.GetVariable (this, > (sbyte) i.Operand)); > break; This should be fixed in SVN as well, Thanks! -- Jb --~--~---------~--~----~------------~-------~--~----~ -- mono-cecil -~----------~----~----~----~------~----~------~--~---
