]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: replace Ctype switches with type switches
authorMatthew Dempsky <mdempsky@google.com>
Fri, 22 Apr 2016 19:27:29 +0000 (12:27 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Fri, 22 Apr 2016 21:34:25 +0000 (21:34 +0000)
commit97360096e5e9fdea06be8c97f32bd83741f68adb
tree79051165f4530f7e048e9c17ef31e4c8ff2ada7f
parent2d342fba78d9cbddb4c8c71bfc0d1044b2e5c58a
cmd/compile: replace Ctype switches with type switches

Instead of switching on Ctype (which internally uses a type switch)
and then scattering lots of type assertions throughout the CTFOO case
clauses, just use type switches directly on the underlying constant
value.

Passes toolstash/buildall.

Change-Id: I9bc172cc67e5f391cddc15539907883b4010689e
Reviewed-on: https://go-review.googlesource.com/22384
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/compile/internal/gc/const.go
src/cmd/compile/internal/gc/cplx.go
src/cmd/compile/internal/gc/dcl.go
src/cmd/compile/internal/gc/fmt.go
src/cmd/compile/internal/gc/gsubr.go
src/cmd/compile/internal/gc/obj.go
src/cmd/compile/internal/gc/parser.go
src/cmd/compile/internal/gc/sinit.go
src/cmd/compile/internal/gc/ssa.go