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 |
||
---|---|---|
astutil | ||
blog | ||
call | ||
cmd | ||
cover | ||
dashboard | ||
go | ||
godoc | ||
importer | ||
imports | ||
oracle | ||
playground | ||
pointer | ||
present | ||
ssa | ||
.hgignore | ||
AUTHORS | ||
CONTRIBUTORS | ||
LICENSE | ||
PATENTS | ||
README | ||
codereview.cfg |
README
This subrepository holds the source for various packages and tools that support the Go programming language. Some of the tools, godoc and vet for example, are included in binary Go distributions. Others, including the Go oracle and the test coverage tool, can be fetched with "go get". Packages include a type-checker for Go and an implementation of the Static Single Assignment form (SSA) representation for Go programs. To submit changes to this repository, see http://golang.org/doc/contribute.html.