mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.typeparams] cmd/compile: provide scaffolding to get types2 types during noding
Initial setup of types2.Info structure to provide access to types
computed by generic typechecker.
Use -G flag to control compiler phases with new typechecker:
-G (or -G=1) parsing and typechecking ony
-G -G (or -G=2) parsing, typechecking, and noding
-G=3 continue after noding (currently will run old
typechecker again, leading to duplicate errors
Change-Id: I87dd54f7c3773228f288f7a134ac809d9481ca95
Reviewed-on: https://go-review.googlesource.com/c/go/+/274444
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
This commit is contained in:
parent
72cc2353f0
commit
6b4da14dd3
2 changed files with 68 additions and 12 deletions
|
|
@ -229,10 +229,10 @@ func Main(archInit func(*Arch)) {
|
|||
loadsys()
|
||||
|
||||
timings.Start("fe", "parse")
|
||||
lines := parseFiles(flag.Args(), base.Flag.G != 0)
|
||||
lines := parseFiles(flag.Args())
|
||||
timings.Stop()
|
||||
timings.AddEvent(int64(lines), "lines")
|
||||
if base.Flag.G != 0 {
|
||||
if base.Flag.G != 0 && base.Flag.G < 3 {
|
||||
// can only parse generic code for now
|
||||
base.ExitIfErrors()
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue