Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 69 for callExpr (0.21 sec)

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

    	cancelvars := make(map[*types.Var]ast.Node)
    
    	// TODO(adonovan): opt: refactor to make a single pass
    	// over the AST using inspect.WithStack and node types
    	// {FuncDecl,FuncLit,CallExpr,SelectorExpr}.
    
    	// Find the set of cancel vars to analyze.
    	stack := make([]ast.Node, 0, 32)
    	ast.Inspect(node, func(n ast.Node) bool {
    		switch n.(type) {
    		case *ast.FuncLit:
    			if len(stack) > 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 22 19:00:13 UTC 2024
    - 9K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/syntax/positions.go

    			m = n.X
    		case *TypeSwitchGuard:
    			if n.Lhs != nil {
    				m = n.Lhs
    				continue
    			}
    			m = n.X
    		case *Operation:
    			if n.Y != nil {
    				m = n.X
    				continue
    			}
    			return n.Pos()
    		case *CallExpr:
    			m = n.Fun
    		case *ListExpr:
    			if len(n.ElemList) > 0 {
    				m = n.ElemList[0]
    				continue
    			}
    			return n.Pos()
    		// types
    		// case *ArrayType:
    		// case *SliceType:
    		// case *DotsType:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 17:49:19 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. 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)
  6. src/cmd/internal/dwarf/putvarabbrevgen_test.go

    			start = n
    			end = n
    		} else {
    			end.then = n
    			end = n
    		}
    	}
    	for _, stmt := range body {
    		switch stmt := stmt.(type) {
    		case *ast.ExprStmt:
    			if x, _ := stmt.X.(*ast.CallExpr); x != nil {
    				funstr := exprToString(x.Fun)
    				if funstr == "putattr" {
    					form, _ := x.Args[3].(*ast.Ident)
    					if form == nil {
    						t.Fatalf("%s invalid use of putattr", fset.Position(x.Pos()))
    					}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 20:45:07 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/tools/go/cfg/cfg.go

    // do not return, so the builder can remove infeasible graph edges
    // following such calls.  The builder calls mayReturn only for a
    // CallExpr beneath an ExprStmt.
    func New(body *ast.BlockStmt, mayReturn func(*ast.CallExpr) bool) *CFG {
    	b := builder{
    		mayReturn: mayReturn,
    		cfg:       new(CFG),
    	}
    	b.current = b.newBlock(KindBody, body)
    	b.stmt(body)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/types2/return.go

    		return check.isTerminating(s.Stmt, s.Label.Value)
    
    	case *syntax.ExprStmt:
    		// calling the predeclared (possibly parenthesized) panic() function is terminating
    		if call, ok := syntax.Unparen(s.X).(*syntax.CallExpr); ok && check.isPanic[call] {
    			return true
    		}
    
    	case *syntax.ReturnStmt:
    		return true
    
    	case *syntax.BranchStmt:
    		if s.Tok == syntax.Goto || s.Tok == syntax.Fallthrough {
    			return true
    		}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 22 19:32:17 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  9. src/go/types/return.go

    	case *ast.LabeledStmt:
    		return check.isTerminating(s.Stmt, s.Label.Name)
    
    	case *ast.ExprStmt:
    		// calling the predeclared (possibly parenthesized) panic() function is terminating
    		if call, ok := ast.Unparen(s.X).(*ast.CallExpr); ok && check.isPanic[call] {
    			return true
    		}
    
    	case *ast.ReturnStmt:
    		return true
    
    	case *ast.BranchStmt:
    		if s.Tok == token.GOTO || s.Tok == token.FALLTHROUGH {
    			return true
    		}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 22 19:32:17 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/internal/analysisutil/util.go

    // HasSideEffects reports whether evaluation of e has side effects.
    func HasSideEffects(info *types.Info, e ast.Expr) bool {
    	safe := true
    	ast.Inspect(e, func(node ast.Node) bool {
    		switch n := node.(type) {
    		case *ast.CallExpr:
    			typVal := info.Types[n.Fun]
    			switch {
    			case typVal.IsType():
    				// Type conversion, which is safe.
    			case typVal.IsBuiltin():
    				// Builtin func, conservatively assumed to not
    				// be safe for now.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 3.9K bytes
    - Viewed (0)
Back to top