// // It's supposed to be used by method body implementation of anonymous methods // protected ParametersBlock(ParametersBlock source, ParametersCompiled parameters) : base(null, 0, source.StartLocation, source.EndLocation) { this.parameters = parameters; this.statements = source.statements; this.reachable = source.reachable; this.flags = source.flags & Flags.ReachableEnd; ParametersBlock = this; // // Overwrite original for comparison purposes when linking cross references // between anonymous methods // Original = source.Original; }
public Block(Block parent, Flags flags, Location start, Location end) { if (parent != null) { // the appropriate constructors will fixup these fields ParametersBlock = parent.ParametersBlock; Explicit = parent.Explicit; } this.Parent = parent; this.flags = flags; this.StartLocation = start; this.EndLocation = end; this.loc = start; statements = new List <Statement>(4); this.original = this; }
// // Recreates a top level block from parameters block. Used for // compiler generated methods where the original block comes from // explicit child block. This works for already resolved blocks // only to ensure we resolve them in the correct flow order // public ToplevelBlock(ParametersBlock source, ParametersCompiled parameters) : base(source, parameters) { this.compiler = source.TopBlock.compiler; top_block = this; }