1
0
mirror of https://github.com/golang/go synced 2024-11-19 01:54:39 -07:00
go/oracle
Alan Donovan ced954c167 go.tools/go/types: split Info.Objects map into Defs and Uses.
An identifier X in anonymous struct field struct{X} is both a
definition of a field (*Var) and reference to a type
(*TypeName).  Now that we have split the map, we can capture
both of these aspects.

Interestingly, every client but one was going to extra effort
to iterate over just the uses or just the defs; this
simplifies them.

Also, fix two bug related to tagless switches:
- An entry was being recorded in the Object map for a piece of
  synthetic syntax.
- The "true" identifier was being looked up in the current scope,
  which allowed perverse users to locally redefine it.  Now
  we use the bool (not untyped boolean) constant true, per the
  consequent clarification of the spec (issue 7404).

+ tests.

Fixes golang/go#7276

LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/68270044
2014-02-27 13:21:59 -05:00
..
serial go.tools/oracle: implements: now shows whole-program implements relation for selected type. 2013-12-13 18:00:55 -05:00
testdata/src go.tools/oracle: optionally restrict 'callgraph' query to a single package. 2014-02-21 10:46:02 -05:00
callees.go go.tools/oracle: optionally restrict 'callgraph' query to a single package. 2014-02-21 10:46:02 -05:00
callers.go go.tools/oracle: optionally restrict 'callgraph' query to a single package. 2014-02-21 10:46:02 -05:00
callgraph.go go.tools/oracle: optionally restrict 'callgraph' query to a single package. 2014-02-21 10:46:02 -05:00
callstack.go go.tools/oracle: optionally restrict 'callgraph' query to a single package. 2014-02-21 10:46:02 -05:00
definition.go go.tools/oracle: improvements to command set and performance. 2013-12-13 10:04:55 -05:00
describe.go go.tools/go/types/typeutil: new package for type utilities. 2014-02-19 13:32:36 -05:00
freevars.go go.tools/oracle: improvements to command set and performance. 2013-12-13 10:04:55 -05:00
implements.go go.tools/go/types: split Info.Objects map into Defs and Uses. 2014-02-27 13:21:59 -05:00
oracle_test.go go.tools/oracle: fix TestOracle on Plan 9 2014-02-21 21:53:57 +01:00
oracle.go go.tools/oracle: optionally restrict 'callgraph' query to a single package. 2014-02-21 10:46:02 -05:00
peers.go go.tools/go/pointer: remove context-sensitivity from API. 2014-02-20 11:35:09 -05:00
pointsto.go go.tools/go/pointer: remove context-sensitivity from API. 2014-02-20 11:35:09 -05:00
pos.go go.tools/oracle: improvements to command set and performance. 2013-12-13 10:04:55 -05:00
referrers.go go.tools/go/types: split Info.Objects map into Defs and Uses. 2014-02-27 13:21:59 -05:00
TODO go.tools/oracle: implements: now shows whole-program implements relation for selected type. 2013-12-13 18:00:55 -05:00
what.go go.tools/oracle: implements: now shows whole-program implements relation for selected type. 2013-12-13 18:00:55 -05:00