]> Cypherpunks repositories - gostls13.git/commit
[dev.typeparams] cmd/compile: separate out creating instantiations from creating...
authorDan Scales <danscales@google.com>
Fri, 2 Jul 2021 19:32:38 +0000 (12:32 -0700)
committerDan Scales <danscales@google.com>
Fri, 2 Jul 2021 21:12:15 +0000 (21:12 +0000)
commitb994cc69e05d7821a08f75619f356ecfe5ca9b43
treee79f6e6dd03a39d8583bcbcd7fb48e75773d5e51
parent6dec18cc75021bfbfac267941a567b257721208b
[dev.typeparams] cmd/compile:  separate out creating instantiations from creating dictionaries

We often need to create a function/method instantiation, but not a
dictionary, because the call to the instantiation will be using a
sub-dictionary. Also, main dictionaries are only need for concrete,
non-gcshape types, whereas instantiations will be for gcshape types (or
concrete types, for strict stenciling).

Created a helper function getDictOrSubdict() to reduce duplicated code.
Also, moved gfGetGfInfo() call in getDictionarySym() inside conditional
where it is needed, to avoid extra work when dictionary has already been
created.

Change-Id: I06587cb2ddc77de2f991e9f9eaf462d2c5a5d45e
Reviewed-on: https://go-review.googlesource.com/c/go/+/332550
Trust: Dan Scales <danscales@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/noder/irgen.go
src/cmd/compile/internal/noder/stencil.go