diff options
| author | Russ Cox <rsc@golang.org> | 2009-12-06 08:18:58 -0800 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2009-12-06 08:18:58 -0800 |
| commit | 956d8c7dec13e1a90061f81c321d6ccd588a3a6e (patch) | |
| tree | 9258f3a8a438398714f7f1d5c7d12c4e9878114a /src/pkg/runtime/slice.c | |
| parent | 9cfb4cb41a45c77910402731b062f7f9f1e9e4aa (diff) | |
| download | golang-956d8c7dec13e1a90061f81c321d6ccd588a3a6e.tar.gz | |
runtime: disable pointer scan optimization
* broken by reflect, gob
TBR=r
http://codereview.appspot.com/166077
Diffstat (limited to 'src/pkg/runtime/slice.c')
| -rw-r--r-- | src/pkg/runtime/slice.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pkg/runtime/slice.c b/src/pkg/runtime/slice.c index d5e524e8a..ba4be331b 100644 --- a/src/pkg/runtime/slice.c +++ b/src/pkg/runtime/slice.c @@ -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); |
