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