[sgen] Clear the card table in the finishing pause
[mono.git] / mcs / ilasm / Main.cs
index 19b29aee840989001e86813796bfa72d343e61b5..a7fe5edb1337c64ce5782ebf9a76de01863a0d89 100644 (file)
@@ -8,11 +8,17 @@ public class ILAsmTest {
        private ILAsmTest() {}\r
 \r
 \r
-       public static void Main (string [] args) {\r
-               StreamReader reader = File.OpenText("test.il");\r
+       public static int Main (string [] args) {\r
+\r
+               if (args.Length != 1) {\r
+                       Console.WriteLine ("Usage : ilasm [filename]");\r
+                       return 1;\r
+               }\r
+               \r
+               StreamReader reader = File.OpenText (args [0]);\r
                ILTokenizer scanner = new ILTokenizer (reader);\r
 \r
-               bool testScanner = !true;\r
+               bool testScanner = true;\r
 \r
                if (testScanner) {\r
                        ILToken tok;\r
@@ -20,12 +26,14 @@ public class ILAsmTest {
                                Console.WriteLine (tok);\r
                        }\r
                } else {\r
-                       ILParser parser = new ILParser ();\r
+                       ILParser parser = new ILParser (new CodeGen ());\r
                        parser.yyparse (new ScannerAdapter (scanner), new yydebug.yyDebugSimple ());\r
 \r
                        CodeGen cg = parser.CodeGen;\r
                        int n = cg.ClassCount;\r
                        cg.Emit ();\r
                }\r
+\r
+               return 0;\r
        }\r
 }\r