Previously you had to describe a type to get this information,
which required two queries, and the need for this query is
extremely common.
Change-Id: I1d1d5b45fead60ca8719ddc302eee47d9f10a375
Reviewed-on: https://go-review.googlesource.com/19501
Reviewed-by: Michael Matloob <matloob@golang.org>
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>
Also, qualify field and method types relative to the defining package,
not the query package.
Change-Id: If65d2a4c2fd60e51d0d34e44000954e95106972e
Reviewed-on: https://go-review.googlesource.com/19495
Reviewed-by: Michael Matloob <matloob@golang.org>
-pos is now a positional argument; -scope is now a flag.
Tidy up usage message.
Update Vim and Emacs scripts and test
Remove call to GOMAXPROCS.
Use log.{SetPrefix,SetFlags} and Fatalf
Change-Id: I3786ed83aecb17d622b29d2a538a374f813f0adc
Reviewed-on: https://go-review.googlesource.com/19438
Reviewed-by: Michael Matloob <matloob@golang.org>