Author: jbevain Date: 2008-01-21 09:12:21 -0500 (Mon, 21 Jan 2008) New Revision: 93387
Modified: trunk/mcs/class/System.Core/System.Linq.Expressions/BinaryExpression.cs trunk/mcs/class/System.Core/System.Linq.Expressions/ChangeLog trunk/mcs/class/System.Core/System.Linq.Expressions/Expression.cs trunk/mcs/class/System.Core/System.Linq.Expressions/UnaryExpression.cs Log: 2008-01-21 Jb Evain <[EMAIL PROTECTED]> * Expression.cs, UnaryExpression.cs, BinaryExpression.cs: Move the IsUnsigned helper from BinaryExpression to Expression, so it can be used in UnaryExpression. Modified: trunk/mcs/class/System.Core/System.Linq.Expressions/BinaryExpression.cs =================================================================== --- trunk/mcs/class/System.Core/System.Linq.Expressions/BinaryExpression.cs 2008-01-21 14:09:41 UTC (rev 93386) +++ trunk/mcs/class/System.Core/System.Linq.Expressions/BinaryExpression.cs 2008-01-21 14:12:21 UTC (rev 93387) @@ -97,14 +97,6 @@ this.is_lifted = is_lifted; } - static bool IsUnsigned (Type t) - { - if (t.IsPointer) - return IsUnsigned (t.GetElementType ()); - - return t == typeof (ushort) || t == typeof (uint) || t == typeof (ulong) || t == typeof (byte); - } - static void EmitMethod () { throw new NotImplementedException ("Support for MethodInfo-based BinaryExpressions not yet supported"); Modified: trunk/mcs/class/System.Core/System.Linq.Expressions/ChangeLog =================================================================== --- trunk/mcs/class/System.Core/System.Linq.Expressions/ChangeLog 2008-01-21 14:09:41 UTC (rev 93386) +++ trunk/mcs/class/System.Core/System.Linq.Expressions/ChangeLog 2008-01-21 14:12:21 UTC (rev 93387) @@ -1,3 +1,9 @@ +2008-01-21 Jb Evain <[EMAIL PROTECTED]> + + * Expression.cs, UnaryExpression.cs, BinaryExpression.cs: + Move the IsUnsigned helper from BinaryExpression to Expression, + so it can be used in UnaryExpression. + 2008-01-21 Miguel de Icaza <[EMAIL PROTECTED]> * Start code generation for nullables, currently this generates Modified: trunk/mcs/class/System.Core/System.Linq.Expressions/Expression.cs =================================================================== --- trunk/mcs/class/System.Core/System.Linq.Expressions/Expression.cs 2008-01-21 14:09:41 UTC (rev 93386) +++ trunk/mcs/class/System.Core/System.Linq.Expressions/Expression.cs 2008-01-21 14:12:21 UTC (rev 93387) @@ -1385,6 +1385,14 @@ return type.IsGenericType && type.GetGenericTypeDefinition () == typeof (Nullable<>); } + protected static bool IsUnsigned (Type t) + { + if (t.IsPointer) + return IsUnsigned (t.GetElementType ()); + + return t == typeof (ushort) || t == typeof (uint) || t == typeof (ulong) || t == typeof (byte); + } + // // returns the T in a a Nullable<T> type. // Modified: trunk/mcs/class/System.Core/System.Linq.Expressions/UnaryExpression.cs =================================================================== --- trunk/mcs/class/System.Core/System.Linq.Expressions/UnaryExpression.cs 2008-01-21 14:09:41 UTC (rev 93386) +++ trunk/mcs/class/System.Core/System.Linq.Expressions/UnaryExpression.cs 2008-01-21 14:12:21 UTC (rev 93387) @@ -28,6 +28,7 @@ using System; using System.Reflection; +using System.Reflection.Emit; namespace System.Linq.Expressions { @@ -75,6 +76,12 @@ internal override void Emit (EmitContext ec) { + var il = ec.ig; + + operand.Emit (ec); + + bool is_unsigned = IsUnsigned (operand.Type); + throw new NotImplementedException (); } } _______________________________________________ Mono-patches maillist - Mono-patches@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-patches