+2003-11-18 Jackson Harper <jackson@ximian.com>
+
+ * MethodDef.cs: Add support for .zeroinit. This is just another
+ way of initializing locals.
+
2003-11-17 Jackson Harper <jackson@ximian.com>
* LdstrInstr.cs: Allow strings to be created as bytearrays.
private ArrayList label_list;
private PEAPI.MethodDef methoddef;
private bool entry_point;
+ private bool zero_init;
private bool is_resolved;
private bool is_defined;
private ArrayList local_list;
named_param_table = new Hashtable ();
entry_point = false;
+ zero_init = false;
init_locals = false;
max_stack = -1;
pinvoke_info = false;
entry_point = true;
}
+ public void ZeroInit ()
+ {
+ zero_init = true;
+ }
+
public void SetMaxStack (int max_stack)
{
this.max_stack = max_stack;
if (code_gen.Report.ErrorCount > ec)
return;
+ if (zero_init)
+ init_locals = true;
+
methoddef.AddLocals (local_array, init_locals);
}