2007-10-12 Marek Safar <marek.safar@gmail.com>
[mono.git] / mcs / mcs / gen-treedump.cs
old mode 100755 (executable)
new mode 100644 (file)
index a49f10a..a4dbf32
@@ -81,22 +81,22 @@ namespace Generator {
                        int prec = 0;
                        
                        switch (u.Oper){
-                       case Unary.Operator.Add:
+                       case Unary.Operator.UnaryPlus:
                                prec = 10;
                                s = "+";
                                break;
                                
-                       case Unary.Operator.Subtract:
+                       case Unary.Operator.UnaryNegation:
                                prec = 10;
                                s = "-";
                                break;
                                
-                       case Unary.Operator.Negate:
+                       case Unary.Operator.LogicalNot:
                                s = "!";
                                prec = 10;
                                break;
                                
-                       case Unary.Operator.BitComplement:
+                       case Unary.Operator.OnesComplement:
                                prec = 10;
                                s = "~";
                                break;
@@ -158,27 +158,27 @@ namespace Generator {
                                        prec = 9;
                                        op = "*"; break;
 
-                               case Binary.Operator.Divide:
+                               case Binary.Operator.Division:
                                        prec = 9;
                                        op = "/"; break;
                                
-                               case Binary.Operator.Modulo:
+                               case Binary.Operator.Modulus:
                                        prec = 9;
                                        op = "%"; break;
                                
-                               case Binary.Operator.Add:
+                               case Binary.Operator.Addition:
                                        prec = 8;
                                        op = "+"; break;
                                
-                               case Binary.Operator.Subtract:
+                               case Binary.Operator.Subtraction:
                                        prec = 8;
                                        op = "-"; break;
                                
-                               case Binary.Operator.ShiftLeft:
+                               case Binary.Operator.LeftShift:
                                        prec = 7;
                                        op = "<<"; break;
                                
-                               case Binary.Operator.ShiftRight:
+                               case Binary.Operator.RightShift:
                                        prec = 7;
                                        op = ">>"; break;
                                
@@ -190,19 +190,19 @@ namespace Generator {
                                        prec = 6;
                                        op = ">"; break;
                                
-                               case Binary.Operator.LessOrEqual:
+                               case Binary.Operator.LessThanOrEqual:
                                        prec = 6;
                                        op = "<="; break;
                                
-                               case Binary.Operator.GreaterOrEqual:
+                               case Binary.Operator.GreaterThanOrEqual:
                                        prec = 6;
                                        op = ">="; break;
                                
-                               case Binary.Operator.Equal:
+                               case Binary.Operator.Equality:
                                        prec = 5;
                                        op = "=="; break;
                                
-                               case Binary.Operator.NotEqual:
+                               case Binary.Operator.Inequality:
                                        prec = 5;
                                        op = "!="; break;
                                
@@ -263,7 +263,7 @@ namespace Generator {
                                for (int i = 0; i < top; i++){
                                        Argument arg = (Argument) args [i];
                                                
-                                       switch (arg.Type){
+                                       switch (arg.ArgType){
                                                case Argument.AType.Ref:
                                                        r += "ref "; break;
                                                case Argument.AType.Out:
@@ -448,12 +448,12 @@ namespace Generator {
                void GenerateFor (For s)
                {
                        output ("for (");
-                       if (! (s.InitStatement is EmptyStatement))
+                       if (! (s.InitStatement == EmptyStatement.Value))
                                GenerateStatement (s.InitStatement, true, true, true);
                        output ("; ");
                        output (GetExpression (s.Test, 0));
                        output ("; ");
-                       if (! (s.Increment is EmptyStatement))
+                       if (! (s.Increment == EmptyStatement.Value))
                                GenerateStatement (s.Increment, true, true, true);
                        output (") ");
                        GenerateStatement (s.Statement, true, true, false);
@@ -589,7 +589,7 @@ namespace Generator {
                                output_newline ("break;");
                        else if (s is Continue)
                                output_newline ("continue;");
-                       else if (s is EmptyStatement)
+                       else if (s == EmptyStatement.Value)
                                output_newline ("/* empty statement */;");
                        else if (s is Block)
                                GenerateBlock ((Block) s, doPlacement, embedded);
@@ -898,7 +898,7 @@ namespace Generator {
                string ClassName (string name)
                {
                        return name;
-                       //return name.Substring (1 + name.LastIndexOf ("."));
+                       //return name.Substring (1 + name.LastIndexOf ('.'));
                }
 
                string GenBases (ArrayList bases)