]> Cypherpunks repositories - gostls13.git/commit
[dev.unified] cmd/compile: avoid reflectType in ssagen
authorMatthew Dempsky <mdempsky@google.com>
Tue, 21 Jun 2022 05:28:15 +0000 (22:28 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Tue, 21 Jun 2022 23:51:26 +0000 (23:51 +0000)
commit5e0258c700cba33db1a41806ff328a9c3f42d4da
tree5b3bd14b589e3e99197b29082a82369d1155c79a
parent93833cd5d8c8b35cd94f743c73cd18712531de4b
[dev.unified] cmd/compile: avoid reflectType in ssagen

This CL adds alternate code paths for the frontend to plumb through
rtypes to package ssagen, so the latter doesn't have to use
reflectType (which in general will only have access to shape types).

Note: This CL doesn't yet plumb through the rtypes for variables that
escape to the heap. However, those rtypes are only used for calling
runtime.newobject, and the status quo as of Go 1.18 is already to use
shape rtypes for most runtime.newobject calls. (Longer term though, I
would like to get rid of shape rtypes altogether.)

Passes toolstash -cmp.

Updates #53276.

Change-Id: I76a281eca8300de2e701fbac89ead32f8568a5f2
Reviewed-on: https://go-review.googlesource.com/c/go/+/413357
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/ir/expr.go
src/cmd/compile/internal/ssagen/ssa.go