aboutsummaryrefslogtreecommitdiff
path: root/src/runtime
diff options
context:
space:
mode:
authorDan Scales <danscales@google.com>2021-12-21 07:59:16 -0800
committerDan Scales <danscales@google.com>2022-01-04 22:27:20 +0000
commitf154f8b5bb16833139bb171371691150b1bd9cd5 (patch)
treea455e620e88ad12b1f45e40d161c0e4304f1e4d4 /src/runtime
parente39ab9b01cbbdac0750fc13fa8fb1de4f07aa79a (diff)
downloadgo-f154f8b5bb16833139bb171371691150b1bd9cd5.tar.xz
cmd/compile: save selector/inst info for generic method/function calls
In the dict info, we need to save the SelectorExpr of a generic method call when making its sub-dictionary entry. The generic method call will eventually be transformed into a function call on the method shape instantiation, so we may not always have the selector info available when we need it to create a dictionary. We use this SelectorExpr as needed if the relevant call node has already been transformed. Similarly, we save the InstExpr of generic function calls, since the InstExpr will be dropped when the function call is transformed to a call to a shape instantiation. We use this InstExpr if the relevant function call has already been transformed. Added an extra generic function Some2 and a call to it from Some that exercises the generic function case. The existing test already tests the method call case. Fixes #50264 Change-Id: I2c7c7d79a8e33ca36a5e88e64e913c57500c97f9 Reviewed-on: https://go-review.googlesource.com/c/go/+/373754 Reviewed-by: Keith Randall <khr@golang.org> Trust: Dan Scales <danscales@google.com> Run-TryBot: Dan Scales <danscales@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/runtime')
0 files changed, 0 insertions, 0 deletions