]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: add Recv0 and Field helper methods for Type
authorMatthew Dempsky <mdempsky@google.com>
Thu, 10 Mar 2016 04:45:18 +0000 (20:45 -0800)
committerMatthew Dempsky <mdempsky@google.com>
Thu, 10 Mar 2016 05:34:37 +0000 (05:34 +0000)
commit0cff505871434711804308152679840505e8a824
tree45bac4803614c317e26e2c788667e64b2248a06d
parentd20b92e07a9462bf7eb43d25389b70528140f7d5
cmd/compile: add Recv0 and Field helper methods for Type

Accessing the n'th field of a struct is fairly common, and in
particular accessing the 0'th field of the receiver parameter list is
very common. Add helper methods for both of these tasks and update
code to make use of them.

Change-Id: I81f551fecdca306b3800636caebcd0dc106f2ed7
Reviewed-on: https://go-review.googlesource.com/20498
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Dave Cheney <dave@cheney.net>
src/cmd/compile/internal/gc/cgen.go
src/cmd/compile/internal/gc/dcl.go
src/cmd/compile/internal/gc/esc.go
src/cmd/compile/internal/gc/export.go
src/cmd/compile/internal/gc/gsubr.go
src/cmd/compile/internal/gc/inl.go
src/cmd/compile/internal/gc/reflect.go
src/cmd/compile/internal/gc/ssa.go
src/cmd/compile/internal/gc/subr.go
src/cmd/compile/internal/gc/type.go
src/cmd/compile/internal/gc/typecheck.go