Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 51 for callExpr (0.17 sec)

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

    func cgoBaseType(info *types.Info, arg ast.Expr) types.Type {
    	switch arg := arg.(type) {
    	case *ast.CallExpr:
    		if len(arg.Args) == 1 && isUnsafePointer(info, arg.Fun) {
    			return cgoBaseType(info, arg.Args[0])
    		}
    	case *ast.StarExpr:
    		call, ok := arg.X.(*ast.CallExpr)
    		if !ok || len(call.Args) != 1 {
    			break
    		}
    		// Here arg is *f(v).
    		t := info.Types[call.Fun].Type
    		if t == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 11.2K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/walk/expr.go

    	case ir.OPRINT, ir.OPRINTLN:
    		return walkPrint(n.(*ir.CallExpr), init)
    
    	case ir.OPANIC:
    		n := n.(*ir.UnaryExpr)
    		return mkcall("gopanic", nil, init, n.X)
    
    	case ir.ORECOVERFP:
    		return walkRecoverFP(n.(*ir.CallExpr), init)
    
    	case ir.OCFUNC:
    		return n
    
    	case ir.OCALLINTER, ir.OCALLFUNC:
    		n := n.(*ir.CallExpr)
    		return walkCall(n, init)
    
    	case ir.OAS, ir.OASOP:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:01 UTC 2024
    - 27.6K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/walk/order.go

    		case *ir.BinaryExpr:
    			n.X = o.expr(n.X, nil)
    			n.Y = o.expr(n.Y, nil)
    		case *ir.MakeExpr:
    			n.Len = o.expr(n.Len, nil)
    			n.Cap = o.expr(n.Cap, nil)
    		case *ir.CallExpr:
    			o.exprList(n.Args)
    		}
    		return
    	}
    
    	n := nn.(*ir.CallExpr)
    	typecheck.AssertFixedCall(n)
    
    	if ir.IsFuncPCIntrinsic(n) && ir.IsIfaceOfFunc(n.Args[0]) != nil {
    		// For internal/abi.FuncPCABIxxx(fn), if fn is a defined function,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 02:00:33 UTC 2024
    - 42.7K bytes
    - Viewed (0)
  4. src/go/ast/ast.go

    		Lparen token.Pos // position of "("
    		Type   Expr      // asserted type; nil means type switch X.(type)
    		Rparen token.Pos // position of ")"
    	}
    
    	// A CallExpr node represents an expression followed by an argument list.
    	CallExpr struct {
    		Fun      Expr      // function expression
    		Lparen   token.Pos // position of "("
    		Args     []Expr    // function arguments; or nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 28 21:32:41 UTC 2024
    - 35.6K bytes
    - Viewed (0)
  5. src/cmd/cgo/ast.go

    func (f *File) saveExprs(x interface{}, context astContext) {
    	switch x := x.(type) {
    	case *ast.Expr:
    		switch (*x).(type) {
    		case *ast.SelectorExpr:
    			f.saveRef(x, context)
    		}
    	case *ast.CallExpr:
    		f.saveCall(x, context)
    	}
    }
    
    // Save references to C.xxx for later processing.
    func (f *File) saveRef(n *ast.Expr, context astContext) {
    	sel := (*n).(*ast.SelectorExpr)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 07 16:54:27 UTC 2023
    - 14.3K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/walk/builtin.go

    		}
    		return stackTempAddr(init, t)
    	}
    	types.CalcSize(t)
    	n.MarkNonNil()
    	return n
    }
    
    func walkMinMax(n *ir.CallExpr, init *ir.Nodes) ir.Node {
    	init.Append(ir.TakeInit(n)...)
    	walkExprList(n.Args, init)
    	return n
    }
    
    // generate code for print.
    func walkPrint(nn *ir.CallExpr, init *ir.Nodes) ir.Node {
    	// Hoist all the argument evaluation up before the lock.
    	walkExprListCheap(nn.Args, init)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 22:35:22 UTC 2024
    - 31.2K bytes
    - Viewed (0)
  7. src/go/types/assignments.go

    }
    
    func (check *Checker) assignError(rhs []ast.Expr, l, r int) {
    	vars := measure(l, "variable")
    	vals := measure(r, "value")
    	rhs0 := rhs[0]
    
    	if len(rhs) == 1 {
    		if call, _ := ast.Unparen(rhs0).(*ast.CallExpr); call != nil {
    			check.errorf(rhs0, WrongAssignCount, "assignment mismatch: %s but %s returns %s", vars, call.Fun, vals)
    			return
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 16.4K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/types2/assignments.go

    func (check *Checker) assignError(rhs []syntax.Expr, l, r int) {
    	vars := measure(l, "variable")
    	vals := measure(r, "value")
    	rhs0 := rhs[0]
    
    	if len(rhs) == 1 {
    		if call, _ := syntax.Unparen(rhs0).(*syntax.CallExpr); call != nil {
    			check.errorf(rhs0, WrongAssignCount, "assignment mismatch: %s but %s returns %s", vars, call.Fun, vals)
    			return
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 23 21:21:43 UTC 2024
    - 16.4K bytes
    - Viewed (0)
  9. src/cmd/vendor/golang.org/x/tools/go/cfg/builder.go

    package cfg
    
    // This file implements the CFG construction pass.
    
    import (
    	"fmt"
    	"go/ast"
    	"go/token"
    )
    
    type builder struct {
    	cfg       *CFG
    	mayReturn func(*ast.CallExpr) bool
    	current   *Block
    	lblocks   map[string]*lblock // labeled blocks
    	targets   *targets           // linked stack of branch targets
    }
    
    func (b *builder) stmt(_s ast.Stmt) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 11.4K bytes
    - Viewed (0)
  10. 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)
Back to top