2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
* SwitchInstr.cs (Emit): Switch from using strings
to LabelInfo.
In parser:
2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
* ILParser.jay: Create LabelInfo instances for switch labels,
this allows the code generator to spot invalid labels.
Fixes #350480.
svn path=/trunk/mcs/; revision=92061
+2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
+
+ * SwitchInstr.cs (Emit): Switch from using strings
+ to LabelInfo.
+
2007-10-09 Rodrigo Kumpera <rkumpera@novell.com>
* MethodPointerTypeRef.cs (.ctor): generate
if (label_list != null) {
label_array = new PEAPI.CILLabel[label_list.Count];
foreach (object lab in label_list) {
- if (lab is string) {
- label_array[count++] = meth.GetLabelDef ((string) lab);
+ if (lab is LabelInfo) {
+ label_array[count++] = ((LabelInfo)lab).Label;
} else {
throw new InternalErrorException ("offsets in switch statements.");
}
-2006-06-05 Rodrigo Kumpera <kumpera@gmail.com>
+2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
+
+ * ILParser.jay: Create LabelInfo instances for switch labels,
+ this allows the code generator to spot invalid labels.
+ Fixes #350480.
+
+2007-06-05 Rodrigo Kumpera <kumpera@gmail.com>
* ILParser.jay: Support for variance related generic modifiers <+T> and <-T>
| id\r
{\r
ArrayList label_list = new ArrayList ();\r
- label_list.Add ($1);\r
+ label_list.Add (codegen.CurrentMethodDef.AddLabelRef ((string) $1));\r
$$ = label_list;\r
}\r
| int32\r
| labels COMMA id\r
{\r
ArrayList label_list = (ArrayList) $1;\r
- label_list.Add ($3);\r
+ label_list.Add (codegen.CurrentMethodDef.AddLabelRef ((string) $3));\r
}\r
| labels COMMA int32\r
{\r