]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.regabi] cmd/compile: cleanup for concrete types - mop-up
authorRuss Cox <rsc@golang.org>
Thu, 10 Dec 2020 23:48:33 +0000 (18:48 -0500)
committerRuss Cox <rsc@golang.org>
Thu, 17 Dec 2020 04:43:53 +0000 (04:43 +0000)
commit9c384e881e28d322b854ac702ce8f052868f5f41
tree4a066b7c256bc8814818a8272ec4f3546bfd66cd
parentbe64c8becebace2304e6c16408f6988d1da55900
[dev.regabi] cmd/compile: cleanup for concrete types - mop-up

An automated rewrite will add concrete type assertions after
a test of n.Op(), when n can be safely type-asserted
(meaning, n is not reassigned a different type, n is not reassigned
and then used outside the scope of the type assertion,
and so on).

This sequence of CLs handles the code that the automated
rewrite does not: adding specific types to function arguments,
adjusting code not to call n.Left() etc when n may have multiple
representations, and so on.

This CL handles all the little files that are left.

Passes buildall w/ toolstash -cmp.

Change-Id: I6588c92dbbdd37342a77b365d70e02134a033d2a
Reviewed-on: https://go-review.googlesource.com/c/go/+/277932
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
15 files changed:
src/cmd/compile/internal/gc/align.go
src/cmd/compile/internal/gc/closure.go
src/cmd/compile/internal/gc/dcl.go
src/cmd/compile/internal/gc/embed.go
src/cmd/compile/internal/gc/export.go
src/cmd/compile/internal/gc/gen.go
src/cmd/compile/internal/gc/init.go
src/cmd/compile/internal/gc/initorder.go
src/cmd/compile/internal/gc/main.go
src/cmd/compile/internal/gc/reflect.go
src/cmd/compile/internal/gc/scc.go
src/cmd/compile/internal/gc/subr.go
src/cmd/compile/internal/gc/typecheck.go
src/cmd/compile/internal/gc/universe.go
src/cmd/compile/internal/gc/unsafe.go