1
0
mirror of https://github.com/golang/go synced 2024-10-02 22:31:22 -06:00

runtime: disable pointer scan optimization

* broken by reflect, gob

TBR=r
https://golang.org/cl/166077
This commit is contained in:
Russ Cox 2009-12-06 08:18:58 -08:00
parent 44c1eb6bed
commit ed6fd1bcbe

View File

@ -21,7 +21,9 @@ runtime·makeslice(SliceType *t, uint32 nel, uint32 cap, Slice ret)
ret.len = nel;
ret.cap = cap;
if(t->elem->kind&KindNoPointers)
// TODO(rsc): Disabled because reflect and gob cast []byte
// to data structures with pointers.
if(0 && (t->elem->kind&KindNoPointers))
ret.array = mallocgc(size, RefNoPointers, 1);
else
ret.array = mal(size);