From 844c0763591e6c01ae2a30a743150be71b6d356f Mon Sep 17 00:00:00 2001 From: Cuong Manh Le Date: Sun, 20 Jun 2021 21:33:54 +0700 Subject: [dev.typeparams] cmd/compile: simplify import* functions CL 280634 remove Sym.Importdef, so ipkg in importsym is not used anymore. So we can remove it from importsym and all other import* functions, which just call importsym internally. Change-Id: I15b9d11c4445dbe40982f7ff2a33a2116705e790 Reviewed-on: https://go-review.googlesource.com/c/go/+/329573 Trust: Cuong Manh Le Run-TryBot: Cuong Manh Le TryBot-Result: Go Bot Reviewed-by: Matthew Dempsky --- src/cmd/compile/internal/typecheck/iimport.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/cmd/compile/internal/typecheck/iimport.go') diff --git a/src/cmd/compile/internal/typecheck/iimport.go b/src/cmd/compile/internal/typecheck/iimport.go index 81f8ea05d9..d94f649a45 100644 --- a/src/cmd/compile/internal/typecheck/iimport.go +++ b/src/cmd/compile/internal/typecheck/iimport.go @@ -294,13 +294,13 @@ func (r *importReader) doDecl(sym *types.Sym) *ir.Name { case 'A': typ := r.typ() - return importalias(r.p.ipkg, pos, sym, typ) + return importalias(pos, sym, typ) case 'C': typ := r.typ() val := r.value(typ) - n := importconst(r.p.ipkg, pos, sym, typ, val) + n := importconst(pos, sym, typ, val) r.constExt(n) return n @@ -311,7 +311,7 @@ func (r *importReader) doDecl(sym *types.Sym) *ir.Name { } typ := r.signature(nil, tparams) - n := importfunc(r.p.ipkg, pos, sym, typ) + n := importfunc(pos, sym, typ) r.funcExt(n) return n @@ -323,7 +323,7 @@ func (r *importReader) doDecl(sym *types.Sym) *ir.Name { // Types can be recursive. We need to setup a stub // declaration before recursing. - n := importtype(r.p.ipkg, pos, sym) + n := importtype(pos, sym) t := n.Type() if rparams != nil { t.SetRParams(rparams) @@ -401,7 +401,7 @@ func (r *importReader) doDecl(sym *types.Sym) *ir.Name { case 'V': typ := r.typ() - n := importvar(r.p.ipkg, pos, sym, typ) + n := importvar(pos, sym, typ) r.varExt(n) return n -- cgit v1.2.3-54-g00ecf