go.tools/go/types: combine Info.{Types,Values} maps.
This results in significant improvement to type-checking time:
it reduces by 4% the entire running time of ssa/stdlib_test
(GOMAXPROCS=8, n=7).
LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/57770043
diff --git a/go/loader/loader.go b/go/loader/loader.go
index cf5d914..06c2603 100644
--- a/go/loader/loader.go
+++ b/go/loader/loader.go
@@ -107,7 +107,6 @@
"strings"
"code.google.com/p/go.tools/astutil"
- "code.google.com/p/go.tools/go/exact"
"code.google.com/p/go.tools/go/gcimporter"
"code.google.com/p/go.tools/go/types"
)
@@ -620,8 +619,7 @@
info := &PackageInfo{
Files: files,
Info: types.Info{
- Types: make(map[ast.Expr]types.Type),
- Values: make(map[ast.Expr]exact.Value),
+ Types: make(map[ast.Expr]types.TypeAndValue),
Objects: make(map[*ast.Ident]types.Object),
Implicits: make(map[ast.Node]types.Object),
Scopes: make(map[ast.Node]*types.Scope),