compiler: process packages in deterministic order
This commit is contained in:
parent
b771d2d024
commit
6f2759be3a
7 changed files with 72 additions and 1 deletions
|
@ -49,7 +49,8 @@ type buildInfo struct {
|
|||
|
||||
// ForEachFile executes fn on each file used in current program.
|
||||
func (c *codegen) ForEachFile(fn func(*ast.File, *types.Package)) {
|
||||
for _, pkg := range c.buildInfo.program.AllPackages {
|
||||
for i := range c.packages {
|
||||
pkg := c.buildInfo.program.Package(c.packages[i])
|
||||
c.typeInfo = &pkg.Info
|
||||
c.currPkg = pkg.Pkg
|
||||
for _, f := range pkg.Files {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue