]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix case in dictPass where OMETHVALUE should become ODOTMETH
authorDan Scales <danscales@google.com>
Fri, 24 Sep 2021 16:13:32 +0000 (09:13 -0700)
committerDan Scales <danscales@google.com>
Fri, 24 Sep 2021 18:11:24 +0000 (18:11 +0000)
commit812c99f86a1b38d50c5c0b501d10b72c3b7dfb95
tree481248b127632b1a03d0944a3a524eca6fc10827
parentb00222fcdd9f2aeb426887b005865eca1aec3631
cmd/compile: fix case in dictPass where OMETHVALUE should become ODOTMETH

When I separate out the dictionary transformations to dictPass, I missed
duplicating a conditional that deals with OMETHVALUE nodes that are
actually called. We create the OMETHVALUE when transforming bounds
function reference (before we know whether that reference will be
called), and we need to call transformDot() again to convert the
OMETHVALUE to ODOTMETH if the reference is actually called (the usual
case). Without this change, we leave the OMETHVALUE in, and extra *-fm
are created and used unncessarily.

Also, fixed a few places where we were missing ir.MarkFunc(), which sets
the class of a function node properly.

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