CL 410342 removed package height, but still needs to keep writing out 0
for iexport for compatibility with existing importers. With Unified IR,
we don't have to, so get rid of the package height completely.
Change-Id: I84a285cbaddd7bb0833d45a24a6818231b4d2b71
Reviewed-on: https://go-review.googlesource.com/c/go/+/411014
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
}
name := r.String()
- _ = r.Len() // was package height, but not necessary anymore.
-
pkg := types2.NewPackage(path, name)
r.p.imports[path] = pkg
}
name := r.String()
- _ = r.Len() // was package height, but not necessary anymore.
pkg := types.NewPkg(path, "")
base.Assertf(path != "builtin" && path != "unsafe", "unexpected path for user-defined package: %q", path)
w.String(path)
w.String(pkg.Name())
- w.Len(0) // was package height, but not necessary anymore.
w.Len(len(pkg.Imports()))
for _, imp := range pkg.Imports() {
}
name := r.String()
- height := r.Len()
- // Was: "pkg := types.NewPackageHeight(path, name, height)"
- pkg, _ := types.NewPackage(path, name), height
+ pkg := types.NewPackage(path, name)
r.p.imports[path] = pkg
imports := make([]*types.Package, r.Len())