We don't use it any more, remove it.
Change-Id: I76ce1a4c2e7048fdd13a37d3718b5abf39ed9d26
Reviewed-on: https://go-review.googlesource.com/44474
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
}
// keep this arithmetic in sync with *itab layout
- methodnum := int((offset - 3*int64(Widthptr) - 8) / int64(Widthptr))
+ methodnum := int((offset - 2*int64(Widthptr) - 8) / int64(Widthptr))
if methodnum >= len(syms) {
return nil
}
// type itab struct {
// inter *interfacetype
// _type *_type
- // _ uintptr TODO: remove
// hash uint32
// _ [4]byte
// fun [1]uintptr // variable sized
// }
o := dsymptr(i.lsym, 0, dtypesym(i.itype).Linksym(), 0)
o = dsymptr(i.lsym, o, dtypesym(i.t).Linksym(), 0)
- o = duintptr(i.lsym, o, 0) // unused
o = duint32(i.lsym, o, typehash(i.t)) // copy of type hash
o += 4 // skip unused field
o += len(imethods(i.itype)) * Widthptr // skip fun method pointers
if k != callNormal {
s.nilCheck(itab)
}
- itabidx := fn.Xoffset + 3*int64(Widthptr) + 8 // offset of fun field in runtime.itab
+ itabidx := fn.Xoffset + 2*int64(Widthptr) + 8 // offset of fun field in runtime.itab
itab = s.newValue1I(ssa.OpOffPtr, s.f.Config.Types.UintptrPtr, itabidx, itab)
if k == callNormal {
codeptr = s.newValue2(ssa.OpLoad, types.Types[TUINTPTR], itab, s.mem())
if cond.Right.Type.IsEmptyInterface() {
h.Xoffset = int64(2 * Widthptr) // offset of hash in runtime._type
} else {
- h.Xoffset = int64(3 * Widthptr) // offset of hash in runtime.itab
+ h.Xoffset = int64(2 * Widthptr) // offset of hash in runtime.itab
}
h.SetBounded(true) // guaranteed not to fault
a = nod(OAS, s.hashname, h)
itab *struct {
ityp *rtype // static interface type
typ *rtype // dynamic concrete type
- _ uintptr
hash uint32 // copy of typ.hash
_ [4]byte
fun [100000]unsafe.Pointer // method table
type itab struct {
inter *interfacetype
_type *_type
- _ uintptr
hash uint32 // copy of _type.hash. Used for type switches.
_ [4]byte
fun [1]uintptr // variable sized. fun[0]==0 means _type does not implement inter.