Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 106 for callExpr (0.28 sec)

  1. src/cmd/compile/internal/types2/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 *syntax.CallExpr, id builtinId) (_ bool) {
    	argList := call.ArgList
    
    	// 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.1K bytes
    - Viewed (0)
  2. src/cmd/vendor/golang.org/x/tools/go/ast/astutil/rewrite.go

    		a.apply(n, "Low", nil, n.Low)
    		a.apply(n, "High", nil, n.High)
    		a.apply(n, "Max", nil, n.Max)
    
    	case *ast.TypeAssertExpr:
    		a.apply(n, "X", nil, n.X)
    		a.apply(n, "Type", nil, n.Type)
    
    	case *ast.CallExpr:
    		a.apply(n, "Fun", nil, n.Fun)
    		a.applyList(n, "Args")
    
    	case *ast.StarExpr:
    		a.apply(n, "X", nil, n.X)
    
    	case *ast.UnaryExpr:
    		a.apply(n, "X", nil, n.X)
    
    	case *ast.BinaryExpr:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 18 21:28:13 UTC 2023
    - 12.2K bytes
    - Viewed (0)
  3. src/go/types/expr.go

    			goto Error
    		}
    		T := check.varType(e.Type)
    		if !isValid(T) {
    			goto Error
    		}
    		check.typeAssertion(e, x, T, false)
    		x.mode = commaok
    		x.typ = T
    
    	case *ast.CallExpr:
    		return check.callExpr(x, e)
    
    	case *ast.StarExpr:
    		check.exprOrType(x, e.X, false)
    		switch x.mode {
    		case invalid:
    			goto Error
    		case typexpr:
    			check.validVarType(e.X, x.typ)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 02:09:54 UTC 2024
    - 49.7K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/expr.go

    		// x.(type) expressions are handled explicitly in type switches
    		check.error(e, InvalidSyntaxTree, "use of .(type) outside type switch")
    		check.use(e.X)
    		goto Error
    
    	case *syntax.CallExpr:
    		return check.callExpr(x, e)
    
    	case *syntax.ListExpr:
    		// catch-all for unexpected expression lists
    		check.error(e, InvalidSyntaxTree, "unexpected list of expressions")
    		goto Error
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 02:09:54 UTC 2024
    - 51.7K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/syntax/parser.go

    			}
    		case Or:
    			if name, lhs := extractName(x.X, force || isTypeElem(x.Y)); name != nil && lhs != nil {
    				// x = name lhs|x.Y
    				op := *x
    				op.X = lhs
    				return name, &op
    			}
    		}
    	case *CallExpr:
    		if name, _ := x.Fun.(*Name); name != nil {
    			if len(x.ArgList) == 1 && !x.HasDots && (force || isTypeElem(x.ArgList[0])) {
    				// x = name "(" x.ArgList[0] ")"
    				return name, x.ArgList[0]
    			}
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 62.9K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/ir/func.go

    	fn.Nname.Defn = fn
    	pkg.Funcs = append(pkg.Funcs, fn)
    
    	return fn
    }
    
    // IsFuncPCIntrinsic returns whether n is a direct call of internal/abi.FuncPCABIxxx functions.
    func IsFuncPCIntrinsic(n *CallExpr) bool {
    	if n.Op() != OCALLFUNC || n.Fun.Op() != ONAME {
    		return false
    	}
    	fn := n.Fun.(*Name).Sym()
    	return (fn.Name == "FuncPCABI0" || fn.Name == "FuncPCABIInternal") &&
    		fn.Pkg.Path == "internal/abi"
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:05:44 UTC 2024
    - 21.1K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/walk/range.go

    	}
    
    	if len(n.Body) != 1 {
    		return false
    	}
    
    	stmt := n.Body[0] // only stmt in body
    	if stmt == nil || stmt.Op() != ir.ODELETE {
    		return false
    	}
    
    	m := n.X
    	if delete := stmt.(*ir.CallExpr); !ir.SameSafeExpr(delete.Args[0], m) || !ir.SameSafeExpr(delete.Args[1], k) {
    		return false
    	}
    
    	// Keys where equality is not reflexive can not be deleted from maps.
    	if !types.IsReflexive(t.Key()) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 20 14:52:33 UTC 2023
    - 17.6K bytes
    - Viewed (0)
  8. src/go/printer/printer_test.go

    // ParenExpr, is correctly formatted with parens.
    // Test case for issue #63362.
    func TestChanType(t *testing.T) {
    	expr := &ast.UnaryExpr{
    		Op: token.ARROW,
    		X: &ast.CallExpr{
    			Fun: &ast.ChanType{
    				Dir:   ast.RECV,
    				Value: &ast.Ident{Name: "int"},
    			},
    			Args: []ast.Expr{&ast.Ident{Name: "nil"}},
    		},
    	}
    	var buf bytes.Buffer
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 03 14:56:25 UTC 2024
    - 20.4K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/inline/inlheur/scoring.go

    	for k := range scoreCallsCache.tab {
    		delete(scoreCallsCache.tab, k)
    	}
    }
    
    // GetCallSiteScore returns the previously calculated score for call
    // within fn.
    func GetCallSiteScore(fn *ir.Func, call *ir.CallExpr) (int, bool) {
    	if funcInlHeur, ok := fpmap[fn]; ok {
    		if cs, ok := funcInlHeur.cstab[call]; ok {
    			return cs.Score, true
    		}
    	}
    	if cs, ok := callSiteTab[call]; ok {
    		return cs.Score, true
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 27 20:42:52 UTC 2024
    - 24.2K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/types2/api_test.go

    	}
    	conf.Check("p", []*syntax.File{f}, info) // ignore result
    	for e, tv := range info.Types {
    		if _, ok := e.(*syntax.CallExpr); ok {
    			if tv.Type != Typ[Int16] {
    				t.Errorf("CallExpr has type %v, want int16", tv.Type)
    			}
    			return
    		}
    	}
    	t.Errorf("CallExpr has no type")
    }
    
    // TestCompositeLitTypes verifies that Info.Types registers the correct
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 20:08:23 UTC 2024
    - 93.3K bytes
    - Viewed (0)
Back to top