As an optimization, the callers and callstack queries now avoid the relatively costly pointer analysis in some common cases: The callers of a function that is never address-taken can be enumerated directly from the SSA representation. Similarly, the callstack can be computed initially by ignoring dynamic call edges; we run the pointer analysis only if no path is found in this partial callgraph. As a bonus, this also causes the tool to preferentially report all-static callpaths. A callers query on fmt.Errorf now completes in 3 seconds instead of 8, and a callstack query completes in 2 seconds instead of 8. The new code is covered by the existing tests. Change-Id: I777ea07a1cdb6cadcc2a94952f553b6b036e7382 Reviewed-on: https://go-review.googlesource.com/19496 Reviewed-by: Michael Matloob <matloob@golang.org> |
||
---|---|---|
benchmark/parse | ||
blog | ||
cmd | ||
container/intsets | ||
cover | ||
go | ||
godoc | ||
imports | ||
oracle | ||
playground | ||
present | ||
refactor | ||
.gitattributes | ||
.gitignore | ||
AUTHORS | ||
CONTRIBUTING.md | ||
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.