]> Cypherpunks repositories - gostls13.git/commit
exp/ssa: fix bug in bridge method
authorAlan Donovan <adonovan@google.com>
Fri, 1 Mar 2013 17:51:19 +0000 (12:51 -0500)
committerAlan Donovan <adonovan@google.com>
Fri, 1 Mar 2013 17:51:19 +0000 (12:51 -0500)
commit139160eb30b34ebb289c36fcbc97df5952b56dc9
treeb6c250527095eef9159b54654a7c7463e806f3d7
parentf5ceeb94a8054dda97d6331ec689037b4aff6a3a
exp/ssa: fix bug in bridge method

Bridge methods for embedded interfaces were
passing the interface twice: once as receiver,
once as first param.
Covered by $GOROOT/test/ddd.go.

Also:
- invent names ("arg%d") for parameters if missing.
- refactoring: move common code for bridge methods into
  createParams and emitTailCall.

R=gri
CC=golang-dev
https://golang.org/cl/7437047
src/pkg/exp/ssa/builder.go
src/pkg/exp/ssa/emit.go
src/pkg/exp/ssa/promote.go