- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 26 for Recv (0.05 sec)
-
src/cmd/compile/internal/types2/selection.go
func (s *Selection) Type() Type { switch s.kind { case MethodVal: // The type of x.f is a method with its receiver type set // to the type of x. sig := *s.obj.(*Func).typ.(*Signature) recv := *sig.recv recv.typ = s.recv sig.recv = &recv return &sig case MethodExpr: // The type of x.f is a function (without receiver) // and an additional first argument with the same type as x.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 22 19:32:17 UTC 2024 - 5.8K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/typecheck.go
// expression "recv.sym". func NewMethodExpr(pos src.XPos, recv *types.Type, sym *types.Sym) *ir.SelectorExpr { // Compute the method set for recv. var ms []*types.Field if recv.IsInterface() { ms = recv.AllMethods() } else { mt := types.ReceiverBaseType(recv) if mt == nil { base.FatalfAt(pos, "type %v has no receiver base type", recv) } CalcMethods(mt)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 20 19:08:34 UTC 2024 - 30.5K bytes - Viewed (0) -
src/cmd/compile/internal/types2/signature.go
} if cause != "" { check.errorf(recv, InvalidRecv, "invalid receiver type %s (%s)", rtyp, cause) } case *Basic: check.errorf(recv, InvalidRecv, "cannot define new methods on non-local type %s", rtyp) default: check.errorf(recv, InvalidRecv, "invalid receiver type %s", recv.typ) } }).describef(recv, "validate receiver %s", recv) } sig.params = NewTuple(params...)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 21:33:05 UTC 2024 - 12.6K bytes - Viewed (0) -
src/cmd/compile/internal/types2/resolver.go
} } else { // method // d.Recv != nil ptr, recv, _ := check.unpackRecv(s.Recv.Type, false) // Methods with invalid receiver cannot be associated to a type, and // methods with blank _ names are never found; no need to collect any // of them. They will still be type-checked with all the other functions. if recv != nil && name != "_" {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 18 14:10:44 UTC 2024 - 26.3K bytes - Viewed (0) -
src/cmd/compile/internal/walk/assign.go
default: as.Y = walkExpr(as.Y, init) case ir.ORECV: // x = <-c; as.Left is x, as.Right.Left is c. // order.stmt made sure x is addressable. recv := as.Y.(*ir.UnaryExpr) recv.X = walkExpr(recv.X, init) n1 := typecheck.NodAddr(as.X) r := recv.X // the channel return mkcall1(chanfn("chanrecv1", 2, r.Type()), nil, init, r, n1) case ir.OAPPEND: // x = append(...) call := as.Y.(*ir.CallExpr)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 08 17:09:06 UTC 2024 - 20.3K bytes - Viewed (0) -
src/cmd/compile/internal/types2/subst.go
// In this case, the type of f is an interface that is itself the receiver // type of all of its methods. Because we have no type name to break // cycles, substituting in the recv results in an infinite loop of // recv->interface->recv->interface->... recv := t.recv params := subst.tuple(t.params) results := subst.tuple(t.results) if params != t.params || results != t.results { return &Signature{ rparams: t.rparams,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:04:07 UTC 2024 - 11K bytes - Viewed (0) -
src/cmd/doc/pkg.go
} return "" case *ast.FuncDecl: // Formats func declarations. name := n.Name.Name recv := pkg.oneLineNodeDepth(n.Recv, depth) if len(recv) > 0 { recv = "(" + recv + ") " } fnc := pkg.oneLineNodeDepth(n.Type, depth) fnc = strings.TrimPrefix(fnc, "func") return fmt.Sprintf("func %s%s%s", recv, name, fnc) case *ast.TypeSpec: sep := " " if n.Assign.IsValid() { sep = " = " }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jan 08 20:15:52 UTC 2024 - 32K bytes - Viewed (0) -
src/cmd/compile/internal/walk/order.go
base.Fatalf("unknown op in select %v", r.Op()) case ir.OSELRECV2: // case x, ok = <-c r := r.(*ir.AssignListStmt) recv := r.Rhs[0].(*ir.UnaryExpr) recv.X = o.expr(recv.X, nil) if !ir.IsAutoTmp(recv.X) { recv.X = o.copyExpr(recv.X) } init := ir.TakeInit(r) colas := r.Def do := func(i int, t *types.Type) { n := r.Lhs[i] if ir.IsBlank(n) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 08 02:00:33 UTC 2024 - 42.7K bytes - Viewed (0) -
src/cmd/cgo/out.go
gccExport = "__declspec(dllexport) " } s := fmt.Sprintf("%s%s %s(", gccExport, gccResult, exp.ExpName) if fn.Recv != nil { s += p.cgoType(fn.Recv.List[0].Type).C.String() s += " recv" } forFieldList(fntype.Params, func(i int, aname string, atype ast.Expr) { if i > 0 || fn.Recv != nil { s += ", " } s += fmt.Sprintf("%s %s", p.cgoType(atype).C, exportParamName(aname, i)) })
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 29 16:41:10 UTC 2024 - 59.6K bytes - Viewed (0) -
src/cmd/compile/internal/types2/object.go
sig := f.typ.(*Signature) if recv := sig.Recv(); recv != nil { buf.WriteByte('(') if _, ok := recv.Type().(*Interface); ok { // gcimporter creates abstract methods of // named interfaces using the interface type // (not the named type) as the receiver. // Don't print it in full. buf.WriteString("interface") } else { WriteType(buf, recv.Type(), qf) } buf.WriteByte(')')
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 07 20:08:23 UTC 2024 - 20.1K bytes - Viewed (0)