]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: using CONV instead of CONVNOP for interface conversions
authorKeith Randall <khr@golang.org>
Thu, 12 Jan 2017 00:40:24 +0000 (16:40 -0800)
committerKeith Randall <khr@golang.org>
Mon, 6 Feb 2017 20:00:05 +0000 (20:00 +0000)
commit807c80fce346eb2e895dc3de7be8fe0ad70c3894
tree969eae21a97d9dc506bf0dd91dc388f3ead66f6c
parentfdbae7d77ed1d365f1fd6735d234f7c277102f12
cmd/compile: using CONV instead of CONVNOP for interface conversions

We shouldn't use CONVNOP for conversions between two different
nonempty interface types, because we want to update the itab
in those situations.

Fixes #18595

After this CL, we are guaranteed that itabs are unique, that is
there is only one itab per compile-time-type/concrete type pair.
See also the tests in CL 35115 and 35116 which make sure this
invariant holds even for shared libraries and plugins.

Unique itabs are required for CL 34810 (faster type switch code).

R=go1.9

Change-Id: Id27d2e01ded706680965e4cb69d7c7a24ac2161b
Reviewed-on: https://go-review.googlesource.com/35119
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
src/cmd/compile/internal/gc/subr.go
test/fixedbugs/issue18595.go [new file with mode: 0644]