mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: remove OFORUNTIL
Not used any more. Fixes #53860 Change-Id: Id0b1c3ed30b576d6c5f08f064d1262de337262b3 Reviewed-on: https://go-review.googlesource.com/c/go/+/418374 Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: David Chase <drchase@google.com> Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
parent
6dc7b060cd
commit
a5370d038e
12 changed files with 69 additions and 142 deletions
|
|
@ -124,7 +124,7 @@ func walkStmt(n ir.Node) ir.Node {
|
|||
n := n.(*ir.GoDeferStmt)
|
||||
return walkGoDefer(n)
|
||||
|
||||
case ir.OFOR, ir.OFORUNTIL:
|
||||
case ir.OFOR:
|
||||
n := n.(*ir.ForStmt)
|
||||
return walkFor(n)
|
||||
|
||||
|
|
@ -178,7 +178,7 @@ func walkStmtList(s []ir.Node) {
|
|||
}
|
||||
}
|
||||
|
||||
// walkFor walks an OFOR or OFORUNTIL node.
|
||||
// walkFor walks an OFOR node.
|
||||
func walkFor(n *ir.ForStmt) ir.Node {
|
||||
if n.Cond != nil {
|
||||
init := ir.TakeInit(n.Cond)
|
||||
|
|
@ -188,9 +188,6 @@ func walkFor(n *ir.ForStmt) ir.Node {
|
|||
}
|
||||
|
||||
n.Post = walkStmt(n.Post)
|
||||
if n.Op() == ir.OFORUNTIL {
|
||||
walkStmtList(n.Late)
|
||||
}
|
||||
walkStmtList(n.Body)
|
||||
return n
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue