Details:
- use relative (non-qualified) names in more places
- Member interface now has Package(), RelString() methods.
- (*Function).DumpTo: add "# Package: " header.
- Added sanity checks for String functions.
R=gri, gri
CC=golang-dev
https://golang.org/cl/26380043
These are variants of Type.String(), Object.String() that
accept a 'from *Package' argument. If provided, package
qualification is omitted when printing named types belonging
to that package.
This is useful for UIs where a package is implied by context
e.g. ssadump disassembly, oracle output.
+ Test.
R=gri, gri, gordon.klaus
CC=golang-dev
https://golang.org/cl/22190048
The previous code introduced spurious loop-carried
dependencies for variables local to a loop body (for example).
The SSA renaming pass now treats an Alloc instruction like a
Store of the zero value.
Also:
- added regression test
- improved log messages
- made the Store/Load/Alloc cases look more similar.
R=gri, gri
CC=golang-dev
https://golang.org/cl/26750043
- fixed a couple of TODOs
- various cleanups along the way
- adjusted clients
Once submitted, clients of go/types that don't explicitly
specify Config.Import will need to add the extra import:
import _ "code.google.com/p/go.tools/go/gcimporter"
to install the default (gc) importer in go/types.
R=adonovan, gri
CC=golang-dev
https://golang.org/cl/26390043
Also, only examine functions defined in *_test.go files.
Added tests for empty and nonempty behaviour of CreateTestMainPackage.
(Required some surgery to interp_test.)
R=gri, gri
CC=golang-dev
https://golang.org/cl/25570044
Depending on the context, printing only the package name can
be ambiguous or even incorrect since it is valid only within
the environment of a given file's import specs.
(The standard library packages are mostly unique in their last
segment, but this is not the case for proprietary repos.)
R=gri, gri
CC=golang-dev
https://golang.org/cl/26300043
This check is currently done in go/parser as well but
eventually can be removed from there (after Go 1.2).
R=adonovan
CC=golang-dev
https://golang.org/cl/22240045
Performance increase is much smaller than expected;
need to investigate. Possibly, repeatedly (for each
line) accessing file sets from multiple goroutines
(in the scanner) is a bottle neck; or perhaps i/o.
R=adonovan
CC=golang-dev
https://golang.org/cl/23090043
Added sanity check to ensure Operands/Referrers are complete and dual.
Also: unexport Instruction.setBlock (=> no longer user-implementable).
R=gri
CC=golang-dev
https://golang.org/cl/22150043
Initialization cycles need to reported for cycles
that contain variables, even if they don't end in
a variable.
This fixes the last known issue with the existing
std library tests.
R=adonovan, gri
CC=golang-dev
https://golang.org/cl/22200049
This will be used to show the "Run" button for code snippets in go.talks only for Go when running on App Engine.
R=adg, r, iant
CC=golang-dev
https://golang.org/cl/21930047
Lifts the import management utilities from gofix into
a package, so they can be used by goimports.
R=bradfitz
CC=golang-dev
https://golang.org/cl/22430043
The gc compiler is inconsistent how it handles method
"mentions" with respect to initialization cycle detection
(see issue 6703 for details). Pending a spec clarification,
this CL assumes that for a method to be "mentioned", it
must be mentioned as a method expression rather than a
method value (closer in intent to "syntactic" mention).
R=adonovan
CC=golang-dev
https://golang.org/cl/22050044