[dev.cc] reflect: interfaces contain only pointers

[This CL is part of the removal of C code from package runtime.
See golang.org/s/dev.cc for an overview.]

Adjustments for changes made in CL 169360043.
This change is already present in the dev.garbage branch.

LGTM=r
R=r
CC=austin, golang-codereviews, iant, khr
https://golang.org/cl/167520044
This commit is contained in:
Russ Cox 2014-11-11 01:23:01 -05:00
parent 4a42fae2cd
commit 33e910296e
2 changed files with 7 additions and 15 deletions

View file

@ -1533,12 +1533,8 @@ func (gc *gcProg) appendProg(t *rtype) {
gc.appendProg(e)
}
case Interface:
gc.appendWord(bitsMultiWord)
if t.NumMethod() == 0 {
gc.appendWord(bitsEface)
} else {
gc.appendWord(bitsIface)
}
gc.appendWord(bitsPointer)
gc.appendWord(bitsPointer)
case Struct:
c := t.NumField()
for i := 0; i < c; i++ {
@ -1592,9 +1588,8 @@ func (gc *gcProg) align(a uintptr) {
// These constants must stay in sync with ../runtime/mgc0.h.
const (
bitsScalar = 1
bitsPointer = 2
bitsMultiWord = 3
bitsScalar = 1
bitsPointer = 2
bitsIface = 2
bitsEface = 3