Minor code cleanup. No functional changes.
Change-Id: I2e631b43b122174302a182a1a286c0f873851ce6
Reviewed-on: https://go-review.googlesource.com/24813
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
// TODO(rsc): Remove 'p.Mode == 64 &&'.
if p.Mode == 64 && autoffset < obj.StackSmall && p.From3Offset()&obj.NOSPLIT == 0 {
+ leaf := true
+ LeafSearch:
for q := p; q != nil; q = q.Link {
- if q.As == obj.ACALL {
- goto noleaf
- }
- if (q.As == obj.ADUFFCOPY || q.As == obj.ADUFFZERO) && autoffset >= obj.StackSmall-8 {
- goto noleaf
+ switch q.As {
+ case obj.ACALL:
+ leaf = false
+ break LeafSearch
+ case obj.ADUFFCOPY, obj.ADUFFZERO:
+ if autoffset >= obj.StackSmall-8 {
+ leaf = false
+ break LeafSearch
+ }
}
}
- p.From3.Offset |= obj.NOSPLIT
- noleaf:
+ if leaf {
+ p.From3.Offset |= obj.NOSPLIT
+ }
}
if p.From3Offset()&obj.NOSPLIT == 0 || p.From3Offset()&obj.WRAPPER != 0 {