[mini] Always emit safepoints, except WASM
[mono-project.git] / mcs / ilasm / Main.cs
bloba7fe5edb1337c64ce5782ebf9a76de01863a0d89
1 using System;
2 using System.IO;
4 using Mono.ILASM;
7 public class ILAsmTest {
8 private ILAsmTest() {}
11 public static int Main (string [] args) {
13 if (args.Length != 1) {
14 Console.WriteLine ("Usage : ilasm [filename]");
15 return 1;
18 StreamReader reader = File.OpenText (args [0]);
19 ILTokenizer scanner = new ILTokenizer (reader);
21 bool testScanner = true;
23 if (testScanner) {
24 ILToken tok;
25 while ((tok = scanner.NextToken) != ILToken.EOF) {
26 Console.WriteLine (tok);
28 } else {
29 ILParser parser = new ILParser (new CodeGen ());
30 parser.yyparse (new ScannerAdapter (scanner), new yydebug.yyDebugSimple ());
32 CodeGen cg = parser.CodeGen;
33 int n = cg.ClassCount;
34 cg.Emit ();
37 return 0;