aboutsummaryrefslogtreecommitdiff
path: root/libgo/go
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2015-10-29 18:14:50 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2015-10-29 18:14:50 +0000
commitf4a513a98e6341b2d4796752644a27c722612847 (patch)
tree571dc5d41bd31a1e7befb942446857d17016547b /libgo/go
parentbdb60a10ac876bd1d68ab7b0b0ff2acc69e0c214 (diff)
downloadgcc-f4a513a98e6341b2d4796752644a27c722612847.zip
gcc-f4a513a98e6341b2d4796752644a27c722612847.tar.gz
gcc-f4a513a98e6341b2d4796752644a27c722612847.tar.bz2
compiler, reflect, runtime: remove zero field from type descriptor
Type descriptors picked up a zero field because the gc map implementation used it. However, it's since been dropped by the gc library. It was never used by gccgo. Drop it now in preparation for upgrading to the Go 1.5 library. Reviewed-on: https://go-review.googlesource.com/16486 From-SVN: r229546
Diffstat (limited to 'libgo/go')
-rw-r--r--libgo/go/reflect/type.go6
1 files changed, 0 insertions, 6 deletions
diff --git a/libgo/go/reflect/type.go b/libgo/go/reflect/type.go
index 61b1955..5cdfba5 100644
--- a/libgo/go/reflect/type.go
+++ b/libgo/go/reflect/type.go
@@ -262,7 +262,6 @@ type rtype struct {
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 // pointer to zero value
}
// Method on non-interface type
@@ -1129,7 +1128,6 @@ func (t *rtype) ptrTo() *rtype {
p.uncommonType = nil
p.ptrToThis = nil
- p.zero = unsafe.Pointer(&make([]byte, p.size)[0])
p.elem = t
if t.kind&kindNoPointers != 0 {
@@ -1505,7 +1503,6 @@ func ChanOf(dir ChanDir, t Type) Type {
ch.elem = typ
ch.uncommonType = nil
ch.ptrToThis = nil
- ch.zero = unsafe.Pointer(&make([]byte, ch.size)[0])
ch.gc = unsafe.Pointer(&chanGC{
width: ch.size,
@@ -1561,7 +1558,6 @@ func MapOf(key, elem Type) Type {
mt.elem = etyp
mt.uncommonType = nil
mt.ptrToThis = nil
- mt.zero = unsafe.Pointer(&make([]byte, mt.size)[0])
// mt.gc = unsafe.Pointer(&ptrGC{
// width: unsafe.Sizeof(uintptr(0)),
// op: _GC_PTR,
@@ -1848,7 +1844,6 @@ func SliceOf(t Type) Type {
slice.elem = typ
slice.uncommonType = nil
slice.ptrToThis = nil
- slice.zero = unsafe.Pointer(&make([]byte, slice.size)[0])
if typ.size == 0 {
slice.gc = unsafe.Pointer(&sliceEmptyGCProg)
@@ -1920,7 +1915,6 @@ func arrayOf(count int, elem Type) Type {
// TODO:
array.uncommonType = nil
array.ptrToThis = nil
- array.zero = unsafe.Pointer(&make([]byte, array.size)[0])
array.len = uintptr(count)
array.slice = slice.(*rtype)