Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. src/cmd/compile/internal/types2/util.go

    // hasDots reports whether the last argument in the call is followed by ...
    func hasDots(call *syntax.CallExpr) bool { return call.HasDots }
    
    // dddErrPos returns the node (poser) for reporting an invalid ... use in a call.
    func dddErrPos(call *syntax.CallExpr) *syntax.CallExpr {
    	// TODO(gri) should use "..." instead of call position
    	return call
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  2. 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)
  3. src/go/types/util.go

    func hasDots(call *ast.CallExpr) bool { return call.Ellipsis.IsValid() }
    
    // dddErrPos returns the positioner for reporting an invalid ... use in a call.
    func dddErrPos(call *ast.CallExpr) positioner { return atPos(call.Ellipsis) }
    
    // argErrPos returns positioner for reporting an invalid argument count.
    func argErrPos(call *ast.CallExpr) positioner { return inNode(call, call.Rparen) }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  4. 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)
  5. src/cmd/compile/internal/ssagen/ssa.go

    	case ir.OCALLFUNC:
    		n := n.(*ir.CallExpr)
    		if ir.IsIntrinsicCall(n) {
    			return s.intrinsicCall(n)
    		}
    		fallthrough
    
    	case ir.OCALLINTER:
    		n := n.(*ir.CallExpr)
    		return s.callResult(n, callNormal)
    
    	case ir.OGETG:
    		n := n.(*ir.CallExpr)
    		return s.newValue1(ssa.OpGetG, n.Type(), s.mem())
    
    	case ir.OGETCALLERPC:
    		n := n.(*ir.CallExpr)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 19:44:43 UTC 2024
    - 284.9K bytes
    - Viewed (0)
  6. 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)
  7. 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)
  8. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/stringintconv/string.go

    	return ""
    }
    
    func run(pass *analysis.Pass) (interface{}, error) {
    	inspect := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector)
    	nodeFilter := []ast.Node{
    		(*ast.CallExpr)(nil),
    	}
    	inspect.Preorder(nodeFilter, func(n ast.Node) {
    		call := n.(*ast.CallExpr)
    
    		if len(call.Args) != 1 {
    			return
    		}
    		arg := call.Args[0]
    
    		// Retrieve target type name.
    		var tname *types.TypeName
    		switch fun := call.Fun.(type) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  9. 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)
  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