tools/go
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
..
callgraph go.tools/oracle: optionally restrict 'callgraph' query to a single package. 2014-02-21 10:46:02 -05:00
exact go.tools/go/types: minor cleanups 2014-01-14 21:04:35 -08:00
gccgoimporter go.tools/go/*: fix breakage caused by removal of types.NewPackage parameter. 2014-02-20 20:11:00 -05:00
gcimporter go.tools/go/types: internal cleanups 2014-02-20 14:52:21 -08:00
importer go.tools/go/*: fix breakage caused by removal of types.NewPackage parameter. 2014-02-20 20:11:00 -05:00
loader go.tools/go/types: split Info.Objects map into Defs and Uses. 2014-02-27 13:21:59 -05:00
pointer go.tools/go/callgraph: simplifications to API. 2014-02-20 11:57:48 -05:00
ssa go.tools/go/types: split Info.Objects map into Defs and Uses. 2014-02-27 13:21:59 -05:00
types go.tools/go/types: split Info.Objects map into Defs and Uses. 2014-02-27 13:21:59 -05:00
vcs go.tools/vcs: allow compilation with go 1.0 2013-10-04 11:46:57 +10:00