Author: cesar
Date: 2005-05-25 17:05:48 -0400 (Wed, 25 May 2005)
New Revision: 45016

Modified:
   trunk/mcs/class/Microsoft.JScript/Microsoft.JScript/BitwiseBinary.cs
   trunk/mcs/class/Microsoft.JScript/Microsoft.JScript/Convert.cs
Log:
last patch broke the build reverting

Modified: trunk/mcs/class/Microsoft.JScript/Microsoft.JScript/BitwiseBinary.cs
===================================================================
--- trunk/mcs/class/Microsoft.JScript/Microsoft.JScript/BitwiseBinary.cs        
2005-05-25 20:48:48 UTC (rev 45015)
+++ trunk/mcs/class/Microsoft.JScript/Microsoft.JScript/BitwiseBinary.cs        
2005-05-25 21:05:48 UTC (rev 45016)
@@ -3,7 +3,6 @@
 //
 // Author:
 //     Cesar Lopez Nataren ([EMAIL PROTECTED])
-//     Efren Serra ([EMAIL PROTECTED])
 //
 // (C) 2003, Cesar Lopez Nataren
 //
@@ -45,105 +44,9 @@
                [DebuggerHiddenAttribute]
                public object EvaluateBitwiseBinary (object v1, object v2)
                {
-                       return new EvaluateBitwiseBinary (v1, v2, 
this.operatorTok);
+                       return new object ();
                }
 
-               private object EvaluateBitwiseBinary (object v1, object v2, 
JSToken operatorTok)
-               {
-                       IConvertible v1_ic = Convert.GetIConvertible (v1);
-                       IConvertible v2_ic = Convert.GetIConvertible (v2);
-                       TypeCode v1_tc = Convert.GetTypeCode (v1, v1_ic);
-                       TypeCode v2_tc = Convert.GetTypeCode (v2, v2_ic);
-
-                       switch (v1_tc) {
-                       case TypeCode.Empty:
-                       case TypeCode.DBNull:
-                               return EvaluateBitwiseBinary (0, v2, 
operatorTok);
-                               break;
-
-                       case Boolean:
-                       case Char:
-                       case SByte:
-                       case Byte:
-                       case Int16:
-                       case UInt16:
-                       case Int32:
-                               int i = v1_ic.ToInt32 (null);
-                               switch (v2_tc) {
-                               case TypeCode.Empty:
-                               case TypeCode.DBNull:
-                                       return EvaluateBitwiseBinary (i, 0, 
operatorTok);
-                                       break;
-                               case Boolean:
-                               case Char:
-                               case SByte:
-                               case Byte:
-                               case Int16:
-                               case UInt16:
-                               case Int32:
-                                       return DoOp (i, v2_ic.ToInt32 (null), 
operatorTok);
-                                       break;
-                               case UInt32:
-                               case Int64:
-                               case UInt64:
-                               case Single:
-                               case Double:
-                                       return DoOp (i, 
(int)(long)v2_ic.ToDouble (null), operatorTok);
-                                       break;
-                               case Object:
-                               case Decimal:
-                               case DateTime:
-                               case String:
-                                       break;
-                               }
-                               break;
-                       case UInt32:
-                       case Int64:
-                       case UInt64:
-                       case Single:
-                       case Double:
-                               i = (int)(long)v1_ic.ToDouble (null);
-                               switch (v2_tc) {
-                               case TypeCode.Empty:
-                               case TypeCode.DBNull:
-                                       return DoOp (i, 0, opertorTok);
-                                       break;
-                               case Boolean:
-                               case Char:
-                               case SByte:
-                               case Byte:
-                               case Int16:
-                               case UInt16:
-                               case Int32:
-                                       return DoOp (i, v2_ic.ToInt32 (null), 
operatorTok);
-                                       break;
-                               case UInt32:
-                               case Int64:
-                               case UInt64:
-                               case Single:
-                               case Double:
-                                       return DoOp (i, 
(int)(long)v2_ic.ToDouble (null));
-                                       break;
-                               case Object:
-                               case Decimal:
-                               case DateTime:
-                               case String:
-                                       break;
-                               }
-                               break;
-                       case Object:
-                       case Decimal:
-                       case DateTime:
-                       case String:
-                               break;
-                       }
-
-                       if (v2 == null)
-                               return DoOp (Convert.ToInt32 (v1), 0, 
operatorTok);
-                       else
-                               return DoOp (Convert.ToInt32 (v1), 
Convert.ToInt32 (v2), operatorTok);
-               }
-
                internal override bool Resolve (IdentificationTable context)
                {
                        throw new NotImplementedException ();
@@ -158,25 +61,5 @@
                {
                        throw new NotImplementedException ();
                }
-
-               internal static object DoOp (int i, int j, JSToken operatorTok)
-               {
-                       switch (operatorTok) {
-                       case JSToken.BitwiseOr:
-                               return i | j;
-                       case JSToken:BitwiseXor:
-                               return i ^ j;
-                       case JSToken.BitwiseAnd:
-                               return i & j;
-                       case JSToken.LeftShift:
-                               return i << j;
-                       case JSToken.RightShift:
-                               return i >> j;
-                       case JSToken.UnsignedRightShift:
-                               return ((uint)i) >> j;
-                       default:
-                               throw new JScriptException 
(JSError.InternalError);
-                       }
-               }
        }
 }

Modified: trunk/mcs/class/Microsoft.JScript/Microsoft.JScript/Convert.cs
===================================================================
--- trunk/mcs/class/Microsoft.JScript/Microsoft.JScript/Convert.cs      
2005-05-25 20:48:48 UTC (rev 45015)
+++ trunk/mcs/class/Microsoft.JScript/Microsoft.JScript/Convert.cs      
2005-05-25 21:05:48 UTC (rev 45016)
@@ -42,6 +42,7 @@
                        throw new NotImplementedException ();
                }
 
+
                public static double CheckIfDoubleIsInteger (double d)
                {
                        if (d == Math.Round (d))
@@ -217,10 +218,5 @@
                        else 
                                return  ic.GetTypeCode ();
                }
-
-               internal static IConvertible GetIConvertible (object obj)
-               {
-                       return obj as IConvertible;
-               }
        }
 }

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to