Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 94 for decls (0.04 sec)

  1. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/asmdecl/asmdecl.go

    	knownFunc := make(map[string]map[string]*asmFunc)
    
    	for _, f := range pass.Files {
    		for _, decl := range f.Decls {
    			if decl, ok := decl.(*ast.FuncDecl); ok && decl.Body == nil {
    				knownFunc[decl.Name.Name] = asmParseDecl(pass, decl)
    			}
    		}
    	}
    
    Files:
    	for _, fname := range sfiles {
    		content, tf, err := analysisutil.ReadFile(pass, fname)
    		if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 22.8K bytes
    - Viewed (0)
  2. src/go/types/generate_test.go

    		return true
    	})
    }
    
    // insertImportPath inserts the given import path.
    // There must be at least one import declaration present already.
    func insertImportPath(f *ast.File, path string) {
    	for _, d := range f.Decls {
    		if g, _ := d.(*ast.GenDecl); g != nil && g.Tok == token.IMPORT {
    			g.Specs = append(g.Specs, &ast.ImportSpec{Path: &ast.BasicLit{ValuePos: g.End(), Kind: token.STRING, Value: path}})
    			return
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 16.5K bytes
    - Viewed (0)
  3. src/go/types/api_test.go

    	if gm.Name() == "n" {
    		gm, gn = gn, gm
    	}
    
    	// Collect objects from info.
    	var dm, dn *Func   // the declared methods
    	var dmm, dmn *Func // the methods used in the body of m
    	for _, decl := range f.Decls {
    		fdecl, ok := decl.(*ast.FuncDecl)
    		if !ok {
    			continue
    		}
    		def := info.Defs[fdecl.Name].(*Func)
    		switch fdecl.Name.Name {
    		case "m":
    			dm = def
    			ast.Inspect(fdecl.Body, func(n ast.Node) bool {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 94.2K bytes
    - Viewed (0)
  4. src/cmd/go/internal/load/test.go

    		return err
    	}
    	defer src.Close()
    	f, err := parser.ParseFile(testFileSet, filename, src, parser.ParseComments|parser.SkipObjectResolution)
    	if err != nil {
    		return err
    	}
    	for _, d := range f.Decls {
    		n, ok := d.(*ast.FuncDecl)
    		if !ok {
    			continue
    		}
    		if n.Recv != nil {
    			continue
    		}
    		name := n.Name.String()
    		switch {
    		case name == "TestMain":
    			if isTestFunc(n, "T") {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 14:01:23 UTC 2024
    - 28.2K bytes
    - Viewed (0)
  5. src/go/types/issues_test.go

    	f := mustParse(fset, src)
    
    	var conf Config
    	defs := make(map[*ast.Ident]Object)
    	_, err := conf.Check(f.Name.Name, fset, []*ast.File{f}, &Info{Defs: defs})
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	m := f.Decls[0].(*ast.FuncDecl)
    	res1 := defs[m.Name].(*Func).Signature().Results().At(0)
    	res2 := defs[m.Type.Results.List[0].Names[0]].(*Var)
    
    	if res1 != res2 {
    		t.Errorf("got %s (%p) != %s (%p)", res1, res2, res1, res2)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 28.1K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types2/decl.go

    	// in check.decl. Initialization expressions depending on other
    	// consts, vars, or functions, add dependencies to the current
    	// check.decl.
    	switch obj := obj.(type) {
    	case *Const:
    		check.decl = d // new package-level const decl
    		check.constDecl(obj, d.vtyp, d.init, d.inherited)
    	case *Var:
    		check.decl = d // new package-level var decl
    		check.varDecl(obj, d.lhs, d.vtyp, d.init)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 29.6K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/rangefunc/rewrite.go

    }
    
    // useObj returns syntax for a reference to decl, which should be its declaration.
    func (r *rewriter) useObj(obj types2.Object) *syntax.Name {
    	n := syntax.NewName(nopos, obj.Name())
    	tv := syntax.TypeAndValue{Type: obj.Type()}
    	tv.SetIsValue()
    	n.SetTypeInfo(tv)
    	r.info.Uses[n] = obj
    	return n
    }
    
    // useList is useVar for a list of decls.
    func (r *rewriter) useList(vars []types2.Object) syntax.Expr {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:05:44 UTC 2024
    - 41.6K bytes
    - Viewed (0)
  8. src/internal/types/testdata/check/decls0.go

    Robert Griesemer <******@****.***> 1717017554 -0700
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/types2/api_test.go

    	if gm.Name() == "n" {
    		gm, gn = gn, gm
    	}
    
    	// Collect objects from info.
    	var dm, dn *Func   // the declared methods
    	var dmm, dmn *Func // the methods used in the body of m
    	for _, decl := range f.DeclList {
    		fdecl, ok := decl.(*syntax.FuncDecl)
    		if !ok {
    			continue
    		}
    		def := info.Defs[fdecl.Name].(*Func)
    		switch fdecl.Name.Value {
    		case "m":
    			dm = def
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 20:08:23 UTC 2024
    - 93.3K bytes
    - Viewed (0)
  10. subprojects/core/src/main/java/org/gradle/process/internal/CurrentProcess.java

            // TODO(mlopatkin) figure out a nicer way of handling the presence of agent in the foreground daemon.
            //  Currently it is hard to have a proper "-javaagent:/path/to/jar" in clients that start the daemon, so all code deals with a boolean flag shouldApplyAgent instead.
            //  It is also possible to have the agent attached at runtime, without the flag, so flag checking is preferred.
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Jun 11 09:51:15 UTC 2024
    - 2.6K bytes
    - Viewed (0)
Back to top