Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 51 for callExpr (0.2 sec)

  1. src/go/types/generate_test.go

    func fixAtPosCall(f *ast.File) {
    	ast.Inspect(f, func(n ast.Node) bool {
    		switch n := n.(type) {
    		case *ast.CallExpr:
    			if selx, _ := n.Fun.(*ast.SelectorExpr); selx != nil && selx.Sel.Name == "dump" {
    				for i, arg := range n.Args {
    					if call, _ := arg.(*ast.CallExpr); call != nil {
    						// rewrite xxx.dump(..., atPos(x), ...) to xxx.dump(..., x.Pos(), ...)
    						if isIdent(call.Fun, "atPos") {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 16.5K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/walk/walk.go

    		base.Fatalf("vmkcall %v needs %v args got %v", fn, n, len(va))
    	}
    
    	call := typecheck.Call(base.Pos, fn, va, false).(*ir.CallExpr)
    	call.SetType(t)
    	return walkExpr(call, init).(*ir.CallExpr)
    }
    
    func mkcall(name string, t *types.Type, init *ir.Nodes, args ...ir.Node) *ir.CallExpr {
    	return vmkcall(typecheck.LookupRuntime(name), t, init, args)
    }
    
    func mkcallstmt(name string, args ...ir.Node) ir.Node {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 27 20:56:00 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  3. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/copylock/copylock.go

    	x = astutil.Unparen(x) // ignore parens on rhs
    
    	if _, ok := x.(*ast.CompositeLit); ok {
    		return nil
    	}
    	if _, ok := x.(*ast.CallExpr); ok {
    		// A call may return a zero value.
    		return nil
    	}
    	if star, ok := x.(*ast.StarExpr); ok {
    		if _, ok := astutil.Unparen(star.X).(*ast.CallExpr); ok {
    			// A call may return a pointer to a zero value.
    			return nil
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/typecheck/typecheck.go

    		return tcClose(n)
    
    	case ir.ODELETE:
    		n := n.(*ir.CallExpr)
    		return tcDelete(n)
    
    	case ir.OAPPEND:
    		n := n.(*ir.CallExpr)
    		return tcAppend(n)
    
    	case ir.OCOPY:
    		n := n.(*ir.BinaryExpr)
    		return tcCopy(n)
    
    	case ir.OCONV:
    		n := n.(*ir.ConvExpr)
    		return tcConv(n)
    
    	case ir.OMAKE:
    		n := n.(*ir.CallExpr)
    		return tcMake(n)
    
    	case ir.ONEW:
    		n := n.(*ir.UnaryExpr)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 20 19:08:34 UTC 2024
    - 30.5K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/typecheck/stmt.go

    // into:
    //
    //	x1, y1 := x, y          // added to init
    //	func() { f(x1, y1) }()  // result
    func normalizeGoDeferCall(pos src.XPos, op ir.Op, call ir.Node, init *ir.Nodes) *ir.CallExpr {
    	init.Append(ir.TakeInit(call)...)
    
    	if call, ok := call.(*ir.CallExpr); ok && call.Op() == ir.OCALLFUNC {
    		if sig := call.Fun.Type(); sig.NumParams()+sig.NumResults() == 0 {
    			return call // already in normal form
    		}
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 20 15:10:54 UTC 2023
    - 17.8K bytes
    - Viewed (0)
  6. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/loopclosure/loopclosure.go

    			case *ast.GoStmt:
    				stmts = litStmts(s.Call.Fun)
    			case *ast.DeferStmt:
    				stmts = litStmts(s.Call.Fun)
    			case *ast.ExprStmt: // check for errgroup.Group.Go
    				if call, ok := s.X.(*ast.CallExpr); ok {
    					stmts = litStmts(goInvoke(pass.TypesInfo, call))
    				}
    			}
    			for _, stmt := range stmts {
    				reportCaptured(pass, vars, stmt)
    			}
    		})
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/printf/printf.go

    func checkCall(pass *analysis.Pass) {
    	inspect := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector)
    	nodeFilter := []ast.Node{
    		(*ast.CallExpr)(nil),
    	}
    	inspect.Preorder(nodeFilter, func(n ast.Node) {
    		call := n.(*ast.CallExpr)
    		fn, kind := printfNameAndKind(pass, call)
    		switch kind {
    		case KindPrintf, KindErrorf:
    			checkPrintf(pass, kind, call, fn)
    		case KindPrint:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 32.5K bytes
    - Viewed (0)
  8. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/tests/tests.go

    }
    
    // isFuzzTargetDotFuzz reports whether call is (*testing.F).Fuzz().
    func isFuzzTargetDotFuzz(pass *analysis.Pass, call *ast.CallExpr) bool {
    	return isFuzzTargetDot(pass, call, "Fuzz")
    }
    
    // isFuzzTargetDotAdd reports whether call is (*testing.F).Add().
    func isFuzzTargetDotAdd(pass *analysis.Pass, call *ast.CallExpr) bool {
    	return isFuzzTargetDot(pass, call, "Add")
    }
    
    // isFuzzTargetDot reports whether call is (*testing.F).<name>().
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 14.4K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/walk/assign.go

    		left, right = n.X, n.Y
    	}
    
    	// Recognize m[k] = append(m[k], ...) so we can reuse
    	// the mapassign call.
    	var mapAppend *ir.CallExpr
    	if left.Op() == ir.OINDEXMAP && right.Op() == ir.OAPPEND {
    		left := left.(*ir.IndexExpr)
    		mapAppend = right.(*ir.CallExpr)
    		if !ir.SameSafeExpr(left, mapAppend.Args[0]) {
    			base.Fatalf("not same expressions: %v != %v", left, mapAppend.Args[0])
    		}
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:09:06 UTC 2024
    - 20.3K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/typecheck/func.go

    	}
    	return n
    }
    
    // FixVariadicCall rewrites calls to variadic functions to use an
    // explicit ... argument if one is not already present.
    func FixVariadicCall(call *ir.CallExpr) {
    	fntype := call.Fun.Type()
    	if !fntype.IsVariadic() || call.IsDDD {
    		return
    	}
    
    	vi := fntype.NumParams() - 1
    	vt := fntype.Param(vi).Type
    
    	args := call.Args
    	extra := args[vi:]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 06 15:23:18 UTC 2024
    - 21.1K bytes
    - Viewed (0)
Back to top