tools/go/ssa
Alan Donovan 7ce0cddaad go/ssa: synthesize Go 1.8-compatible test main package
...to match the new interface between "go test" and the standard testing
package.

Rather than generate SSA code directly, which was tricky and fragile, we
now generate source just as "go test" does, type-check it, and build an
SSA package from it.  crawshaw suggested I do this in the very first
version of testmain.go, but at the time I believed it to be infeasible.

The testMainStartBodyHook mechanism has gone away; installations that
needed it can now achieve the same results more easily by overriding the
templates.

Tested with Go 1.6, 1.7 and 1.8.

Fixes golang/go#17722

Change-Id: I3ffd25f01157f6fb7a39acd18af46f17e9c07b99
Reviewed-on: https://go-review.googlesource.com/32888
Reviewed-by: Robert Griesemer <gri@golang.org>
2016-11-08 18:33:05 +00:00
..
interp go/ssa/interp: handle nil *hashmap cleanly 2016-11-04 21:49:12 +00:00
ssautil go/ssa: support custom TestMain functions in test packages 2016-10-19 17:50:59 +00:00
testdata go/ssa: emit DebugRefs for x, y = z() assignments 2015-10-23 10:25:05 +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 go/ssa: remove go1.8 tagged files 2016-11-04 21:18:10 +00:00
builder_test.go go/ssa: reduce set of expected indirect imports 2016-04-28 21:42:55 +00:00
const.go tools: switch to standard go/types at tip 2016-01-06 22:15:26 +00:00
const15.go tools: switch to standard go/types at tip 2016-01-06 22:15:26 +00:00
create.go go/ssa: remove go1.8 tagged files 2016-11-04 21:18:10 +00:00
doc.go go/ssa: update package doc to mention ssautil.CreateProgram 2015-07-27 18:48:45 +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 tools: switch to standard go/types at tip 2016-01-06 22:15:26 +00:00
example_test.go tools: switch to standard go/types at tip 2016-01-06 22:15:26 +00:00
func.go tools: switch to standard go/types at tip 2016-01-06 22:15:26 +00:00
lift.go tools: switch to standard go/types at tip 2016-01-06 22:15:26 +00:00
lvalue.go tools: switch to standard go/types at tip 2016-01-06 22:15:26 +00:00
methods.go tools: switch to standard go/types at tip 2016-01-06 22:15:26 +00:00
mode.go go/ssa: make *BuilderMode satisfy flag.Value 2016-03-07 22:18:09 +00:00
print.go tools: switch to standard go/types at tip 2016-01-06 22:15:26 +00:00
sanity.go tools: switch to standard go/types at tip 2016-01-06 22:15:26 +00:00
source.go tools: switch to standard go/types at tip 2016-01-06 22:15:26 +00:00
source_test.go tools: switch to standard go/types at tip 2016-01-06 22:15:26 +00:00
ssa.go tools: switch to standard go/types at tip 2016-01-06 22:15:26 +00:00
stdlib_test.go all: skip slow tests in short mode 2016-01-28 00:14:01 +00:00
testmain.go go/ssa: synthesize Go 1.8-compatible test main package 2016-11-08 18:33:05 +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: switch to standard go/types at tip 2016-01-06 22:15:26 +00:00
wrappers.go tools: switch to standard go/types at tip 2016-01-06 22:15:26 +00:00