- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 106 for callExpr (0.16 sec)
-
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) -
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) -
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) -
src/cmd/compile/internal/ssagen/nowb.go
} ir.Visit(n, c.findExtraCalls) } c.curfn = nil return c } func (c *nowritebarrierrecChecker) findExtraCalls(nn ir.Node) { if nn.Op() != ir.OCALLFUNC { return } n := nn.(*ir.CallExpr) if n.Fun == nil || n.Fun.Op() != ir.ONAME { return } fn := n.Fun.(*ir.Name) if fn.Class != ir.PFUNC || fn.Defn == nil { return } if types.RuntimeSymName(fn.Sym()) != "systemstack" { return }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 17:29:46 UTC 2024 - 5.9K bytes - Viewed (0) -
src/cmd/gofmt/simplify.go
if n.Max != nil { // - 3-index slices always require the 2nd and 3rd index break } if s, _ := n.X.(*ast.Ident); s != nil { // the array/slice object is a single identifier if call, _ := n.High.(*ast.CallExpr); call != nil && len(call.Args) == 1 && !call.Ellipsis.IsValid() { // the high expression is a function call with a single argument if fun, _ := call.Fun.(*ast.Ident); fun != nil && fun.Name == "len" {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 19 20:06:14 UTC 2022 - 4.8K bytes - Viewed (0) -
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) -
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) -
src/go/ast/example_test.go
// 24 . . . Body: *ast.BlockStmt { // 25 . . . . Lbrace: 3:13 // 26 . . . . List: []ast.Stmt (len = 1) { // 27 . . . . . 0: *ast.ExprStmt { // 28 . . . . . . X: *ast.CallExpr { // 29 . . . . . . . Fun: *ast.Ident { // 30 . . . . . . . . NamePos: 4:2 // 31 . . . . . . . . Name: "println" // 32 . . . . . . . }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 21:44:50 UTC 2024 - 6.1K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go
children = append(children, tok(n.Lbrace, len("{")), tok(n.Rbrace, len("}"))) case *ast.BranchStmt: children = append(children, tok(n.TokPos, len(n.Tok.String()))) case *ast.CallExpr: children = append(children, tok(n.Lparen, len("(")), tok(n.Rparen, len(")"))) if n.Ellipsis != 0 { children = append(children, tok(n.Ellipsis, len("..."))) } case *ast.CaseClause:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 18 21:28:13 UTC 2023 - 15.9K bytes - Viewed (0) -
src/cmd/compile/internal/walk/closure.go
// func(a int) { // println(byval) // byref++ // }(42) // // becomes: // // func(byval int, &byref *int, a int) { // println(byval) // (*&byref)++ // }(byval, &byref, 42) func directClosureCall(n *ir.CallExpr) { clo := n.Fun.(*ir.ClosureExpr) clofn := clo.Func if ir.IsTrivialClosure(clo) { return // leave for walkClosure to handle } // We are going to insert captured variables before input args.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Nov 20 15:56:08 UTC 2023 - 6.5K bytes - Viewed (0)