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
Added test for []*map composite literals containing nested
literal subelements. This required implementing
(reflect.Value).Map{Keys,Index} in ssa/interp.
Plus two minor fixes in ssa/interp.
R=gri
CC=golang-dev
https://golang.org/cl/20470043
This CL makes gotype usable again. Removed -r
(recursive) mode; use go/build to determine
the correct set of Go files when processing
a directory. The -v (verbose) mode now prints
some basic stats (duration, number of files,
lines, and lines/s).
Thoroughly restructured the code.
Applying gotype -v -a . to the go/types directory:
128.94141ms (40 files, 12008 lines, 93127 lines/s)
On a 2.8 GHz Quad-Core Intel Xeon, 800 MHz DDR2 FB-DIMM,
with go/types built with the (interal) debug flag set to
false. There's still quite a bit of room for performance
improvement in all parts of the code since no tuning has
been done.
R=golang-dev, adonovan
CC=golang-dev
https://golang.org/cl/19930043
This makes imports independent of the process's working
directory. (Perhaps this was a feature, but I haven't found a
situation in which it actually works.)
R=gri
CC=golang-dev
https://golang.org/cl/19420043