2004-01-16 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
authorCésar Natarén <cesar@mono-cvs.ximian.com>
Fri, 16 Jan 2004 20:49:47 +0000 (20:49 -0000)
committerCésar Natarén <cesar@mono-cvs.ximian.com>
Fri, 16 Jan 2004 20:49:47 +0000 (20:49 -0000)
* UnaryOp.cs: inherit from Exp now.
* Plus.cs: Don't throw the exception when calling constructor, let
it build the default handler. Return a new object when calling
EvaluatePlus until properly implemented.

* NumericUnary.cs: added new Resolve.
* NumericBinary.cs: assign operator val at ctr. Return a new
object when calling EvaluateNumericBinary until properly
implemented. Added Resolve.
* Equality.cs: added ctr and return false for EvaluateEquality
until properly implemented. Added Resolve's functions.

* Block.cs (Resolve): That check was not necessary.

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

mcs/class/Microsoft.JScript/Microsoft.JScript/ChangeLog
mcs/class/Microsoft.JScript/Microsoft.JScript/Equality.cs
mcs/class/Microsoft.JScript/Microsoft.JScript/NumericBinary.cs
mcs/class/Microsoft.JScript/Microsoft.JScript/NumericUnary.cs
mcs/class/Microsoft.JScript/Microsoft.JScript/Plus.cs
mcs/class/Microsoft.JScript/Microsoft.JScript/UnaryOp.cs

index cb66921c25f68cd18c693a02c255fb2e6d1b15f6..365dd2e5cc00737995dbc6d07d538fafa92b5c53 100644 (file)
@@ -1,5 +1,17 @@
 2004-01-16  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
 
+       * UnaryOp.cs: inherit from Exp now.
+       * Plus.cs: Don't throw the exception when calling constructor, let
+       it build the default handler. Return a new object when calling
+       EvaluatePlus until properly implemented.
+
+       * NumericUnary.cs: added new Resolve.
+       * NumericBinary.cs: assign operator val at ctr. Return a new
+       object when calling EvaluateNumericBinary until properly
+       implemented. Added Resolve.
+       * Equality.cs: added ctr and return false for EvaluateEquality
+       until properly implemented. Added Resolve's functions.
+
        * Block.cs (Resolve): That check was not necessary.
        
        * InstanceOf.cs, PostOrPrefixOperator.cs, Relational.cs,
index ab68669b24837166c7bcc0ed96568c86d56698e3..4917dd15571f2c03b08e16fb897f309d545dc1fb 100644 (file)
@@ -9,6 +9,7 @@
 
 using System;
 using System.Text;
+using System.Reflection.Emit;
 
 namespace Microsoft.JScript {
 
@@ -26,10 +27,14 @@ namespace Microsoft.JScript {
                        throw new NotImplementedException ();
                }
 
+               public Equality (int i)
+               {
+                       current_op = (JSToken) i;
+               }
 
                public bool EvaluateEquality (object v1, object v2)
                {
-                       throw new NotImplementedException ();
+                       return false;
                }
 
 
@@ -55,9 +60,14 @@ namespace Microsoft.JScript {
 
                internal override bool Resolve (IdentificationTable context)
                {
-                       throw new NotImplementedException ();
+                       return true;
                }
 
+               internal override bool Resolve (IdentificationTable context, bool no_effect)
+               {
+                       throw new NotImplementedException ();
+               }              
+
                internal override void Emit (EmitContext ec)
                {
                        throw new NotImplementedException ();
index 7fbac05eed77ae3a73b0f83cf64655fbbd4cd6e5..48c59b265b5c9d14737e15879158b0451cd147d2 100644 (file)
@@ -14,14 +14,13 @@ namespace Microsoft.JScript {
        public sealed class NumericBinary : BinaryOp {
 
                public NumericBinary (int operatorTok)
-               {
-                       throw new NotImplementedException ();
+               {                       
+                       current_op = (JSToken) operatorTok;
                }
 
-
                public object EvaluateNumericBinary (object v1, object v2)
                {
-                       throw new NotImplementedException ();
+                       return new object ();
                }
 
 
@@ -35,6 +34,12 @@ namespace Microsoft.JScript {
                        throw new NotImplementedException ();
                }
 
+               internal override bool Resolve (IdentificationTable context, bool no_effect)
+               {
+                       this.no_effect = no_effect;
+                       return Resolve (context);
+               }
+
                internal override void Emit (EmitContext ec)
                {
                        throw new NotImplementedException ();
index 4bbf721d41edd11bf2d4db2a7a6dc0d1870de545..af7ce80f8c1611c03d545a7f89e5bca542b986c9 100644 (file)
@@ -29,6 +29,11 @@ namespace Microsoft.JScript.Tmp {
                        throw new NotImplementedException ();
                }
 
+               internal override bool Resolve (IdentificationTable context, bool no_effect)
+               {
+                       throw new NotImplementedException ();
+               }
+
                internal override void Emit (EmitContext ec)
                {
                        throw new NotImplementedException ();
index bce947c726e085d97e8cdaf6b3a79c35c492b63b..b33c9f47b9975eecd50b13d56887e4e676f9f05b 100644 (file)
@@ -15,16 +15,13 @@ namespace Microsoft.JScript {
 
                public Plus ()
                {
-                       throw new NotImplementedException ();
                }
 
-
                public  object EvaluatePlus (object v1, object v2)
                {
-                       throw new NotImplementedException ();
+                       return new object ();
                }
 
-
                public static object DoOp (object v1, object v2)
                {
                        throw new NotImplementedException ();
@@ -35,6 +32,11 @@ namespace Microsoft.JScript {
                        throw new NotImplementedException ();
                }
 
+               internal override bool Resolve (IdentificationTable context, bool no_effect)
+               {
+                       throw new NotImplementedException ();
+               }
+
                internal override void Emit (EmitContext ec)
                {
                        throw new NotImplementedException ();
index b29609ebcfbf65c79d661b1f0e3c6e3308f7c7eb..6e55acad30cfca12b6d41b2b4ff1fa17a16bbfba 100644 (file)
@@ -9,9 +9,9 @@
 
 namespace Microsoft.JScript {
 
-       public abstract class UnaryOp : AST {
+       public abstract class UnaryOp : Exp {
 
                internal AST operand;
                internal JSToken oper;
        }
-}
\ No newline at end of file
+}