* expression.cs (ArrayAccess.EmitLoadOpcode): I was using the
wrong opcode for loading bytes and bools (ldelem.i1 instead of
ldelem.u1) and using the opposite for sbytes.
This fixes Digger, and we can finally run it.
svn path=/trunk/mcs/; revision=5711
2002-07-11 Miguel de Icaza <miguel@ximian.com>
+ * expression.cs (ArrayAccess.EmitLoadOpcode): I was using the
+ wrong opcode for loading bytes and bools (ldelem.i1 instead of
+ ldelem.u1) and using the opposite for sbytes.
+
+ This fixes Digger, and we can finally run it.
+
* driver.cs (UnixParseOption): Move the option parsing here.
(CSCParseOption): Implement CSC-like parsing of options.
static public void EmitLoadOpcode (ILGenerator ig, Type type)
{
if (type == TypeManager.byte_type || type == TypeManager.bool_type)
- ig.Emit (OpCodes.Ldelem_I1);
- else if (type == TypeManager.sbyte_type)
ig.Emit (OpCodes.Ldelem_U1);
+ else if (type == TypeManager.sbyte_type)
+ ig.Emit (OpCodes.Ldelem_I1);
else if (type == TypeManager.short_type)
ig.Emit (OpCodes.Ldelem_I2);
else if (type == TypeManager.ushort_type)