- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 18 for CallExpr (0.12 sec)
-
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) -
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) -
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/cmd/compile/internal/types2/call.go
} else { check.mono.recordInstance(check.pkg, pos, tparams, targs, xlist) } }).describef(pos, "verify instantiation") return inst } func (check *Checker) callExpr(x *operand, call *syntax.CallExpr) exprKind { var inst *syntax.IndexExpr // function instantiation, if any if iexpr, _ := call.Fun.(*syntax.IndexExpr); iexpr != nil { if check.indexExpr(x, iexpr) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 31.5K bytes - Viewed (0) -
src/go/types/call.go
} else { check.mono.recordInstance(check.pkg, pos, tparams, targs, xlist) } }).describef(atPos(pos), "verify instantiation") return inst } func (check *Checker) callExpr(x *operand, call *ast.CallExpr) exprKind { ix := typeparams.UnpackIndexExpr(call.Fun) if ix != nil { if check.indexExpr(x, ix) { // Delay function instantiation to argument checking,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 33.5K bytes - Viewed (0) -
src/go/types/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 *ast.CallExpr, id builtinId) (_ bool) { argList := call.Args // 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.2K bytes - Viewed (0) -
src/cmd/compile/internal/rangefunc/rewrite.go
func (r *rewriter) editDefer(x *syntax.CallStmt) syntax.Stmt { if r.defers == nil { // Declare and initialize the #defers token. init := &syntax.CallExpr{ Fun: runtimeSym(r.info, "deferrangefunc"), } tv := syntax.TypeAndValue{Type: r.any.Type()} tv.SetIsValue() init.SetTypeInfo(tv) r.defers = r.declVar("#defers", r.any.Type(), init) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:05:44 UTC 2024 - 41.6K bytes - Viewed (0) -
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) -
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)