Author: marek
Date: 2007-12-23 09:41:58 -0500 (Sun, 23 Dec 2007)
New Revision: 91833
Modified:
trunk/mcs/mcs/ChangeLog
trunk/mcs/mcs/expression.cs
Log:
2007-12-23 Marek Safar <[EMAIL PROTECTED]>
A fix for bug #346379
* expression.cs (UnaryMutator): Emit size of type for pointer mutator.
Modified: trunk/mcs/mcs/ChangeLog
===================================================================
--- trunk/mcs/mcs/ChangeLog 2007-12-23 14:02:37 UTC (rev 91832)
+++ trunk/mcs/mcs/ChangeLog 2007-12-23 14:41:58 UTC (rev 91833)
@@ -1,5 +1,10 @@
2007-12-23 Marek Safar <[EMAIL PROTECTED]>
+ A fix for bug #346379
+ * expression.cs (UnaryMutator): Emit size of type for pointer mutator.
+
+2007-12-23 Marek Safar <[EMAIL PROTECTED]>
+
A fix for bug #347359
* expression.cs (Invocation): Don't resolve already resolved expression.
Modified: trunk/mcs/mcs/expression.cs
===================================================================
--- trunk/mcs/mcs/expression.cs 2007-12-23 14:02:37 UTC (rev 91832)
+++ trunk/mcs/mcs/expression.cs 2007-12-23 14:41:58 UTC (rev 91833)
@@ -915,11 +915,6 @@
return ResolveOperator (ec);
}
- static int PtrTypeSize (Type t)
- {
- return GetTypeSize (TypeManager.GetElementType (t));
- }
-
//
// Loads the proper "1" into the stack based on the type, then
it emits the
// opcode for the operation requested
@@ -939,10 +934,11 @@
else if (t == TypeManager.float_type)
ig.Emit (OpCodes.Ldc_R4, 1.0F);
else if (t.IsPointer){
- int n = PtrTypeSize (t);
+ Type et = TypeManager.GetElementType (t);
+ int n = GetTypeSize (et);
if (n == 0)
- ig.Emit (OpCodes.Sizeof, t);
+ ig.Emit (OpCodes.Sizeof, et);
else
IntConstant.EmitInt (ig, n);
} else
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches