コード例 #1
0
ファイル: ParametersBlock.cs プロジェクト: Arsslensoft/VSharp
 //
 // 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;
 }
コード例 #2
0
        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;
        }
コード例 #3
0
ファイル: ToplevelBlock.cs プロジェクト: Arsslensoft/VSharp
 //
 // 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;
 }