Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 45 for efaceOf (0.24 sec)

  1. src/runtime/debuglog.go

    	return l
    }
    
    //go:nosplit
    func (l *dlogger) p(x any) *dlogger {
    	if !dlogEnabled {
    		return l
    	}
    	l.w.byte(debugLogPtr)
    	if x == nil {
    		l.w.uvarint(0)
    	} else {
    		v := efaceOf(&x)
    		switch v._type.Kind_ & abi.KindMask {
    		case abi.Chan, abi.Func, abi.Map, abi.Pointer, abi.UnsafePointer:
    			l.w.uvarint(uint64(uintptr(v.data)))
    		default:
    			throw("not a pointer type")
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 15:10:48 UTC 2024
    - 18.3K bytes
    - Viewed (0)
  2. src/runtime/map.go

    // complications with instrumentation (coverage, etc).
    func mapinitnoop()
    
    // mapclone for implementing maps.Clone
    //
    //go:linkname mapclone maps.clone
    func mapclone(m any) any {
    	e := efaceOf(&m)
    	e.data = unsafe.Pointer(mapclone2((*maptype)(unsafe.Pointer(e._type)), (*hmap)(e.data)))
    	return m
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 57.6K bytes
    - Viewed (0)
  3. src/runtime/netpoll.go

    // must be stored in interfaces indirectly. See issue 42076.
    func (pd *pollDesc) makeArg() (i any) {
    	x := (*eface)(unsafe.Pointer(&i))
    	x._type = pdType
    	x.data = unsafe.Pointer(&pd.self)
    	return
    }
    
    var (
    	pdEface any    = (*pollDesc)(nil)
    	pdType  *_type = efaceOf(&pdEface)._type
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 19:57:43 UTC 2024
    - 20.7K bytes
    - Viewed (0)
  4. src/runtime/runtime2.go

    type funcval struct {
    	fn uintptr
    	// variable-size, fn-specific data here
    }
    
    type iface struct {
    	tab  *itab
    	data unsafe.Pointer
    }
    
    type eface struct {
    	_type *_type
    	data  unsafe.Pointer
    }
    
    func efaceOf(ep *any) *eface {
    	return (*eface)(unsafe.Pointer(ep))
    }
    
    // The guintptr, muintptr, and puintptr are all used to bypass write barriers.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:57:37 UTC 2024
    - 47.9K bytes
    - Viewed (0)
  5. src/runtime/time.go

    func (t *timer) hchan() *hchan {
    	if !t.isChan {
    		badTimer()
    	}
    	// Note: t.arg is a chan time.Time,
    	// and runtime cannot refer to that type,
    	// so we cannot use a type assertion.
    	return (*hchan)(efaceOf(&t.arg).data)
    }
    
    // updateHeap updates t as directed by t.state, updating t.state
    // and returning a bool indicating whether the state (and ts.heap[0].when) changed.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 29 14:36:24 UTC 2024
    - 37.5K bytes
    - Viewed (0)
  6. src/runtime/panic.go

    		text := "panic while printing panic value"
    		switch r := recover().(type) {
    		case nil:
    			// nothing to do
    		case string:
    			throw(text + ": " + r)
    		default:
    			throw(text + ": type " + toRType(efaceOf(&r)._type).string())
    		}
    	}()
    	for p != nil {
    		switch v := p.arg.(type) {
    		case error:
    			p.arg = v.Error()
    		case stringer:
    			p.arg = v.String()
    		}
    		p = p.link
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 43.8K bytes
    - Viewed (0)
  7. src/runtime/export_test.go

    type UserArena struct {
    	arena *userArena
    }
    
    func NewUserArena() *UserArena {
    	return &UserArena{newUserArena()}
    }
    
    func (a *UserArena) New(out *any) {
    	i := efaceOf(out)
    	typ := i._type
    	if typ.Kind_&abi.KindMask != abi.Pointer {
    		panic("new result of non-ptr type")
    	}
    	typ = (*ptrtype)(unsafe.Pointer(typ)).Elem
    	i.data = a.arena.new(typ)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:50:53 UTC 2024
    - 46.1K bytes
    - Viewed (0)
  8. src/runtime/mbitmap.go

    // If ep points to the stack, only static live information will be returned
    // (i.e. not for objects which are only dynamically live stack objects).
    func getgcmask(ep any) (mask []byte) {
    	e := *efaceOf(&ep)
    	p := e.data
    	t := e._type
    
    	var et *_type
    	if t.Kind_&abi.KindMask != abi.Pointer {
    		throw("bad argument to getgcmask: expected type to be a pointer to the value type whose mask is being queried")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 60K bytes
    - Viewed (0)
  9. test/fixedbugs/issue15528.go

    	deep interface{} = [1]struct{ a *[2]byte }{{a: &[2]byte{'z', 'w'}}}
    	ch   interface{} = make(chan bool, 1)
    )
    
    func main() {
    	var fail bool
    	for i, test := range efaces {
    		s := fmt.Sprintf("%[1]T %[1]v", test.x)
    		if s != test.s {
    			fmt.Printf("eface(%d)=%q want %q\n", i, s, test.s)
    			fail = true
    		}
    	}
    
    	for i, test := range ifaces {
    		s := fmt.Sprintf("%[1]T %#[1]v %[1]s", test.x)
    		if s != test.s {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 12 14:31:26 UTC 2016
    - 3.1K bytes
    - Viewed (0)
  10. src/runtime/alg.go

    	x := *(*iface)(p)
    	y := *(*iface)(q)
    	return x.tab == y.tab && ifaceeq(x.tab, x.data, y.data)
    }
    func nilinterequal(p, q unsafe.Pointer) bool {
    	x := *(*eface)(p)
    	y := *(*eface)(q)
    	return x._type == y._type && efaceeq(x._type, x.data, y.data)
    }
    func efaceeq(t *_type, x, y unsafe.Pointer) bool {
    	if t == nil {
    		return true
    	}
    	eq := t.Equal
    	if eq == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 13.6K bytes
    - Viewed (0)
Back to top