@@ -80,11 +80,11 @@ const (
80
80
bitPointer = 1 << 0
81
81
bitScan = 1 << 4
82
82
83
- heapBitsShift = 1 // shift offset between successive bitPointer or bitMarked entries
83
+ heapBitsShift = 1 // shift offset between successive bitPointer or bitScan entries
84
84
heapBitmapScale = sys .PtrSize * (8 / 2 ) // number of data bytes described by one heap bitmap byte
85
85
86
- // all mark /pointer bits in a byte
87
- bitMarkedAll = bitScan | bitScan << heapBitsShift | bitScan << (2 * heapBitsShift ) | bitScan << (3 * heapBitsShift )
86
+ // all scan /pointer bits in a byte
87
+ bitScanAll = bitScan | bitScan << heapBitsShift | bitScan << (2 * heapBitsShift ) | bitScan << (3 * heapBitsShift )
88
88
bitPointerAll = bitPointer | bitPointer << heapBitsShift | bitPointer << (2 * heapBitsShift ) | bitPointer << (3 * heapBitsShift )
89
89
)
90
90
@@ -481,7 +481,7 @@ func (h heapBits) forward(n uintptr) heapBits {
481
481
return heapBits {subtractb (h .bitp , n / 4 ), uint32 (n % 4 ) * heapBitsShift }
482
482
}
483
483
484
- // The caller can test isMarked and isPointer by &-ing with bitMarked and bitPointer.
484
+ // The caller can test morePointers and isPointer by &-ing with bitScan and bitPointer.
485
485
// The result includes in its higher bits the bits for subsequent words
486
486
// described by the same bitmap byte.
487
487
func (h heapBits ) bits () uint32 {
@@ -730,7 +730,7 @@ func (h heapBits) initSpan(s *mspan) {
730
730
end := h .bitp
731
731
bitp := subtractb (end , nbyte - 1 )
732
732
for {
733
- * bitp = bitPointerAll | bitMarkedAll
733
+ * bitp = bitPointerAll | bitScanAll
734
734
if bitp == end {
735
735
break
736
736
}
@@ -945,7 +945,7 @@ func heapBitsSetType(x, size, dataSize uintptr, typ *_type) {
945
945
b := uint32 (* ptrmask )
946
946
hb := (b & 3 ) | bitScan
947
947
if gcphase == _GCoff {
948
- // bitPointer == 1, bitMarked is 1 << 4, heapBitsShift is 1.
948
+ // bitPointer == 1, bitScan is 1 << 4, heapBitsShift is 1.
949
949
// 110011 is shifted h.shift and complemented.
950
950
// This clears out the bits that are about to be
951
951
// ored into *h.hbitp in the next instructions.
@@ -1128,7 +1128,7 @@ func heapBitsSetType(x, size, dataSize uintptr, typ *_type) {
1128
1128
1129
1129
// Phase 1: Special case for leading byte (shift==0) or half-byte (shift==4).
1130
1130
// The leading byte is special because it contains the bits for word 1,
1131
- // which does not have the marked bits set.
1131
+ // which does not have the scan bit set.
1132
1132
// The leading half-byte is special because it's a half a byte and must be
1133
1133
// manipulated atomically.
1134
1134
switch {
@@ -1177,7 +1177,7 @@ func heapBitsSetType(x, size, dataSize uintptr, typ *_type) {
1177
1177
hb |= bitScan << (2 * heapBitsShift )
1178
1178
b >>= 2
1179
1179
nb -= 2
1180
- // Note: no bitMarker for second word because that's
1180
+ // Note: no bitScan for second word because that's
1181
1181
// the checkmark.
1182
1182
if gcphase == _GCoff {
1183
1183
* hbitp &^= uint8 ((bitPointer | bitScan | (bitPointer << heapBitsShift )) << (2 * heapBitsShift ))
@@ -1211,7 +1211,7 @@ func heapBitsSetType(x, size, dataSize uintptr, typ *_type) {
1211
1211
// but we'll stop at the break and then truncate
1212
1212
// appropriately in Phase 3.
1213
1213
hb = b & bitPointerAll
1214
- hb |= bitMarkedAll
1214
+ hb |= bitScanAll
1215
1215
if w += 4 ; w >= nw {
1216
1216
break
1217
1217
}
@@ -1259,7 +1259,7 @@ func heapBitsSetType(x, size, dataSize uintptr, typ *_type) {
1259
1259
1260
1260
// Emit bitmap byte.
1261
1261
hb = b & bitPointerAll
1262
- hb |= bitMarkedAll
1262
+ hb |= bitScanAll
1263
1263
if w += 4 ; w >= nw {
1264
1264
break
1265
1265
}
@@ -1275,7 +1275,7 @@ Phase3:
1275
1275
// there are more entries than possible pointer slots.
1276
1276
// Discard the excess entries (can't be more than 3).
1277
1277
mask := uintptr (1 )<< (4 - (w - nw )) - 1
1278
- hb &= mask | mask << 4 // apply mask to both pointer bits and mark bits
1278
+ hb &= mask | mask << 4 // apply mask to both pointer bits and scan bits
1279
1279
}
1280
1280
1281
1281
// Change nw from counting possibly-pointer words to total words in allocation.
@@ -1525,11 +1525,11 @@ Run:
1525
1525
dst = add1 (dst )
1526
1526
bits >>= 8
1527
1527
} else {
1528
- v := bits & bitPointerAll | bitMarkedAll
1528
+ v := bits & bitPointerAll | bitScanAll
1529
1529
* dst = uint8 (v )
1530
1530
dst = subtract1 (dst )
1531
1531
bits >>= 4
1532
- v = bits & bitPointerAll | bitMarkedAll
1532
+ v = bits & bitPointerAll | bitScanAll
1533
1533
* dst = uint8 (v )
1534
1534
dst = subtract1 (dst )
1535
1535
bits >>= 4
@@ -1563,11 +1563,11 @@ Run:
1563
1563
dst = add1 (dst )
1564
1564
bits >>= 8
1565
1565
} else {
1566
- v := bits & 0xf | bitMarkedAll
1566
+ v := bits & 0xf | bitScanAll
1567
1567
* dst = uint8 (v )
1568
1568
dst = subtract1 (dst )
1569
1569
bits >>= 4
1570
- v = bits & 0xf | bitMarkedAll
1570
+ v = bits & 0xf | bitScanAll
1571
1571
* dst = uint8 (v )
1572
1572
dst = subtract1 (dst )
1573
1573
bits >>= 4
@@ -1694,7 +1694,7 @@ Run:
1694
1694
}
1695
1695
} else {
1696
1696
for nbits >= 4 {
1697
- * dst = uint8 (bits & 0xf | bitMarkedAll )
1697
+ * dst = uint8 (bits & 0xf | bitScanAll )
1698
1698
dst = subtract1 (dst )
1699
1699
bits >>= 4
1700
1700
nbits -= 4
@@ -1752,7 +1752,7 @@ Run:
1752
1752
for i := c / 4 ; i > 0 ; i -- {
1753
1753
bits |= (uintptr (* src ) & 0xf ) << nbits
1754
1754
src = subtract1 (src )
1755
- * dst = uint8 (bits & 0xf | bitMarkedAll )
1755
+ * dst = uint8 (bits & 0xf | bitScanAll )
1756
1756
dst = subtract1 (dst )
1757
1757
bits >>= 4
1758
1758
}
@@ -1778,7 +1778,7 @@ Run:
1778
1778
totalBits = (uintptr (unsafe .Pointer (dstStart ))- uintptr (unsafe .Pointer (dst )))* 4 + nbits
1779
1779
nbits += - nbits & 3
1780
1780
for ; nbits > 0 ; nbits -= 4 {
1781
- v := bits & 0xf | bitMarkedAll
1781
+ v := bits & 0xf | bitScanAll
1782
1782
* dst = uint8 (v )
1783
1783
dst = subtract1 (dst )
1784
1784
bits >>= 4
0 commit comments