* ILParser.jay: Add labels to methods, add branching instructions.
authorJackson Harper <jackson@novell.com>
Tue, 6 May 2003 07:19:02 +0000 (07:19 -0000)
committerJackson Harper <jackson@novell.com>
Tue, 6 May 2003 07:19:02 +0000 (07:19 -0000)
svn path=/trunk/mcs/; revision=14321

mcs/ilasm/parser/ChangeLog
mcs/ilasm/parser/ILParser.jay

index ec2725341b2511a591d9c4f0f4f429085d628f32..e53a1623e8178b04c57e3bf1a14dd8c3b6a10c59 100644 (file)
@@ -1,3 +1,7 @@
+2003-05-05 Jackson Harper <jackson@latitudegeo.com>
+
+       * ILParser.jay: Add labels to methods, add branching instructions.
+               
 2003-05-04 Jackson Harper <jackson@latitudegeo.com>
 
        * ILParser.jay: Use new MiscInstr.ldstr for ldstr, add INSTR_Rs
index 8101c1f87dca666a71f442ad0d3c4aac8c94453c..0d03aea807f0e4f2582a4084060bff8114b484da 100644 (file)
@@ -1450,6 +1450,9 @@ method_decl               : D_EMITBYTE int32
                        | scope_block\r
                        | D_PARAM OPEN_BRACKET int32 CLOSE_BRACKET init_opt\r
                        | id COLON\r
+                          {\r
+                                codegen.CurrentMethodDef.AddLabel ((string) $1);\r
+                          }\r
                        | seh_block\r
                        | instr\r
                        | sec_decl\r
@@ -1510,7 +1513,7 @@ instr                     : INSTR_NONE
                        | INSTR_I id /* Allow variable names */\r
                        | INSTR_I8 int64\r
                           {\r
-                                Console.WriteLine ($1);\r
+                                \r
                           }\r
                        | INSTR_R float64\r
                           {\r
@@ -1531,8 +1534,18 @@ instr                    : INSTR_NONE
                           }\r
                        | INSTR_R OPEN_PARENS bytes CLOSE_PARENS\r
                        | INSTR_BRTARGET int32\r
+                          {\r
+                                \r
+                          }\r
                        | INSTR_BRTARGET id\r
+                          {\r
+                                codegen.CurrentMethodDef.AddInstr (new BranchInstr ((BranchOp) $1,\r
+                                        codegen.CurrentMethodDef, (string) $2));\r
+                          }\r
                        | INSTR_METHOD method_ref\r
+                          {\r
+                                \r
+                          }\r
                        | INSTR_FIELD type type_spec DOUBLE_COLON id\r
                        | INSTR_FIELD type id\r
                        | INSTR_TYPE type_spec\r