tools/go/ssa
Alan Donovan aa46a01996 go/ssa/ssautil: add AllPackages method
In go1.10, go/packages falls back to loading all packages
from source but not typechecking function bodies for imports.
The ssautil.Packages function would nonetheless provide
the partially-typed ASTs to the SSA builder, which would crash.
Now Packages only passes syntax trees to the SSA builder for
the initial packages, which are the only ones guaranteed to be
fully typed.

It is impossible to discern whether the caller of Packages intends to
build SSA code for dependencies, as in some clients such as
cmd/callgraph, so we add a new function, AllPackages, that expresses
this intent.

Fixes golang/go#28106

Change-Id: I6a88b7c7545e9de90b61f5bee0e6de3d2e21b548
Reviewed-on: https://go-review.googlesource.com/c/141686
Reviewed-by: Michael Matloob <matloob@golang.org>
Run-TryBot: Michael Matloob <matloob@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-10-15 18:41:29 +00:00
..
interp go/ssa/interp: skip failing test 2018-09-25 15:50:07 +00:00
ssautil go/ssa/ssautil: add AllPackages method 2018-10-15 18:41:29 +00:00
testdata x/tools/go/ssa: Accept struct conversions that ignore tags 2017-06-02 20:57:42 +00:00
blockopt.go go.tools/go/ssa: don't attempt fusion on single-pred blocks with φ-nodes 2014-04-24 09:08:21 -04:00
builder.go x/tools: remove old renaming imports of go/constant as exact 2018-08-10 17:04:37 +00:00
builder_test.go go/ssa: eliminate dead φ-nodes in cycles 2017-02-22 01:23:56 +00:00
const.go x/tools: remove old renaming imports of go/constant as exact 2018-08-10 17:04:37 +00:00
create.go go/ssa: updates to support go/packages 2018-08-08 20:03:34 +00:00
doc.go go/ssa: updates to support go/packages 2018-08-08 20:03:34 +00:00
dom.go go.tools/go/ssa: use bytes.Buffer instead of io.Writer. 2014-01-28 17:48:10 -05:00
emit.go x/tools/go/ssa: Accept struct conversions that ignore tags 2017-06-02 20:57:42 +00:00
example_test.go go/ssa/ssautil: add AllPackages method 2018-10-15 18:41:29 +00:00
func.go tools: updates for minimum Go version 1.6 2017-02-07 21:06:19 +00:00
identical.go x/tools/go/ssa: Accept struct conversions that ignore tags 2017-06-02 20:57:42 +00:00
identical_17.go x/tools/go/ssa: Accept struct conversions that ignore tags 2017-06-02 20:57:42 +00:00
identical_test.go x/tools/go/ssa: Accept struct conversions that ignore tags 2017-06-02 20:57:42 +00:00
lift.go go/ssa: fix regression in φ-elimination 2017-06-15 18:36:17 +00:00
lvalue.go tools: updates for minimum Go version 1.6 2017-02-07 21:06:19 +00:00
methods.go tools: updates for minimum Go version 1.6 2017-02-07 21:06:19 +00:00
mode.go go/ssa: make *BuilderMode satisfy flag.Value 2016-03-07 22:18:09 +00:00
print.go go/ssa: fix regression in φ-elimination 2017-06-15 18:36:17 +00:00
sanity.go go/ssa: use correct type for variadic parameter in wrapper methods 2018-09-11 13:30:44 +00:00
source.go tools: updates for minimum Go version 1.6 2017-02-07 21:06:19 +00:00
source_test.go x/tools: remove old renaming imports of go/constant as exact 2018-08-10 17:04:37 +00:00
ssa.go x/tools: remove old renaming imports of go/constant as exact 2018-08-10 17:04:37 +00:00
stdlib_test.go go/ssa: avoid no-arg println(), for gccgo compatibility 2016-11-23 22:44:20 +00:00
testmain.go go/ssa: updates to support go/packages 2018-08-08 20:03:34 +00:00
testmain_test.go go/ssa: support custom TestMain functions in test packages 2016-10-19 17:50:59 +00:00
util.go tools: updates for minimum Go version 1.6 2017-02-07 21:06:19 +00:00
wrappers.go go/ssa: use correct type for variadic parameter in wrapper methods 2018-09-11 13:30:44 +00:00