2002-07-02 Martin Baulig <martin@gnome.org>
authorMartin Baulig <martin@novell.com>
Tue, 2 Jul 2002 18:44:54 +0000 (18:44 -0000)
committerMartin Baulig <martin@novell.com>
Tue, 2 Jul 2002 18:44:54 +0000 (18:44 -0000)
* expression.cs (ArrayAccess.EmitStoreOpcode): If the type is a
ValueType, call TypeManager.TypeToCoreType() on it.
(Invocations.EmitParams): Call TypeManager.TypeToCoreType() on
the OpCodes.Newarr argument.

svn path=/trunk/mcs/; revision=5551

mcs/mcs/ChangeLog
mcs/mcs/expression.cs

index 85f0a44413acf38c230fc4f3f786186b7f8a57f0..76e4b75b16e161f00eca0a26d542401f5e099098 100755 (executable)
@@ -1,3 +1,10 @@
+2002-07-02  Martin Baulig  <martin@gnome.org>
+
+       * expression.cs (ArrayAccess.EmitStoreOpcode): If the type is a
+       ValueType, call TypeManager.TypeToCoreType() on it.
+       (Invocations.EmitParams): Call TypeManager.TypeToCoreType() on
+       the OpCodes.Newarr argument.
+
 2002-07-02  Martin Baulig  <martin@gnome.org>
 
        * expression.cs (Invocation.EmitCall): When compiling corlib,
index 602f162b9e1473626de65f5d35e60d00881aa50d..655c4c115afe9ddc74632e599a6d4611b78e4661 100755 (executable)
@@ -3767,7 +3767,7 @@ namespace Mono.CSharp {
 
                        array = ig.DeclareLocal (Type.GetType (array_type));
                        IntConstant.EmitInt (ig, count);
-                       ig.Emit (OpCodes.Newarr, t);
+                       ig.Emit (OpCodes.Newarr, TypeManager.TypeToCoreType (t));
                        ig.Emit (OpCodes.Stloc, array);
 
                        int top = arguments.Count;
@@ -5664,7 +5664,7 @@ namespace Mono.CSharp {
                        else if (t == TypeManager.intptr_type)
                                ig.Emit (OpCodes.Stelem_I);
                        else if (t.IsValueType)
-                               ig.Emit (OpCodes.Stobj, t);
+                               ig.Emit (OpCodes.Stobj, TypeManager.TypeToCoreType (t));
                        else
                                ig.Emit (OpCodes.Stelem_Ref);
                }