Skip to content

Commit 6ca91d2

Browse files
committed
cmd/internal/obj/arm64: delete needless closure in for claus
A residue of the automatic translation, this closure is easily rewritten to a simpler, smaller, and faster construct. Discovered while analyzing #10269, which I still plan to fix. Change-Id: I76b12290280d81880c446b4cf75da633a94482d4 Reviewed-on: https://go-review.googlesource.com/8270 Reviewed-by: Dave Cheney <dave@cheney.net> Reviewed-by: Minux Ma <minux@golang.org>
1 parent 73c026e commit 6ca91d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cmd/internal/obj/arm64/obj7.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ loop:
361361
if p.Mark&FOLL != 0 {
362362
i = 0
363363
q = p
364-
for ; i < 4; (func() { i++; q = q.Link })() {
364+
for ; i < 4; i, q = i+1, q.Link {
365365
if q == *last || q == nil {
366366
break
367367
}

0 commit comments

Comments
 (0)