mirror of
https://github.com/golang/go
synced 2024-10-04 00:21:20 -06:00
[dev.garbage] runtime: remove another BitsMultiWord
Not found because it was not used by name. Add name in comments for what's left behind. LGTM=rlh R=rlh CC=golang-codereviews https://golang.org/cl/148430043
This commit is contained in:
parent
7cae2a5004
commit
fdb0cc6e7b
@ -1092,7 +1092,7 @@ twobitwalktype1(Type *t, vlong *xoffset, Bvec *bv)
|
|||||||
case TCOMPLEX64:
|
case TCOMPLEX64:
|
||||||
case TCOMPLEX128:
|
case TCOMPLEX128:
|
||||||
for(i = 0; i < t->width; i++) {
|
for(i = 0; i < t->width; i++) {
|
||||||
bvset(bv, ((*xoffset + i) / widthptr) * BitsPerPointer); // 1 = live scalar
|
bvset(bv, ((*xoffset + i) / widthptr) * BitsPerPointer); // 1 = live scalar (BitsScalar)
|
||||||
}
|
}
|
||||||
*xoffset += t->width;
|
*xoffset += t->width;
|
||||||
break;
|
break;
|
||||||
@ -1105,7 +1105,7 @@ twobitwalktype1(Type *t, vlong *xoffset, Bvec *bv)
|
|||||||
case TMAP:
|
case TMAP:
|
||||||
if((*xoffset & (widthptr-1)) != 0)
|
if((*xoffset & (widthptr-1)) != 0)
|
||||||
fatal("twobitwalktype1: invalid alignment, %T", t);
|
fatal("twobitwalktype1: invalid alignment, %T", t);
|
||||||
bvset(bv, (*xoffset / widthptr) * BitsPerPointer + 1); // 2 = live ptr
|
bvset(bv, (*xoffset / widthptr) * BitsPerPointer + 1); // 2 = live ptr (BitsPointer)
|
||||||
*xoffset += t->width;
|
*xoffset += t->width;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1113,7 +1113,7 @@ twobitwalktype1(Type *t, vlong *xoffset, Bvec *bv)
|
|||||||
// struct { byte *str; intgo len; }
|
// struct { byte *str; intgo len; }
|
||||||
if((*xoffset & (widthptr-1)) != 0)
|
if((*xoffset & (widthptr-1)) != 0)
|
||||||
fatal("twobitwalktype1: invalid alignment, %T", t);
|
fatal("twobitwalktype1: invalid alignment, %T", t);
|
||||||
bvset(bv, (*xoffset / widthptr) * BitsPerPointer + 1); // 2 = live ptr in first slot
|
bvset(bv, (*xoffset / widthptr) * BitsPerPointer + 1); // 2 = live ptr in first slot (BitsPointer)
|
||||||
*xoffset += t->width;
|
*xoffset += t->width;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1123,15 +1123,8 @@ twobitwalktype1(Type *t, vlong *xoffset, Bvec *bv)
|
|||||||
// struct { Type *type; union { void *ptr, uintptr val } data; }
|
// struct { Type *type; union { void *ptr, uintptr val } data; }
|
||||||
if((*xoffset & (widthptr-1)) != 0)
|
if((*xoffset & (widthptr-1)) != 0)
|
||||||
fatal("twobitwalktype1: invalid alignment, %T", t);
|
fatal("twobitwalktype1: invalid alignment, %T", t);
|
||||||
bvset(bv, ((*xoffset / widthptr) * BitsPerPointer) + 0);
|
bvset(bv, (*xoffset / widthptr) * BitsPerPointer + 1); // 2 = live ptr in first slot (BitsPointer)
|
||||||
bvset(bv, ((*xoffset / widthptr) * BitsPerPointer) + 1); // 3 = multiword
|
bvset(bv, (*xoffset / widthptr) * BitsPerPointer + 3); // 2 = live ptr in second slot (BitsPointer)
|
||||||
// next word contains 2 = Iface, 3 = Eface
|
|
||||||
if(isnilinter(t)) {
|
|
||||||
bvset(bv, ((*xoffset / widthptr) * BitsPerPointer) + 2);
|
|
||||||
bvset(bv, ((*xoffset / widthptr) * BitsPerPointer) + 3);
|
|
||||||
} else {
|
|
||||||
bvset(bv, ((*xoffset / widthptr) * BitsPerPointer) + 3);
|
|
||||||
}
|
|
||||||
*xoffset += t->width;
|
*xoffset += t->width;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1144,7 +1137,7 @@ twobitwalktype1(Type *t, vlong *xoffset, Bvec *bv)
|
|||||||
// struct { byte *array; uintgo len; uintgo cap; }
|
// struct { byte *array; uintgo len; uintgo cap; }
|
||||||
if((*xoffset & (widthptr-1)) != 0)
|
if((*xoffset & (widthptr-1)) != 0)
|
||||||
fatal("twobitwalktype1: invalid TARRAY alignment, %T", t);
|
fatal("twobitwalktype1: invalid TARRAY alignment, %T", t);
|
||||||
bvset(bv, (*xoffset / widthptr) * BitsPerPointer + 1); // 2 = live ptr in first slot
|
bvset(bv, (*xoffset / widthptr) * BitsPerPointer + 1); // 2 = live ptr in first slot (BitsPointer)
|
||||||
*xoffset += t->width;
|
*xoffset += t->width;
|
||||||
} else
|
} else
|
||||||
for(i = 0; i < t->bound; i++)
|
for(i = 0; i < t->bound; i++)
|
||||||
|
@ -188,6 +188,6 @@ var (
|
|||||||
|
|
||||||
infoString = []byte{BitsPointer, BitsDead}
|
infoString = []byte{BitsPointer, BitsDead}
|
||||||
infoSlice = []byte{BitsPointer, BitsDead, BitsDead}
|
infoSlice = []byte{BitsPointer, BitsDead, BitsDead}
|
||||||
infoEface = []byte{BitsMultiWord, BitsEface}
|
infoEface = []byte{BitsPointer, BitsPointer}
|
||||||
infoIface = []byte{BitsMultiWord, BitsIface}
|
infoIface = []byte{BitsPointer, BitsPointer}
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user