- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 25 for efaceOf (0.18 sec)
-
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) -
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) -
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) -
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) -
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) -
src/cmd/compile/internal/types2/object_test.go
func TestEmbeddedMethod(t *testing.T) { const src = `package p; type I interface { error }` pkg := mustTypecheck(src, nil, nil) // get original error.Error method eface := Universe.Lookup("error") orig, _, _ := LookupFieldOrMethod(eface.Type(), false, nil, "Error") if orig == nil { t.Fatalf("original error.Error not found") } // get embedded error.Error method iface := pkg.Scope().Lookup("I")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 18 14:10:44 UTC 2024 - 5.2K bytes - Viewed (0) -
src/go/types/object_test.go
func TestEmbeddedMethod(t *testing.T) { const src = `package p; type I interface { error }` pkg := mustTypecheck(src, nil, nil) // get original error.Error method eface := Universe.Lookup("error") orig, _, _ := LookupFieldOrMethod(eface.Type(), false, nil, "Error") if orig == nil { t.Fatalf("original error.Error not found") } // get embedded error.Error method iface := pkg.Scope().Lookup("I")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 18 14:10:44 UTC 2024 - 5.2K bytes - Viewed (0) -
src/internal/reflectlite/value.go
// It returns the zero Value if v is nil. func (v Value) Elem() Value { k := v.kind() switch k { case abi.Interface: var eface any if v.typ().NumMethod() == 0 { eface = *(*any)(v.ptr) } else { eface = (any)(*(*interface { M() })(v.ptr)) } x := unpackEface(eface) if x.flag != 0 { x.flag |= v.flag.ro() } return x case abi.Pointer: ptr := v.ptr
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 07 17:01:54 UTC 2024 - 13.6K bytes - Viewed (0) -
src/cmd/internal/goobj/builtinlist.go
{"runtime.panicdottypeE", 1}, {"runtime.panicdottypeI", 1}, {"runtime.panicnildottype", 1}, {"runtime.typeAssert", 1}, {"runtime.interfaceSwitch", 1}, {"runtime.ifaceeq", 1}, {"runtime.efaceeq", 1}, {"runtime.panicrangestate", 1}, {"runtime.deferrangefunc", 1}, {"runtime.rand32", 1}, {"runtime.makemap64", 1}, {"runtime.makemap", 1}, {"runtime.makemap_small", 1}, {"runtime.mapaccess1", 1},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 21 21:08:03 UTC 2024 - 7.4K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/_builtin/runtime.go
func interfaceSwitch(s *byte, t *byte) (int, *byte) // interface equality. Type/itab pointers are already known to be equal, so // we only need to pass one. func ifaceeq(tab *uintptr, x, y unsafe.Pointer) (ret bool) func efaceeq(typ *uintptr, x, y unsafe.Pointer) (ret bool) // panic for various rangefunc iterator errors func panicrangestate(state int) // defer in range over func func deferrangefunc() interface{}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 21 21:08:03 UTC 2024 - 10.6K bytes - Viewed (0)