From 4c20c0a826dafe8bcbb167e82bc07370da065cb1 Mon Sep 17 00:00:00 2001 From: Cuong Manh Le Date: Thu, 13 Apr 2023 22:26:09 +0700 Subject: [PATCH] cmd/compile/internal/ir: remove HasBreak field of some nodes CL 484435 removed all usages of them. Change-Id: I00f21640c7573921472ff3f88cfa92837dc3f9ad Reviewed-on: https://go-review.googlesource.com/c/go/+/484436 Reviewed-by: Keith Randall TryBot-Result: Gopher Robot Reviewed-by: Keith Randall Reviewed-by: Matthew Dempsky Run-TryBot: Cuong Manh Le --- src/cmd/compile/internal/ir/stmt.go | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/cmd/compile/internal/ir/stmt.go b/src/cmd/compile/internal/ir/stmt.go index e6f0757ba2..b6653ab528 100644 --- a/src/cmd/compile/internal/ir/stmt.go +++ b/src/cmd/compile/internal/ir/stmt.go @@ -220,7 +220,6 @@ type ForStmt struct { Cond Node Post Node Body Nodes - HasBreak bool DistinctVars bool } @@ -350,7 +349,6 @@ type RangeStmt struct { Key Node Value Node Body Nodes - HasBreak bool DistinctVars bool Prealloc *Name @@ -391,9 +389,8 @@ func NewReturnStmt(pos src.XPos, results []Node) *ReturnStmt { // A SelectStmt is a block: { Cases }. type SelectStmt struct { miniStmt - Label *types.Sym - Cases []*CommClause - HasBreak bool + Label *types.Sym + Cases []*CommClause // TODO(rsc): Instead of recording here, replace with a block? Compiled Nodes // compiled form, after walkSelect @@ -423,10 +420,9 @@ func NewSendStmt(pos src.XPos, ch, value Node) *SendStmt { // A SwitchStmt is a switch statement: switch Init; Tag { Cases }. type SwitchStmt struct { miniStmt - Tag Node - Cases []*CaseClause - Label *types.Sym - HasBreak bool + Tag Node + Cases []*CaseClause + Label *types.Sym // TODO(rsc): Instead of recording here, replace with a block? Compiled Nodes // compiled form, after walkSwitch