Exemple #1
0
 public Function(@string name = default, types.Object @object = default, ref ptr <types.Selection> method = default, ref ptr <types.Signature> Signature = default, token.Pos pos = default, @string Synthetic = default, ast.Node syntax = default, ref ptr <Function> parent = default, ref ptr <Package> Pkg = default, ref ptr <Program> Prog = default, slice <ptr <Parameter> > Params = default, slice <ptr <FreeVar> > FreeVars = default, slice <ptr <Alloc> > Locals = default, slice <ptr <BasicBlock> > Blocks = default, ref ptr <BasicBlock> Recover = default, slice <ptr <Function> > AnonFuncs = default, slice <Instruction> referrers = default, ref ptr <BasicBlock> currentBlock = default, map <types.Object, Value> objects = default, slice <ptr <Alloc> > namedResults = default, ref ptr <targets> targets = default, map <ptr <ast.Object>, ptr <lblock> > lblocks = default)
 {
     this.name         = name;
     this.@object      = @object;
     this.method       = method;
     this.Signature    = Signature;
     this.pos          = pos;
     this.Synthetic    = Synthetic;
     this.syntax       = syntax;
     this.parent       = parent;
     this.Pkg          = Pkg;
     this.Prog         = Prog;
     this.Params       = Params;
     this.FreeVars     = FreeVars;
     this.Locals       = Locals;
     this.Blocks       = Blocks;
     this.Recover      = Recover;
     this.AnonFuncs    = AnonFuncs;
     this.referrers    = referrers;
     this.currentBlock = currentBlock;
     this.objects      = objects;
     this.namedResults = namedResults;
     this.targets      = targets;
     this.lblocks      = lblocks;
 }
Exemple #2
0
 public Global(@string name = default, types.Object @object = default, types.Type typ = default, token.Pos pos = default, ref ptr <Package> Pkg = default)
 {
     this.name    = name;
     this.@object = @object;
     this.typ     = typ;
     this.pos     = pos;
     this.Pkg     = Pkg;
 }
Exemple #3
0
 public Parameter(@string name = default, types.Object @object = default, types.Type typ = default, token.Pos pos = default, ref ptr <Function> parent = default, slice <Instruction> referrers = default)
 {
     this.name      = name;
     this.@object   = @object;
     this.typ       = typ;
     this.pos       = pos;
     this.parent    = parent;
     this.referrers = referrers;
 }
 public selectionKey(types.SelectionKind kind = default, types.Type recv = default, types.Object obj = default, @string index = default, bool indirect = default)
 {
     this.kind     = kind;
     this.recv     = recv;
     this.obj      = obj;
     this.index    = index;
     this.indirect = indirect;
 }
Exemple #5
0
 public key(ref ptr <types.Package> pkg = default, types.Object obj = default, reflect.Type t = default)
 {
     this.pkg = pkg;
     this.obj = obj;
     this.t   = t;
 }
 public ObjectFact(types.Object Object = default, Fact Fact = default)
 {
     this.Object = Object;
     this.Fact   = Fact;
 }
Exemple #7
0
                                    private static readonly char opObj    = (char)'O'; // .Obj()        (Named)

                                    // The For function returns the path to an object relative to its package,
                                    // or an error if the object is not accessible from the package's Scope.
                                    //
                                    // The For function guarantees to return a path only for the following objects:
                                    // - package-level types
                                    // - exported package-level non-types
                                    // - methods
                                    // - parameter and result variables
                                    // - struct fields
                                    // These objects are sufficient to define the API of their package.
                                    // The objects described by a package's export data are drawn from this set.
                                    //
                                    // For does not return a path for predeclared names, imported package
                                    // names, local names, and unexported package-level names (except
                                    // types).
                                    //
                                    // Example: given this definition,
                                    //
                                    //    package p
                                    //
                                    //    type T interface {
                                    //        f() (a string, b struct{ X int })
                                    //    }
                                    //
                                    // For(X) would return a path that denotes the following sequence of operations:
                                    //
                                    //    p.Scope().Lookup("T")                (TypeName T)
                                    //    .Type().Underlying().Method(0).            (method Func f)
                                    //    .Type().Results().At(1)                (field Var b)
                                    //    .Type().Field(0)                    (field Var X)
                                    //
                                    // where p is the package (*types.Package) to which X belongs.
                                    public static (Path, error) For(types.Object obj) => func((_, panic, __) =>
Exemple #8
0
 // ImportObjectFact implements analysis.Pass.ImportObjectFact.
 private static bool ImportObjectFact(this ptr <Set> _addr_s, types.Object obj, analysis.Fact ptr) => func((defer, panic, _) =>
 public objectFactKey(types.Object obj = default, reflect.Type typ = default)
 {
     this.obj = obj;
     this.typ = typ;
 }
Exemple #10
0
 public DebugRef(anInstruction anInstruction = default, ast.Expr Expr = default, types.Object @object = default, bool IsAddr = default, Value X = default)
 {
     this.m_anInstructionRef = new ptr <anInstruction>(anInstruction);
     this.Expr    = Expr;
     this.@object = @object;
     this.IsAddr  = IsAddr;
     this.X       = X;
 }