// <summary> // This is used by non-static `struct' constructors which do not have an // initializer - in this case, the constructor must initialize all of the // struct's fields. To do this, we add a "this" variable and use the flow // analysis code to ensure that it's been fully initialized before control // leaves the constructor. // </summary> public LocalVariable AddThisVariable (BlockContext bc, TypeContainer ds, Location l) { if (this_variable == null) { this_variable = new LocalVariable (this, "this", LocalVariable.Flags.IsThis | LocalVariable.Flags.Used, l); this_variable.Type = ds.CurrentType; this_variable.PrepareForFlowAnalysis (bc); } return this_variable; }