1
0
mirror of https://github.com/golang/go synced 2024-11-23 14:00:03 -07:00

[dev.regabi] cmd/compile: use node walked flag to prevent double walk for walkSelect

Same as CL 283733, but for walkSelect.

Passes toolstash -cmp.

Change-Id: I3ecb8d6eafd395379191c15fc58c95f75809fec9
Reviewed-on: https://go-review.googlesource.com/c/go/+/284895
Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
Cuong Manh Le 2021-01-21 02:35:03 +07:00
parent 1760d736f6
commit 213c3905e9

View File

@ -13,9 +13,10 @@ import (
func walkSelect(sel *ir.SelectStmt) {
lno := ir.SetPos(sel)
if len(sel.Compiled) != 0 {
if sel.Walked() {
base.Fatalf("double walkSelect")
}
sel.SetWalked(true)
init := ir.TakeInit(sel)