Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 181 for eface (0.04 sec)

  1. test/typeparam/eface.go

    Matthew Dempsky <******@****.***> 1646087539 -0800
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 1.1K bytes
    - Viewed (0)
  2. src/runtime/error.go

    	case abi.Int16:
    		print(typestring, "(", *(*int16)(eface.data), ")")
    	case abi.Int32:
    		print(typestring, "(", *(*int32)(eface.data), ")")
    	case abi.Int64:
    		print(typestring, "(", *(*int64)(eface.data), ")")
    	case abi.Uint:
    		print(typestring, "(", *(*uint)(eface.data), ")")
    	case abi.Uint8:
    		print(typestring, "(", *(*uint8)(eface.data), ")")
    	case abi.Uint16:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 19:10:41 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  3. src/runtime/gcinfo_test.go

    	}
    	{
    		var x []string
    		verifyGCInfo(t, "stack slice", &x, infoSlice)
    		runtime.KeepAlive(x)
    	}
    	{
    		var x any
    		verifyGCInfo(t, "stack eface", &x, infoEface)
    		runtime.KeepAlive(x)
    	}
    	{
    		var x Iface
    		verifyGCInfo(t, "stack iface", &x, infoIface)
    		runtime.KeepAlive(x)
    	}
    
    	for i := 0; i < 10; i++ {
    		verifyGCInfo(t, "heap Ptr", runtime.Escape(new(Ptr)), trimDead(infoPtr))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 09 19:58:08 UTC 2023
    - 6K bytes
    - Viewed (0)
  4. test/fixedbugs/issue52612.go

    import (
    	"sync/atomic"
    	"unsafe"
    )
    
    var one interface{} = 1
    
    type eface struct {
    	typ  unsafe.Pointer
    	data unsafe.Pointer
    }
    
    func f(c chan struct{}) {
    	var x atomic.Value
    
    	go func() {
    		x.Swap(one) // writing using the old marker
    	}()
    	for i := 0; i < 100000; i++ {
    		v := x.Load() // reading using the new marker
    
    		p := (*eface)(unsafe.Pointer(&v)).typ
    		if uintptr(p) == ^uintptr(0) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 29 20:42:52 UTC 2022
    - 881 bytes
    - Viewed (0)
  5. src/sync/poolqueue.go

    	// otherwise. A slot is still in use until *both* the tail
    	// index has moved beyond it and typ has been set to nil. This
    	// is set to nil atomically by the consumer and read
    	// atomically by the producer.
    	vals []eface
    }
    
    type eface struct {
    	typ, val unsafe.Pointer
    }
    
    const dequeueBits = 32
    
    // dequeueLimit is the maximum size of a poolDequeue.
    //
    // This must be at most (1<<dequeueBits)/2 because detecting fullness
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 18:12:29 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types2/object_test.go

    	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")
    	embed, _, _ := LookupFieldOrMethod(iface.Type(), false, nil, "Error")
    	if embed == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 18 14:10:44 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  7. src/go/types/object_test.go

    	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")
    	embed, _, _ := LookupFieldOrMethod(iface.Type(), false, nil, "Error")
    	if embed == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 18 14:10:44 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  8. src/sync/export_test.go

    // poolDequeue testing.
    type PoolDequeue interface {
    	PushHead(val any) bool
    	PopHead() (any, bool)
    	PopTail() (any, bool)
    }
    
    func NewPoolDequeue(n int) PoolDequeue {
    	d := &poolDequeue{
    		vals: make([]eface, n),
    	}
    	// For testing purposes, set the head and tail indexes close
    	// to wrapping around.
    	d.headTail.Store(d.pack(1<<dequeueBits-500, 1<<dequeueBits-500))
    	return d
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 17 16:39:52 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  9. test/fixedbugs/issue15528.go

    )
    
    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 {
    			fmt.Printf("iface(%d)=%q want %q\n", i, s, test.s)
    			fail = true
    		}
    	}
    
    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

    	return *(*string)(p) == *(*string)(q)
    }
    func interequal(p, q unsafe.Pointer) bool {
    	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 {
    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