We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e786a00 + c77ada1 commit 0091a3eCopy full SHA for 0091a3e
src/cmd/compile/internal/ssa/writebarrier.go
@@ -637,17 +637,12 @@ func (f *Func) computeZeroMap(select1 []*Value) map[ID]ZeroRegion {
637
size += ptrSize - d
638
}
639
// Clip to the 64 words that we track.
640
- min := off
641
- max := off + size
642
- if min < 0 {
643
- min = 0
644
- }
645
- if max > 64*ptrSize {
646
- max = 64 * ptrSize
647
+ minimum := max(off, 0)
+ maximum := min(off+size, 64*ptrSize)
+
648
// Clear bits for parts that we are writing (and hence
649
// will no longer necessarily be zero).
650
- for i := min; i < max; i += ptrSize {
+ for i := minimum; i < maximum; i += ptrSize {
651
bit := i / ptrSize
652
z.mask &^= 1 << uint(bit)
653
0 commit comments