]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: remove If type in rulegen
authorDaniel Martí <mvdan@mvdan.cc>
Sun, 26 Apr 2020 20:44:36 +0000 (21:44 +0100)
committerDaniel Martí <mvdan@mvdan.cc>
Mon, 27 Apr 2020 17:08:03 +0000 (17:08 +0000)
commit1cf357981ee9ec838555585d52f86ca60097c6b1
tree843607bc66bc4cbacc233a2397e6252bdb3e4167
parent20ed14286103d444f2b539966cb8231f4751d3b4
cmd/compile: remove If type in rulegen

We only generate if statements via CondBreak, which is nice as the
control flow is simple and easy to work with. It seems like the If type
was added but never used, so remove it to avoid confusion.

We had a TODO about replacing CondBreak with If instead. I gave that a
try, but it doesn't seem worth the effort. The code gets more complex
and we don't really win anything in return.

While at it, don't use op strings as format strings in exprf. This
doesn't cause any issue at the moment, but it's best to be explicit
about the operator not containing any formatting verbs.

Change-Id: Ib59ad72d3628bf91594efc609e222232ad1e8748
Reviewed-on: https://go-review.googlesource.com/c/go/+/230257
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ssa/gen/rulegen.go