tools/ssa
Alan Donovan e8afbfad8c go.tools/importer: API rethink.
The Importer type has been replaced with Config and Program.

Clients populate a Config, directly or more usually via
convenience functions.  They then call its Load() method to do
all of the typechecking and transitive-closure computation.

ssa.NewProgram and ssa.CreatePackages have been fused into
ssa.Create, which now cannot fail, since (*Config).Load()
reports all type errors.

Also:
- The addition of an ssa.GlobalDebug builder mode flag
  eliminates a loop-over-packages repeated in many clients.
- PackageInfo.Err flag unexported.  Clients never see bad infos now.
- cmd/ssadump: now only looks for func "main" in package "main".
- importsOf deleted, was dead code.

STILL TODO:
- ParseFile seems like API creep (though it's convenient)
  and CreateFromFiles is dangerous (w.r.t. FileSet identity).
  Need to think more...
- the need for clients to rely on elementwise correspondence
  of Config.CreatePkgs and Program.Created is a little sad.
- The command-line interface has not changed.
  That will happen in a follow-up.
  r recommends using a repeated flag: -package p -package q ...

R=gri
CC=axwalk, frederik.zipp, golang-codereviews
https://golang.org/cl/49530047
2014-01-15 21:37:55 -05:00
..
interp go.tools/importer: API rethink. 2014-01-15 21:37:55 -05:00
ssautil go.tools/importer: API rethink. 2014-01-15 21:37:55 -05:00
testdata go.tools/ssa: fix crash on (new)(T) due to missing unparen() call. 2013-10-29 11:07:09 -04:00
blockopt.go go.tools/ssa: populate Function.Referrers(), for anon functions. 2013-11-07 10:08:51 -05:00
builder.go go.tools/ssa: fix crash in SSA builder when using GCImporter to satisfy imports (ssadump -build=G). 2014-01-09 14:11:54 -05:00
builder_test.go go.tools/importer: API rethink. 2014-01-15 21:37:55 -05:00
const.go go.tools/ssa: skip redundant identifier qualification in package dump. 2014-01-15 13:51:50 -05:00
create.go go.tools/importer: API rethink. 2014-01-15 21:37:55 -05:00
doc.go go.tools/importer: API rethink. 2014-01-15 21:37:55 -05:00
dom.go go.tools/importer: move PathEnclosingInterval to package astutil. 2013-12-09 09:36:29 -05:00
emit.go go.tools/ssa: eliminate (non-nil) slice constants. 2014-01-13 16:45:46 -05:00
example_test.go go.tools/importer: API rethink. 2014-01-15 21:37:55 -05:00
func.go go.tools/ssa: expose dominator tree of control-flow graph in API. 2013-12-05 09:50:18 -05:00
lift.go go.tools/ssa: fix bug: lifting pass invalidated Referrers info for DebugRef's X operand. 2014-01-10 17:10:12 -05:00
lvalue.go go.tools/ssa: record lvalue/rvalue distinction precisely in DebugRef. 2013-10-24 18:31:50 -04:00
print.go go.tools/ssa: skip redundant identifier qualification in package dump. 2014-01-15 13:51:50 -05:00
promote.go go.tools/ssa: two fixes to CallCommon. 2014-01-07 13:31:05 -05:00
sanity.go go.tools/ssa: two fixes to CallCommon. 2014-01-07 13:31:05 -05:00
source.go go.tools/ssa: new Function.Syntax() returns the declaring AST (debug mode) or just the Pos/End of the function's extent (otherwise). 2013-10-27 10:55:21 -04:00
source_test.go go.tools/importer: API rethink. 2014-01-15 21:37:55 -05:00
ssa.go go.tools/importer: API rethink. 2014-01-15 21:37:55 -05:00
stdlib_test.go go.tools/importer: API rethink. 2014-01-15 21:37:55 -05:00
testmain.go go.tools/ssa: don't synthesize an empty "testmain" package. 2013-11-13 16:05:13 -05:00
util.go go.tools/ssa: use correct word size for GOARCH during type checking, interpretation. 2014-01-08 14:46:17 -05:00