Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 25 for efaceeq (0.15 sec)

  1. 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)
  2. 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)
  3. 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)
  4. src/runtime/arena.go

    func arena_arena_New(arena unsafe.Pointer, typ any) any {
    	t := (*_type)(efaceOf(&typ).data)
    	if t.Kind_&abi.KindMask != abi.Pointer {
    		throw("arena_New: non-pointer type")
    	}
    	te := (*ptrtype)(unsafe.Pointer(t)).Elem
    	x := ((*userArena)(arena)).new(te)
    	var result any
    	e := efaceOf(&result)
    	e._type = t
    	e.data = x
    	return result
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:44:56 UTC 2024
    - 37.9K bytes
    - Viewed (0)
  5. src/runtime/cgocall.go

    		return
    	}
    
    	ep := efaceOf(&ptr)
    	t := ep._type
    
    	top := true
    	if arg != nil && (t.Kind_&abi.KindMask == abi.Pointer || t.Kind_&abi.KindMask == abi.UnsafePointer) {
    		p := ep.data
    		if t.Kind_&abi.KindDirectIface == 0 {
    			p = *(*unsafe.Pointer)(p)
    		}
    		if p == nil || !cgoIsGoPointer(p) {
    			return
    		}
    		aep := efaceOf(&arg)
    		switch aep._type.Kind_ & abi.KindMask {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:47 UTC 2024
    - 24.2K bytes
    - Viewed (0)
  6. 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)
  7. 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)
  8. src/internal/abi/type.go

    func TypeOf(a any) *Type {
    	eface := *(*EmptyInterface)(unsafe.Pointer(&a))
    	// Types are either static (for compiler-created types) or
    	// heap-allocated but always reachable (for reflection-created
    	// types, held in the central map). So there is no need to
    	// escape types. noescape here help avoid unnecessary escape
    	// of v.
    	return (*Type)(NoEscape(unsafe.Pointer(eface.Type)))
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 17 21:09:59 UTC 2024
    - 21.8K bytes
    - Viewed (0)
  9. src/runtime/os_windows.go

    			if mp.resumesema != 0 {
    				stdcall1(_SetEvent, mp.resumesema)
    			}
    		}
    		return 0
    	}
    	params := _DEVICE_NOTIFY_SUBSCRIBE_PARAMETERS{
    		callback: compileCallback(*efaceOf(&fn), true),
    	}
    	handle := uintptr(0)
    	stdcall3(powerRegisterSuspendResumeNotification, _DEVICE_NOTIFY_CALLBACK,
    		uintptr(unsafe.Pointer(&params)), uintptr(unsafe.Pointer(&handle)))
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 22:55:25 UTC 2024
    - 41.5K bytes
    - Viewed (0)
  10. 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)
Back to top