[dev.regabi] cmd/compile: separate typecheck more cleanly

Abstract the typecheck API a bit more so that it is
easier to move into a new package.

Change-Id: Ia0a0146151fa7f6073113e68a2c3f6e42a5d0ad8
Reviewed-on: https://go-review.googlesource.com/c/go/+/279303
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
Russ Cox 2020-12-21 02:22:42 -05:00
parent 7c8f5356ab
commit 3b12c6dc08
5 changed files with 47 additions and 17 deletions

View file

@ -212,6 +212,10 @@ func Main(archInit func(*Arch)) {
Target = new(ir.Package)
NeedFuncSym = makefuncsym
NeedITab = func(t, iface *types.Type) { itabname(t, iface) }
NeedRuntimeType = addsignat // TODO(rsc): typenamesym for lock?
// initialize types package
// (we need to do this to break dependencies that otherwise
// would lead to import cycles)