]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: represent derived types with ir.DynamicType in unified IR
authorMatthew Dempsky <mdempsky@google.com>
Mon, 7 Mar 2022 07:47:27 +0000 (23:47 -0800)
committerMatthew Dempsky <mdempsky@google.com>
Mon, 7 Mar 2022 13:47:51 +0000 (13:47 +0000)
commit0e2f1abf5b764a4a3928a2f4f050144063c46a93
tree4f4b62491d656e00b050bc76049b9237ca16c6f5
parent8893175c3b5267f1eb70c518b5de6f03037c4d03
cmd/compile: represent derived types with ir.DynamicType in unified IR

This CL switches unified IR to using ir.DynamicType for derived
types. This has an immediate effect of fixing compilation of generic
code that when fully stenciled results in statically invalid type
assertions. This does require updating typecheck to expect
ODYNAMICTYPE in type switches, but this is straightforward to
implement.

For now, we still statically resolve the runtime type (or itab)
pointer. However, a subsequent CL will allow reading these pointers
from the runtime dictionary.

Change-Id: I1666678fcc588bc9cb8b97871bd02b9059848e6d
Reviewed-on: https://go-review.googlesource.com/c/go/+/390336
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
src/cmd/compile/internal/noder/reader.go
src/cmd/compile/internal/noder/writer.go
src/cmd/compile/internal/reflectdata/reflect.go
src/cmd/compile/internal/typecheck/stmt.go
src/internal/pkgbits/sync.go
src/internal/pkgbits/syncmarker_string.go
test/run.go