Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 56 for ITab (0.06 sec)

  1. src/cmd/cgo/internal/testplugin/testdata/issue18676/main.go

    // The bug happened like this:
    //  1. The main binary adds an itab for *json.UnsupportedValueError / error
    //     (concrete type / interface type).  This itab goes in hash bucket 0x111.
    //  2. The plugin adds that same itab again.  That makes a cycle in the itab
    //     chain rooted at hash bucket 0x111.
    //  3. The main binary then asks for the itab for *dynamodbstreamsevt.Event /
    //     json.Unmarshaler.  This itab happens to also live in bucket 0x111.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 1.1K bytes
    - Viewed (0)
  2. src/runtime/iface.go

    	}
    	t.add(m)
    }
    
    // add adds the given itab to itab table t.
    // itabLock must be held.
    func (t *itabTableType) add(m *itab) {
    	// See comment in find about the probe sequence.
    	// Insert new itab in the first empty spot in the probe sequence.
    	mask := t.size - 1
    	h := itabHashFunc(m.Inter, m.Type) & mask
    	for i := uintptr(1); ; i++ {
    		p := (**itab)(add(unsafe.Pointer(&t.entries), h*goarch.PtrSize))
    		m2 := *p
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 22.5K bytes
    - Viewed (0)
  3. src/internal/abi/switch.go

    }
    
    type InterfaceSwitchCacheEntry struct {
    	// type of source value (a *Type)
    	Typ uintptr
    	// case # to dispatch to
    	Case int
    	// itab to use for resulting case variable (a *runtime.itab)
    	Itab uintptr
    }
    
    const go122InterfaceSwitchCache = true
    
    func UseInterfaceSwitchCache(goarch string) bool {
    	if !go122InterfaceSwitchCache {
    		return false
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 06 17:02:53 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/ir/type.go

    	// representing the asserted type.
    	//
    	// BUG(mdempsky): If ITab is non-nil, RType may be nil.
    	RType Node
    
    	// ITab is an expression that yields a *runtime.itab value
    	// representing the asserted type within the assertee expression's
    	// original interface type.
    	//
    	// ITab is only used for assertions (including type switches) from
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Aug 20 05:56:49 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  5. test/fixedbugs/issue31419.go

    	M()
    	M2()
    }
    
    var t T
    var e interface{} = &t
    var ok = false
    var ch = make(chan int)
    
    func main() {
    	_, ok = e.(I) // populate itab cache with a false result
    
    	go f() // get itab in a loop
    
    	var i I
    	for k := 0; k < 10000; k++ {
    		i, ok = e.(I) // read the cached itab
    		if ok {
    			println("iteration", k, "i =", i, "&t =", &t)
    			panic("conversion succeeded")
    		}
    	}
    	<-ch
    }
    
    func f() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 11 18:59:57 UTC 2019
    - 948 bytes
    - Viewed (0)
  6. src/internal/abi/iface.go

    package abi
    
    import "unsafe"
    
    // The first word of every non-empty interface type contains an *ITab.
    // It records the underlying concrete type (Type), the interface type it
    // is implementing (Inter), and some ancillary information.
    //
    // allocated in non-garbage-collected memory
    type ITab struct {
    	Inter *InterfaceType
    	Type  *Type
    	Hash  uint32     // copy of Type.Hash. Used for type switches.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 17 21:09:59 UTC 2024
    - 895 bytes
    - Viewed (0)
  7. src/cmd/compile/internal/ssa/_gen/dec.rules

          len
          (Store {t.Elem().PtrTo()} dst ptr mem)))
    
    // interface ops
    (ITab (IMake itab _)) => itab
    (IData (IMake _ data)) => data
    
    (Load <t> ptr mem) && t.IsInterface() =>
      (IMake
        (Load <typ.Uintptr> ptr mem)
        (Load <typ.BytePtr>
          (OffPtr <typ.BytePtrPtr> [config.PtrSize] ptr)
          mem))
    (Store dst (IMake itab data) mem) =>
      (Store {typ.BytePtr}
        (OffPtr <typ.BytePtrPtr> [config.PtrSize] dst)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 12 00:48:31 UTC 2023
    - 6.9K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/walk/switch.go

    // from an interface's descriptor word (whether a *runtime._type or
    // *runtime.itab pointer).
    func typeHashFieldOf(pos src.XPos, itab *ir.UnaryExpr) *ir.SelectorExpr {
    	if itab.Op() != ir.OITAB {
    		base.Fatalf("expected OITAB, got %v", itab.Op())
    	}
    	var hashField *types.Field
    	if itab.X.Type().IsEmptyInterface() {
    		// runtime._type's hash field
    		if rtypeHashField == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:01 UTC 2024
    - 30.1K bytes
    - Viewed (0)
  9. test/fixedbugs/issue24693.dir/b.go

    func (T) m() { println("ok") }
    
    // The compiler used to not pay attention to package for non-exported
    // methods when statically constructing itabs. The consequence of this
    // was that the call to b.F1(b.T{}) in c.go would create an itab using
    // a.T.m instead of b.T.m.
    func F1(i interface{ m() }) { i.m() }
    
    // The interface method calling convention depends on interface method
    // sets being sorted in the same order across compilation units.  In
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 10 00:06:06 UTC 2018
    - 1.2K bytes
    - Viewed (0)
  10. test/fixedbugs/issue65962.go

    }
    
    func isI(x any) {
    	_ = x.(I)
    }
    
    func test1() {
    	defer func() { recover() }()
    	ld[bool]() // add <bool,I> itab to binary
    	_ = any(false).(I)
    }
    
    type B bool
    
    func (B) f() {
    }
    func (B) g() {
    }
    
    func test2() {
    	defer func() { recover() }()
    	ld[B]() // add <B,I> itab to binary
    	_ = any(B(false)).(I)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 29 18:30:40 UTC 2024
    - 625 bytes
    - Viewed (0)
Back to top