diff options
author | Matthew Dempsky <mdempsky@google.com> | 2021-01-12 11:34:00 -0800 |
---|---|---|
committer | Matthew Dempsky <mdempsky@google.com> | 2021-01-12 23:21:58 +0000 |
commit | cd5b74d2dfe6009d55c86e90f6c204e58c229c16 (patch) | |
tree | 1ff0a5bd58acb66cad30cc8314acdac4e0e61601 /src/cmd/compile/internal/typecheck | |
parent | 95acd8121bf76a15ecba0259367dca0efe6d3a77 (diff) | |
download | go-cd5b74d2dfe6009d55c86e90f6c204e58c229c16.tar.gz go-cd5b74d2dfe6009d55c86e90f6c204e58c229c16.zip |
[dev.regabi] cmd/compile: call NeedFuncSym in InitLSym
InitLSym is where we're now generating ABI wrappers, so it seems as
good a place as any to make sure we're generating the degenerate
closure wrappers for declared functions and methods.
Change-Id: I097f34bbcee65dee87a97f9ed6f3f38e4cf2e2b5
Reviewed-on: https://go-review.googlesource.com/c/go/+/283312
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/typecheck')
-rw-r--r-- | src/cmd/compile/internal/typecheck/func.go | 4 | ||||
-rw-r--r-- | src/cmd/compile/internal/typecheck/typecheck.go | 7 |
2 files changed, 0 insertions, 11 deletions
diff --git a/src/cmd/compile/internal/typecheck/func.go b/src/cmd/compile/internal/typecheck/func.go index 12762f7ee8..8f7411daec 100644 --- a/src/cmd/compile/internal/typecheck/func.go +++ b/src/cmd/compile/internal/typecheck/func.go @@ -364,10 +364,6 @@ func tcFunc(n *ir.Func) { n.Nname.SetSym(ir.MethodSym(rcvr.Type, n.Shortname)) Declare(n.Nname, ir.PFUNC) } - - if base.Ctxt.Flag_dynlink && !inimport && n.Nname != nil { - NeedFuncSym(n.Sym()) - } } // tcCall typechecks an OCALL node. diff --git a/src/cmd/compile/internal/typecheck/typecheck.go b/src/cmd/compile/internal/typecheck/typecheck.go index 3fc077b00c..814af59772 100644 --- a/src/cmd/compile/internal/typecheck/typecheck.go +++ b/src/cmd/compile/internal/typecheck/typecheck.go @@ -24,7 +24,6 @@ var inimport bool // set during import var TypecheckAllowed bool var ( - NeedFuncSym = func(*types.Sym) {} NeedITab = func(t, itype *types.Type) {} NeedRuntimeType = func(*types.Type) {} ) @@ -1140,12 +1139,6 @@ func typecheckMethodExpr(n *ir.SelectorExpr) (res ir.Node) { n.SetOp(ir.OMETHEXPR) n.Selection = m n.SetType(NewMethodType(m.Type, n.X.Type())) - - // Issue 25065. Make sure that we emit the symbol for a local method. - if base.Ctxt.Flag_dynlink && !inimport && (t.Sym() == nil || t.Sym().Pkg == types.LocalPkg) { - NeedFuncSym(n.FuncName().Sym()) - } - return n } |