mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.regabi] cmd/compile: some more manual shuffling
More minor reshuffling of passes. Passes toolstash -cmp. Change-Id: I22633b3741f668fc5ee8579d7d610035ed57df1f Reviewed-on: https://go-review.googlesource.com/c/go/+/280975 Trust: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
This commit is contained in:
parent
0f1d2129c4
commit
3a4474cdfd
7 changed files with 29 additions and 33 deletions
|
|
@ -25,6 +25,20 @@ import (
|
|||
"cmd/internal/src"
|
||||
)
|
||||
|
||||
func LoadPackage(filenames []string) {
|
||||
base.Timer.Start("fe", "parse")
|
||||
lines := ParseFiles(filenames)
|
||||
base.Timer.Stop()
|
||||
base.Timer.AddEvent(int64(lines), "lines")
|
||||
|
||||
// Typecheck.
|
||||
Package()
|
||||
|
||||
// With all user code typechecked, it's now safe to verify unused dot imports.
|
||||
CheckDotImports()
|
||||
base.ExitIfErrors()
|
||||
}
|
||||
|
||||
// ParseFiles concurrently parses files into *syntax.File structures.
|
||||
// Each declaration in every *syntax.File is converted to a syntax tree
|
||||
// and its root represented by *Node is appended to Target.Decls.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue