Example #1
0
 public static void DiffTest(ptr <testing.T> _addr_t, diff.ComputeEdits compute)
 {
     ref testing.T t = ref _addr_t.val;
Example #2
0
 // Shortcircuit finds situations where branch directions
 // are always correlated and rewrites the CFG to take
 // advantage of that fact.
 // This optimization is useful for compiling && and || expressions.
 private static void shortcircuit(ptr <Func> _addr_f)
 {
     ref Func f = ref _addr_f.val;
Example #3
0
 public Iovec(ref ptr <byte> Base = default, uint Len = default)
 {
     this.Base = Base;
     this.Len  = Len;
 }
Example #4
0
 public arrayType(CommonType CommonType = default, typeId Elem = default, long Len = default)
 {
     this.m_CommonTypeRef = new ptr <CommonType>(CommonType);
     this.Elem            = Elem;
     this.Len             = Len;
 }
Example #5
0
 // SetMaxStringLength sets the maximum size of a HeaderField name or
 // value string. If a string exceeds this length (even after any
 // decompression), Write will return ErrStringLength.
 // A value of 0 means unlimited and is the default from NewDecoder.
 private static void SetMaxStringLength(this ptr <Decoder> _addr_d, long n)
 {
     ref Decoder d = ref _addr_d.val;
Example #6
0
 private static token.Pos pos(this ptr <fakeFileSet> _addr_s, @string file, long line, long column)
 {
     ref fakeFileSet s = ref _addr_s.val;
Example #7
0
 public Response(@string ServiceMethod = default, ulong Seq = default, @string Error = default, ref ptr <Response> next = default)
 {
     this.ServiceMethod = ServiceMethod;
     this.Seq           = Seq;
     this.Error         = Error;
     this.next          = next;
 }
Example #8
0
                    // TODO(gri) consider making this part of the parser code

                    // checkBranches checks correct use of labels and branch
                    // statements (break, continue, goto) in a function body.
                    // It catches:
                    //    - misplaced breaks and continues
                    //    - bad labeled breaks and continues
                    //    - invalid, unused, duplicate, and missing labels
                    //    - gotos jumping over variable declarations and into blocks
                    private static void checkBranches(ptr <BlockStmt> _addr_body, ErrorHandler errh)
                    {
                        ref BlockStmt body = ref _addr_body.val;
Example #9
0
 // Accept4 wraps syscall.Accept4.
 private static (long, syscall.Sockaddr, error) Accept4(this ptr <Switch> _addr_sw, long s, long flags) => func((defer, _, __) =>
Example #10
0
 public PtraceIoDesc(int Op = default, ref ptr <byte> Offs = default, ref ptr <byte> Addr = default, ulong Len = default)
 {
     this.Op   = Op;
     this.Offs = Offs;
     this.Addr = Addr;
     this.Len  = Len;
 }
Example #11
0
 public Progs(ref ptr <obj.Prog> Text = default, ref ptr <obj.Prog> next = default, long pc = default, src.XPos pos = default, ref ptr <Node> curfn = default, slice <obj.Prog> progcache = default, long cacheidx = default)
 {
     this.Text      = Text;
     this.next      = next;
     this.pc        = pc;
     this.pos       = pos;
     this.curfn     = curfn;
     this.progcache = progcache;
     this.cacheidx  = cacheidx;
 }
Example #12
0
 public jsonPackage(@string ImportPath = default, @string Dir = default, @string Name = default, @string Export = default, slice <@string> GoFiles = default, slice <@string> CompiledGoFiles = default, slice <@string> CFiles = default, slice <@string> CgoFiles = default, slice <@string> CXXFiles = default, slice <@string> MFiles = default, slice <@string> HFiles = default, slice <@string> FFiles = default, slice <@string> SFiles = default, slice <@string> SwigFiles = default, slice <@string> SwigCXXFiles = default, slice <@string> SysoFiles = default, slice <@string> Imports = default, map <@string, @string> ImportMap = default, slice <@string> Deps = default, ref ptr <Module> Module = default, slice <@string> TestGoFiles = default, slice <@string> TestImports = default, slice <@string> XTestGoFiles = default, slice <@string> XTestImports = default, @string ForTest = default, bool DepOnly = default, ref ptr <jsonPackageError> Error = default)
 {
     this.ImportPath      = ImportPath;
     this.Dir             = Dir;
     this.Name            = Name;
     this.Export          = Export;
     this.GoFiles         = GoFiles;
     this.CompiledGoFiles = CompiledGoFiles;
     this.CFiles          = CFiles;
     this.CgoFiles        = CgoFiles;
     this.CXXFiles        = CXXFiles;
     this.MFiles          = MFiles;
     this.HFiles          = HFiles;
     this.FFiles          = FFiles;
     this.SFiles          = SFiles;
     this.SwigFiles       = SwigFiles;
     this.SwigCXXFiles    = SwigCXXFiles;
     this.SysoFiles       = SysoFiles;
     this.Imports         = Imports;
     this.ImportMap       = ImportMap;
     this.Deps            = Deps;
     this.Module          = Module;
     this.TestGoFiles     = TestGoFiles;
     this.TestImports     = TestImports;
     this.XTestGoFiles    = XTestGoFiles;
     this.XTestImports    = XTestImports;
     this.ForTest         = ForTest;
     this.DepOnly         = DepOnly;
     this.Error           = Error;
 }
Example #13
0
 public Config(ref ptr <token.FileSet> Fset = default, parser.Mode ParserMode = default, types.Config TypeChecker = default, Func <@string, bool> TypeCheckFuncBodies = default, ref ptr <build.Context> Build = default, @string Cwd = default, Func <@string, @string> DisplayPath = default, bool AllowErrors = default, slice <PkgSpec> CreatePkgs = default, map <@string, bool> ImportPkgs = default, Func <ptr <build.Context>, @string, @string, build.ImportMode, (ptr <build.Package>, error)> FindPackage = default, Action <ptr <PackageInfo>, slice <ptr <ast.File> > > AfterTypeCheck = default)
Example #14
0
 // Callee returns the named target of a function call, if any:
 // a function, method, builtin, or variable.
 public static types.Object Callee(ptr <types.Info> _addr_info, ptr <ast.CallExpr> _addr_call)
 {
     ref types.Info   info = ref _addr_info.val;
Example #15
0
                    private static readonly ulong funcValueOffset = (ulong)0x1000UL; // TODO(neelance): make function addresses play nice with heap addresses

                    // TODO(neelance): make function addresses play nice with heap addresses

                    private static void gentext(ptr <ld.Link> _addr_ctxt)
                    {
                        ref ld.Link ctxt = ref _addr_ctxt.val;
Example #16
0
 public label(ref ptr <block> parent = default, ref ptr <LabeledStmt> lstmt = default, bool used = default)
 {
     this.parent = parent;
     this.lstmt  = lstmt;
     this.used   = used;
 }
Example #17
0
 public serverHandshakeState(ref ptr <Conn> c = default, ref ptr <clientHelloMsg> clientHello = default, ref ptr <serverHelloMsg> hello = default, ref ptr <cipherSuite> suite = default, bool ecdheOk = default, bool ecSignOk = default, bool rsaDecryptOk = default, bool rsaSignOk = default, ref ptr <sessionState> sessionState = default, finishedHash finishedHash = default, slice <byte> masterSecret = default, ref ptr <Certificate> cert = default)
 {
     this.c            = c;
     this.clientHello  = clientHello;
     this.hello        = hello;
     this.suite        = suite;
     this.ecdheOk      = ecdheOk;
     this.ecSignOk     = ecSignOk;
     this.rsaDecryptOk = rsaDecryptOk;
     this.rsaSignOk    = rsaSignOk;
     this.sessionState = sessionState;
     this.finishedHash = finishedHash;
     this.masterSecret = masterSecret;
     this.cert         = cert;
 }
Example #18
0
 { // for linkname
     //go:linkname sysctl syscall.sysctl
     private static error sysctl(slice <int> mib, ptr <byte> old, ptr <System.UIntPtr> oldlen, ptr <byte> @new, System.UIntPtr newlen)
     ;
 public unresolvedSymKey(ref ptr <sym.Symbol> from = default, ref ptr <sym.Symbol> to = default)
 {
     this.from = from;
     this.to   = to;
 }
Example #20
0
 public commaListFlag(ref ptr <slice <@string> > vals = default)
 {
     this.vals = vals;
 }
Example #21
0
 private static @string String(this ptr <MethodSet> _addr_s)
 {
     ref MethodSet s = ref _addr_s.val;
Example #22
0
 public Pass(ref ptr <Analyzer> Analyzer = default, ref ptr <token.FileSet> Fset = default, slice <ptr <ast.File> > Files = default, slice <@string> OtherFiles = default, ref ptr <types.Package> Pkg = default, ref ptr <types.Info> TypesInfo = default, types.Sizes TypesSizes = default, Action <Diagnostic> Report = default, Func <types.Object, Fact, bool> ImportObjectFact = default, Func <ptr <types.Package>, Fact, bool> ImportPackageFact = default, Action <types.Object, Fact> ExportObjectFact = default, Action <Fact> ExportPackageFact = default, Func <slice <PackageFact> > AllPackageFacts = default, Func <slice <ObjectFact> > AllObjectFacts = default, slice <types.Error> typeErrors = default)
 {
     this.Analyzer          = Analyzer;
     this.Fset              = Fset;
     this.Files             = Files;
     this.OtherFiles        = OtherFiles;
     this.Pkg               = Pkg;
     this.TypesInfo         = TypesInfo;
     this.TypesSizes        = TypesSizes;
     this.Report            = Report;
     this.ImportObjectFact  = ImportObjectFact;
     this.ImportPackageFact = ImportPackageFact;
     this.ExportObjectFact  = ExportObjectFact;
     this.ExportPackageFact = ExportPackageFact;
     this.AllPackageFacts   = AllPackageFacts;
     this.AllObjectFacts    = AllObjectFacts;
     this.typeErrors        = typeErrors;
 }
Example #23
0
 ref buffer b = ref heap(out ptr <buffer> _addr_b);
Example #24
0
 public arrayType(NilType _)
 {
     this.m_CommonTypeRef = new ptr <CommonType>(new CommonType(nil));
     this.Elem            = default;
     this.Len             = default;
 }
Example #25
0
            // SendFile wraps the sendfile system call.


            // SendFile wraps the sendfile system call.
            public static (long, error) SendFile(ptr <FD> _addr_dstFD, long src, long remain) => func((defer, _, __) =>
Example #26
0
 public importInfo(@string path = default, ref ptr <PackageInfo> info = default, channel <object> complete = default)
 {
     this.path     = path;
     this.info     = info;
     this.complete = complete;
 }
 public __Siginfo(int Signo = default, int Errno = default, int Code = default, int Pid = default, uint Uid = default, int Status = default, ref ptr <byte> Addr = default, array <byte> Value = default, array <byte> _ = default)
 {
     this.Signo  = Signo;
     this.Errno  = Errno;
     this.Code   = Code;
     this.Pid    = Pid;
     this.Uid    = Uid;
     this.Status = Status;
     this.Addr   = Addr;
     this.Value  = Value;
     this._      = _;
 }
 public iimporterAndOffset(ref ptr <iimporter> p = default, ulong off = default)
 {
     this.p   = p;
     this.off = off;
 }
Example #29
0
 public structField(name name = default, ref ptr <rtype> typ = default, System.UIntPtr offsetEmbed = default)
 {
     this.name        = name;
     this.typ         = typ;
     this.offsetEmbed = offsetEmbed;
 }
 public void PtrMoved(int x, int y, ptr val)
 {
     string log = "Auxilary pointer moved";
     Debug.Log(log);
     SendPack(x, y, (int)val, 0);
     receiveToBytes();
 }
Example #31
0
 // Preorder visits all the nodes of the files supplied to New in
 // depth-first order. It calls f(n) for each node n before it visits
 // n's children.
 //
 // The types argument, if non-empty, enables type-based filtering of
 // events. The function f if is called only for nodes whose type
 // matches an element of the types slice.
 private static void Preorder(this ptr <Inspector> _addr_@in, slice <ast.Node> types, Action <ast.Node> f)