1
0
mirror of https://github.com/golang/go synced 2024-11-18 19:44:46 -07:00
go/oracle
Alan Donovan d38c09ed22 go.tools/oracle: set AllASTs=true always, and simplify.
Every one of the oracle's query modes needs to have typed ASTs
available, at least transiently, so that the -pos flag can be
interpreted.  (The only mode that doesn't need the -pos flag
is callgraph, but that needs PTA.)  So we hard-code it to true.

This change fixes a bug in the 'implements' query that causes
-pos parsing to fail.  (This wasn't exposed by the tests
because they are degenerate in that the query always occurs in
the main package, which is specified ad-hoc, i.e. as a source
file not an import path.  That's unfortunate, but this
change renders the distinction uninteresting in future.)

R=crawshaw, dominik.honnef
CC=golang-dev
https://golang.org/cl/13334050
2013-09-12 10:55:24 -04:00
..
json go.tools/oracle: new query 'referrers' returns all references to an identifier. 2013-09-10 14:11:42 -04:00
testdata/src go.tools/oracle: describe package: simplify to use only types.Package, not ssa.Package. 2013-09-10 14:19:11 -04:00
callees.go go.tools/oracle: new query 'referrers' returns all references to an identifier. 2013-09-10 14:11:42 -04:00
callers.go go.tools/oracle: new query 'referrers' returns all references to an identifier. 2013-09-10 14:11:42 -04:00
callgraph.go go.tools/oracle: new query 'referrers' returns all references to an identifier. 2013-09-10 14:11:42 -04:00
callstack.go go.tools/oracle: new query 'referrers' returns all references to an identifier. 2013-09-10 14:11:42 -04:00
describe.go go.tools/oracle: describe package: simplify to use only types.Package, not ssa.Package. 2013-09-10 14:19:11 -04:00
freevars.go go.tools/oracle: add option to output results in JSON syntax. 2013-09-03 15:29:02 -04:00
implements.go go.tools/oracle: new query 'referrers' returns all references to an identifier. 2013-09-10 14:11:42 -04:00
oracle_test.go go.tools/oracle: new query 'referrers' returns all references to an identifier. 2013-09-10 14:11:42 -04:00
oracle.go go.tools/oracle: set AllASTs=true always, and simplify. 2013-09-12 10:55:24 -04:00
peers.go go.tools/oracle: describe: query content of lvalues, not their address. 2013-09-09 21:06:25 -04:00
referrers.go go.tools/oracle: new query 'referrers' returns all references to an identifier. 2013-09-10 14:11:42 -04:00