gcsym, useGCProg, ptrdata := dgcsym(t)
- // We use size 0 here so we get the pointer to the zero value,
- // but don't allocate space for the zero value unless we need it.
- // TODO: how do we get this symbol into bss? We really want
- // a read-only bss, but I don't think such a thing exists.
-
// ../../pkg/reflect/type.go:/^type.commonType
// actual type structure
// type commonType struct {
// string *string
// *extraType
// ptrToThis *Type
- // zero unsafe.Pointer
// }
ot = duintptr(s, ot, uint64(t.Width))
ot = duintptr(s, ot, uint64(ptrdata))
ot += Widthptr
ot = dsymptr(s, ot, sptr, 0) // ptrto type
- ot = duintptr(s, ot, 0) // ptr to zero value (unused)
return ot
}
switch t.Etype {
default:
ot = dcommontype(s, ot, t)
- xt = ot - 3*Widthptr
+ xt = ot - 2*Widthptr
case TARRAY:
if t.Bound >= 0 {
t2.Bound = -1 // slice
s2 := dtypesym(t2)
ot = dcommontype(s, ot, t)
- xt = ot - 3*Widthptr
+ xt = ot - 2*Widthptr
ot = dsymptr(s, ot, s1, 0)
ot = dsymptr(s, ot, s2, 0)
ot = duintptr(s, ot, uint64(t.Bound))
s1 := dtypesym(t.Type)
ot = dcommontype(s, ot, t)
- xt = ot - 3*Widthptr
+ xt = ot - 2*Widthptr
ot = dsymptr(s, ot, s1, 0)
}
s1 := dtypesym(t.Type)
ot = dcommontype(s, ot, t)
- xt = ot - 3*Widthptr
+ xt = ot - 2*Widthptr
ot = dsymptr(s, ot, s1, 0)
ot = duintptr(s, ot, uint64(t.Chan))
}
ot = dcommontype(s, ot, t)
- xt = ot - 3*Widthptr
+ xt = ot - 2*Widthptr
ot = duint8(s, ot, uint8(obj.Bool2int(isddd)))
// two slice headers: in and out.
// ../../runtime/type.go:/InterfaceType
ot = dcommontype(s, ot, t)
- xt = ot - 3*Widthptr
+ xt = ot - 2*Widthptr
ot = dsymptr(s, ot, s, ot+Widthptr+2*Widthint)
ot = duintxx(s, ot, uint64(n), Widthint)
ot = duintxx(s, ot, uint64(n), Widthint)
s3 := dtypesym(mapbucket(t))
s4 := dtypesym(hmap(t))
ot = dcommontype(s, ot, t)
- xt = ot - 3*Widthptr
+ xt = ot - 2*Widthptr
ot = dsymptr(s, ot, s1, 0)
ot = dsymptr(s, ot, s2, 0)
ot = dsymptr(s, ot, s3, 0)
s1 := dtypesym(t.Type)
ot = dcommontype(s, ot, t)
- xt = ot - 3*Widthptr
+ xt = ot - 2*Widthptr
ot = dsymptr(s, ot, s1, 0)
// ../../runtime/type.go:/StructType
}
ot = dcommontype(s, ot, t)
- xt = ot - 3*Widthptr
+ xt = ot - 2*Widthptr
ot = dsymptr(s, ot, s, ot+Widthptr+2*Widthint)
ot = duintxx(s, ot, uint64(n), Widthint)
ot = duintxx(s, ot, uint64(n), Widthint)
type rtype struct {
size uintptr
ptrdata uintptr
- hash uint32 // hash of type; avoids computation in hash tables
- _ uint8 // unused/padding
- align uint8 // alignment of variable with this type
- fieldAlign uint8 // alignment of struct field with this type
- kind uint8 // enumeration for C
- alg *typeAlg // algorithm table
- gcdata *byte // garbage collection data
- string *string // string form; unnecessary but undeniably useful
- *uncommonType // (relatively) uncommon fields
- ptrToThis *rtype // type for pointer to this type, if used in binary or has methods
- zero unsafe.Pointer // unused
+ hash uint32 // hash of type; avoids computation in hash tables
+ _ uint8 // unused/padding
+ align uint8 // alignment of variable with this type
+ fieldAlign uint8 // alignment of struct field with this type
+ kind uint8 // enumeration for C
+ alg *typeAlg // algorithm table
+ gcdata *byte // garbage collection data
+ string *string // string form; unnecessary but undeniably useful
+ *uncommonType // (relatively) uncommon fields
+ ptrToThis *rtype // type for pointer to this type, if used in binary or has methods
}
// a copy of runtime.typeAlg