Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 21 for callExpr (0.17 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/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)
  3. 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)
  4. 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)
  5. src/cmd/compile/internal/types2/issues_test.go

    		types := make(map[syntax.Expr]TypeAndValue)
    		mustTypecheck(src, nil, &Info{Types: types})
    
    		var n int
    		for x, tv := range types {
    			if x, _ := x.(*syntax.CallExpr); x != nil {
    				// there must be exactly one CallExpr which is the P(val) conversion
    				n++
    				tpar, _ := tv.Type.(*TypeParam)
    				if tpar == nil {
    					t.Fatalf("%s: got type %s, want type parameter", ExprString(x), tv.Type)
    				}
    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/go/types/issues_test.go

    		types := make(map[ast.Expr]TypeAndValue)
    		mustTypecheck(src, nil, &Info{Types: types})
    
    		var n int
    		for x, tv := range types {
    			if x, _ := x.(*ast.CallExpr); x != nil {
    				// there must be exactly one CallExpr which is the P(val) conversion
    				n++
    				tpar, _ := tv.Type.(*TypeParam)
    				if tpar == nil {
    					t.Fatalf("%s: got type %s, want type parameter", ExprString(x), tv.Type)
    				}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 28.1K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/types2/call.go

    		} else {
    			check.mono.recordInstance(check.pkg, pos, tparams, targs, xlist)
    		}
    	}).describef(pos, "verify instantiation")
    
    	return inst
    }
    
    func (check *Checker) callExpr(x *operand, call *syntax.CallExpr) exprKind {
    	var inst *syntax.IndexExpr // function instantiation, if any
    	if iexpr, _ := call.Fun.(*syntax.IndexExpr); iexpr != nil {
    		if check.indexExpr(x, iexpr) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 31.5K bytes
    - Viewed (0)
  8. src/go/types/call.go

    		} else {
    			check.mono.recordInstance(check.pkg, pos, tparams, targs, xlist)
    		}
    	}).describef(atPos(pos), "verify instantiation")
    
    	return inst
    }
    
    func (check *Checker) callExpr(x *operand, call *ast.CallExpr) exprKind {
    	ix := typeparams.UnpackIndexExpr(call.Fun)
    	if ix != nil {
    		if check.indexExpr(x, ix) {
    			// Delay function instantiation to argument checking,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 33.5K bytes
    - Viewed (0)
  9. src/go/types/builtins.go

    // reports whether the call is valid, with *x holding the result;
    // but x.expr is not set. If the call is invalid, the result is
    // false, and *x is undefined.
    func (check *Checker) builtin(x *operand, call *ast.CallExpr, id builtinId) (_ bool) {
    	argList := call.Args
    
    	// append is the only built-in that permits the use of ... for the last argument
    	bin := predeclaredFuncs[id]
    	if hasDots(call) && id != _Append {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 27.2K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/rangefunc/rewrite.go

    func (r *rewriter) editDefer(x *syntax.CallStmt) syntax.Stmt {
    	if r.defers == nil {
    		// Declare and initialize the #defers token.
    		init := &syntax.CallExpr{
    			Fun: runtimeSym(r.info, "deferrangefunc"),
    		}
    		tv := syntax.TypeAndValue{Type: r.any.Type()}
    		tv.SetIsValue()
    		init.SetTypeInfo(tv)
    		r.defers = r.declVar("#defers", r.any.Type(), init)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:05:44 UTC 2024
    - 41.6K bytes
    - Viewed (0)
Back to top