Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 23 for rcvr (0.05 sec)

  1. src/net/rpc/server.go

    const logRegisterError = false
    
    func (server *Server) register(rcvr any, name string, useName bool) error {
    	s := new(service)
    	s.typ = reflect.TypeOf(rcvr)
    	s.rcvr = reflect.ValueOf(rcvr)
    	sname := name
    	if !useName {
    		sname = reflect.Indirect(s.rcvr).Type().Name()
    	}
    	if sname == "" {
    		s := "rpc.Register: no service name for type " + s.typ.String()
    		log.Print(s)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 21.6K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/test/abiutilsaux_test.go

    	for _, ot := range outs {
    		outf = append(outf, mkParamResultField(ot, q, ir.PPARAMOUT))
    	}
    	var rf *types.Field
    	if rcvr != nil {
    		rf = mkParamResultField(rcvr, q, ir.PPARAM)
    	}
    	return types.NewSignature(rf, inf, outf)
    }
    
    type expectedDump struct {
    	dump string
    	file string
    	line int
    }
    
    func tokenize(src string) []string {
    	var s scanner.Scanner
    	s.Init(strings.NewReader(src))
    	res := []string{}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 13 18:34:00 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  3. src/reflect/export_test.go

    // If ptrs is false, gc will be nil.
    func FuncLayout(t Type, rcvr Type) (frametype Type, argSize, retOffset uintptr, stack, gc, inReg, outReg []byte, ptrs bool) {
    	var ft *abi.Type
    	var abid abiDesc
    	if rcvr != nil {
    		ft, _, abid = funcLayout((*funcType)(unsafe.Pointer(t.common())), rcvr.common())
    	} else {
    		ft, _, abid = funcLayout((*funcType)(unsafe.Pointer(t.(*rtype))), nil)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 15:10:48 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  4. src/reflect/makefunc.go

    			regPtrs: abid.inRegPtrs,
    		},
    		method: int(v.flag) >> flagMethodShift,
    		rcvr:   rcvr,
    	}
    
    	// Cause panic if method is not appropriate.
    	// The panic would still happen during the call if we omit this,
    	// but we want Interface() and other operations to fail early.
    	methodReceiver(op, fv.rcvr, fv.method)
    
    	return Value{ftyp.Common(), unsafe.Pointer(fv), v.flag&flagRO | flag(Func)}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 15:20:05 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  5. src/cmd/fix/typecheck.go

    		if fn.Recv != nil {
    			// The receiver must be a type.
    			rcvr := typeof[fn.Recv]
    			if !isType(rcvr) {
    				if len(fn.Recv.List) != 1 {
    					continue
    				}
    				rcvr = mkType(gofmt(fn.Recv.List[0].Type))
    				typeof[fn.Recv.List[0].Type] = rcvr
    			}
    			rcvr = getType(rcvr)
    			if rcvr != "" && rcvr[0] == '*' {
    				rcvr = rcvr[1:]
    			}
    			typeof[rcvr+"."+fn.Name.Name] = t
    		} else {
    			if isType(t) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 16 22:02:42 UTC 2022
    - 20.1K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/typecheck/typecheck.go

    		tt := n.X.Type()
    		types.CalcSize(tt)
    		rcvr := f2.Type.Recv().Type
    		if !types.Identical(rcvr, tt) {
    			if rcvr.IsPtr() && types.Identical(rcvr.Elem(), tt) {
    				checklvalue(n.X, "call pointer method on")
    				addr := NodAddr(n.X)
    				addr.SetImplicit(true)
    				n.X = typecheck(addr, ctxType|ctxExpr)
    			} else if tt.IsPtr() && (!rcvr.IsPtr() || rcvr.IsPtr() && rcvr.Elem().NotInHeap()) && types.Identical(tt.Elem(), rcvr) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 20 19:08:34 UTC 2024
    - 30.5K bytes
    - Viewed (0)
  7. src/reflect/abi.go

    // abiStep describing that translation, and nil otherwise.
    // Returns true if the receiver is a pointer.
    func (a *abiSeq) addRcvr(rcvr *abi.Type) (*abiStep, bool) {
    	// The receiver is always one word.
    	a.valueStart = append(a.valueStart, len(a.steps))
    	var ok, ptr bool
    	if rcvr.IfaceIndir() || rcvr.Pointers() {
    		ok = a.assignIntN(0, goarch.PtrSize, 1, 0b1)
    		ptr = true
    	} else {
    		// TODO(mknyszek): Is this case even possible?
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 17:08:32 UTC 2024
    - 15K bytes
    - Viewed (0)
  8. test/escape_param.go

    	_ = p
    }
    
    func caller3b() {
    	i := 0 // ERROR "moved to heap: i$"
    	j := 0 // ERROR "moved to heap: j$"
    	p := Pair{&i, &j}
    	param3(&p)
    	sink = p // ERROR "p escapes to heap$"
    }
    
    // in -> rcvr
    func (p *Pair) param4(i *int) { // ERROR "p does not escape$" "leaking param: i$"
    	p.p1 = i
    }
    
    func caller4a() {
    	i := 0 // ERROR "moved to heap: i$"
    	p := Pair{}
    	p.param4(&i)
    	_ = p
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 26 23:50:32 UTC 2021
    - 8.9K bytes
    - Viewed (0)
  9. src/runtime/traceback.go

    	}
    	name = name[n:]
    	rcvr := ""
    
    	// Extract receiver type, if any.
    	// For example, runtime.(*Func).Entry
    	i := len(name) - 1
    	for i >= 0 && name[i] != '.' {
    		i--
    	}
    	if i >= 0 {
    		rcvr = name[:i]
    		name = name[i+1:]
    		// Remove parentheses and star for pointer receivers.
    		if len(rcvr) >= 3 && rcvr[0] == '(' && rcvr[1] == '*' && rcvr[len(rcvr)-1] == ')' {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 55.1K bytes
    - Viewed (0)
  10. src/reflect/value.go

    		switch st := abid.call.steps[0]; st.kind {
    		case abiStepStack:
    			storeRcvr(rcvr, stackArgs)
    		case abiStepPointer:
    			storeRcvr(rcvr, unsafe.Pointer(&regArgs.Ptrs[st.ireg]))
    			fallthrough
    		case abiStepIntReg:
    			storeRcvr(rcvr, unsafe.Pointer(&regArgs.Ints[st.ireg]))
    		case abiStepFloatReg:
    			storeRcvr(rcvr, unsafe.Pointer(&regArgs.Floats[st.freg]))
    		default:
    			panic("unknown ABI parameter kind")
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:17:41 UTC 2024
    - 119.9K bytes
    - Viewed (0)
Back to top