aboutsummaryrefslogtreecommitdiff
path: root/test/codegen/arithmetic.go
diff options
context:
space:
mode:
authorDaniel Martí <mvdan@mvdan.cc>2018-04-08 13:39:10 +0100
committerDaniel Martí <mvdan@mvdan.cc>2018-04-16 00:16:55 +0000
commit2b2348ab143368a35031a814a8d41eb5a437aa33 (patch)
tree690cd50dbea45990b7349f5f149d400fa06cdf12 /test/codegen/arithmetic.go
parentd69760064f85aa19db1c26f86a13c8240682970c (diff)
downloadgo-2b2348ab143368a35031a814a8d41eb5a437aa33.tar.xz
cmd/compile/internal/gc: add some Node methods
Focus on "isfoo" funcs that take a *Node, and conver them to isFoo methods instead. This makes for more idiomatic Go code, and also more readable func names. Found candidates with grep, and applied most changes with sed. The funcs chosen were isgoconst, isnil, and isblank. All had the same signature, func(*Node) bool. While at it, camelCase the isliteral and iszero function names. Don't move these to methods, as they are only used in the backend part of gc, which might one day be split into a separate package. Passes toolstash -cmp on std cmd. Change-Id: I4df081b12d36c46c253167c8841c5a841f1c5a16 Reviewed-on: https://go-review.googlesource.com/105555 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'test/codegen/arithmetic.go')
0 files changed, 0 insertions, 0 deletions