Go to file
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
astutil go.tools: rename packages. 2014-01-16 09:33:58 -05:00
blog go.tools/blog: strip prefix when serving static content 2013-11-08 13:28:32 +11:00
cmd go.tools/go/types: split Info.Objects map into Defs and Uses. 2014-02-27 13:21:59 -05:00
cover go.tools/cover: split parsing code out from cmd/cover 2013-12-03 20:55:21 -08:00
dashboard go.tools/dashboard/builder: fix imported by not used error 2014-02-22 13:24:39 +11:00
go go.tools/go/types: split Info.Objects map into Defs and Uses. 2014-02-27 13:21:59 -05:00
godoc godoc: Remove bogus messages referring to "/target". 2014-02-26 13:21:44 -05:00
imports imports: fix a case where we weren't gofmt-compatible 2014-02-07 17:03:34 -08:00
oracle go.tools/go/types: split Info.Objects map into Defs and Uses. 2014-02-27 13:21:59 -05:00
playground go.tools/playground: parse shebang correctly 2014-02-18 09:44:12 -08:00
present go.tools/present: Remove formatting comments (HL, OMIT) from raw code. 2014-02-25 17:53:00 -08:00
.hgignore .hgignore: add comment setting policy 2013-12-20 16:28:57 -08:00
AUTHORS go.empty: prototype for new subrepository 2012-01-25 14:45:13 -05:00
CONTRIBUTORS go.empty: prototype for new subrepository 2012-01-25 14:45:13 -05:00
LICENSE LICENSE: add 2012-03-17 15:20:58 +11:00
PATENTS go.empty: add PATENTS file to the subrepo. 2012-04-16 11:24:04 +10:00
README go.tools/README: minor correction. 2013-10-29 13:20:58 -04:00
codereview.cfg codereview: switch defaultcc to golang-codereviews 2013-12-20 10:54:33 -05:00

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.