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
- Info.InitOrder now provides list of Initializers
(vars + init expr), handling n:1 decls and blank
identifiers
- added respective API test
- cycles detected through function "mentions"
Missing: cycles through method "mentions" and via
closures
R=adonovan
CC=golang-dev
https://golang.org/cl/21810043
On big corpuses, the indexer was spending most of its time waiting
for filesystem operations (especially with network filesystems)
and not actually indexing. This keeps the filesystem busy and indexer
running in different goroutines.
Also, add a hook to let godoc hosts disable indexing of certain
directories.
And finally, start adding tests for godoc, which required
fleshing out (and testing) the mapfs code.
R=golang-dev, adg, bgarcia
CC=golang-dev
https://golang.org/cl/21520045
The symbolic names such as NOSPLIT for annotations on the TEXT
directive appeared after vet started checking .s files. This CL tweaks
the regular expression to allow CAPITALS and the symbols | and +
as well as digits in that field, and interprets NOSPLIT as equivalent
to 7 in that field. All magic.
Fixesgolang/go#6695
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/18700044
Missing:
- dependencies via functions (incl. closures and methods)
- more tests (incl. API test)
R=adonovan
CC=golang-dev
https://golang.org/cl/20510043