2003-10-07 Miguel de Icaza <miguel@ximian.com>
authorMiguel de Icaza <miguel@gnome.org>
Wed, 8 Oct 2003 00:16:10 +0000 (00:16 -0000)
committerMiguel de Icaza <miguel@gnome.org>
Wed, 8 Oct 2003 00:16:10 +0000 (00:16 -0000)
* expression.cs (Binary.Emit.GreatherThanOrEqual): Fix the code
generation for >=, as spotted by Paolo, bug 48679.
Patch from David Waite.

* cs-tokenizer.cs: Add handling for #pragma.

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

mcs/mcs/ChangeLog
mcs/mcs/cs-tokenizer.cs
mcs/mcs/driver.cs
mcs/mcs/expression.cs

index a8e26661e0c5905f8f6d38e03cf95e85393d818d..11763f930cac9359ee8c5eb6496eaa47f6813e90 100755 (executable)
@@ -1,5 +1,11 @@
 2003-10-07  Miguel de Icaza  <miguel@ximian.com>
 
+       * expression.cs (Binary.Emit.GreatherThanOrEqual): Fix the code
+       generation for >=, as spotted by Paolo, bug 48679.  
+       Patch from David Waite.
+
+       * cs-tokenizer.cs: Add handling for #pragma.
+
        * cs-parser.jay: Allow for both yield and yield return in the
        syntax.  The anti-cobolization of C# fight will go on!
 
index 5e8bae8f32a953e523221ed47a53ccf7751fb9dc..987f7c13333c04c632a66c40ffb0b8e5fe2c22ac 100755 (executable)
@@ -1391,6 +1391,11 @@ namespace Mono.CSharp
                        // The first group of pre-processing instructions is always processed\r
                        //\r
                        switch (cmd){\r
+                       case "pragma":\r
+                               if (RootContext.V2)\r
+                                       return true;\r
+                               break;\r
+                               \r
                        case "line":\r
                                if (!PreProcessLine (arg))\r
                                        Report.Error (\r
index 83e435922d80e29da55699bc5f85b6cfaa7d61a8..f2579859287ac8b0f1f7f9fb9761efc953390f52 100755 (executable)
@@ -215,6 +215,7 @@ namespace Mono.CSharp
                                "   -warnaserror[+|-]  Treat warnings as errors\n" +
                                "   -warn:LEVEL        Sets warning level (the highest is 4, the default)\n" +
                                "   -v                 Verbose parsing (for debugging the parser)\n" +
+                               "   -2                 Enables experimental C# features\n" +
                                "\n" +
                                "Resources:\n" +
                                "   -linkresource:FILE[,ID] Links FILE as a resource\n" +
@@ -1068,6 +1069,7 @@ namespace Mono.CSharp
                                return true;
                                
                        case "/v2":
+                       case "/2":
                                SetupV2 ();
                                return true;
                                
index dd402e0f2d5d85e74583adc2f4965fa6176a9aea..086ff300fbe14b8d9435a79faf3e300f8db586cd 100755 (executable)
@@ -3115,9 +3115,9 @@ namespace Mono.CSharp {
                                else
                                        ig.Emit (OpCodes.Clt);
                                
-                               ig.Emit (OpCodes.Ldc_I4_1);
+                               ig.Emit (OpCodes.Ldc_I4_0);
                                
-                               opcode = OpCodes.Sub;
+                               opcode = OpCodes.Ceq;
                                break;
 
                        case Operator.BitwiseOr: