diff options
| author | Russ Cox <rsc@golang.org> | 2014-08-18 21:13:11 -0400 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2014-08-18 21:13:11 -0400 |
| commit | 1806a5732b373e5a9048765db533bcb33952a067 (patch) | |
| tree | 5ce3a35d9de9e7f817f82a4dc3f09775bfb643d0 /src/pkg/runtime/stack.c | |
| parent | 2e2beb567cb2a59a8b54d8f2cd3fbd8eb1116013 (diff) | |
| download | go-1806a5732b373e5a9048765db533bcb33952a067.tar.xz | |
cmd/gc, runtime: refactor interface inlining decision into compiler
We need to change the interface value representation for
concurrent garbage collection, so that there is no ambiguity
about whether the data word holds a pointer or scalar.
This CL does NOT make any representation changes.
Instead, it removes representation assumptions from
various pieces of code throughout the tree.
The isdirectiface function in cmd/gc/subr.c is now
the only place that decides that policy.
The policy propagates out from there in the reflect
metadata, as a new flag in the internal kind value.
A follow-up CL will change the representation by
changing the isdirectiface function. If that CL causes
problems, it will be easy to roll back.
Update #8405.
LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews, r
https://golang.org/cl/129090043
Diffstat (limited to 'src/pkg/runtime/stack.c')
| -rw-r--r-- | src/pkg/runtime/stack.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/runtime/stack.c b/src/pkg/runtime/stack.c index 772080af55..b4e992e658 100644 --- a/src/pkg/runtime/stack.c +++ b/src/pkg/runtime/stack.c @@ -585,7 +585,7 @@ adjustpointers(byte **scanp, BitVector *bv, AdjustInfo *adjinfo, Func *f) break; case BitsEface: t = (Type*)scanp[i]; - if(t != nil && (t->size > PtrSize || (t->kind & KindNoPointers) == 0)) { + if(t != nil && ((t->kind & KindDirectIface) == 0 || (t->kind & KindNoPointers) == 0)) { p = scanp[i+1]; if(minp <= p && p < maxp) { if(StackDebug >= 3) @@ -602,7 +602,7 @@ adjustpointers(byte **scanp, BitVector *bv, AdjustInfo *adjinfo, Func *f) if(tab != nil) { t = tab->type; //runtime·printf(" type=%p\n", t); - if(t->size > PtrSize || (t->kind & KindNoPointers) == 0) { + if((t->kind & KindDirectIface) == 0 || (t->kind & KindNoPointers) == 0) { p = scanp[i+1]; if(minp <= p && p < maxp) { if(StackDebug >= 3) |
