Obviously in that mode, we can't correctly diagnose such
errors, so we shouldn't attempt it (and emit false positives).
R=gri
CC=golang-dev
https://golang.org/cl/41080043
When fetching repos it is not uncommon for a 500 or 503 to be returned
from code.google.com. When this happens, log the error and continue so
that we try again later, rather than treating this as fatal.
R=adg, dvyukov
CC=golang-dev
https://golang.org/cl/38720044
This improves both performance (most calls are static) and
precision (e.g. for static calls in dead code).
Also, break callees() function into smaller ones.
R=crawshaw
CC=golang-dev
https://golang.org/cl/38740045
This avoids leaking nodeids into client code before the
analysis has had a chance to run the (forthcoming) constraint
optimizer, which renumbers them.
R=crawshaw
CC=golang-dev
https://golang.org/cl/39410043
This change is a really nasty hack to preserve the magic header
across requests. The nasty hack will go away once we refactor these
tests to use the new "appengine/aetest" package instead.
R=golang-dev, dvyukov
CC=golang-dev
https://golang.org/cl/39230043
Using a type containing a sync type directly
in a function call (whether as a receiver,
a param, or a return value) is an easy way
to accidentally copy a lock or other sync primitive.
Check for it.
The test as implemented does not provide 100%
coverage; see the discussion near the bottom of
testdata/copylock.go for shortcomings.
Fixesgolang/go#6729.
R=adg, r, dsymonds
CC=golang-dev
https://golang.org/cl/23420043
(Elminate premature abstraction.)
The test probes used Pointer!=nil for the "is pointerlike"
predicate. Now that Pointer is a struct, they check the type
of the expression, which is more accurate. Two probes on
non-pointerlike values have beem removed.
R=crawshaw
CC=golang-dev
https://golang.org/cl/38420043
New APIs:
(*BasicBlock).{Idom,Dominees,Dominates}
(*Function).DomPreorder
Messy but systematic refactoring of domNode:
- renamed "domInfo".
- embedded directly in BasicBlock, not as pointer. Block field removed.
- Level field removed; was unused.
- Working state of LT algorithm now in its own type.
{semi,parent,ancestor} fields moved into it.
- remaining fields made private; accessors added.
- use 32-bit ints for pre/postorder numbers.
- allocate LT working space (5 copies of fn.Blocks) contiguously.
dom.go is simpler but somewhat more verbose.
Also:
- we always build the domtree now---yet memory usage is down 5%.
- number the Recover block too.
- add sanity check for DomPreorder.
R=gri
CC=golang-dev
https://golang.org/cl/37230043
This allows the creation of URLs to lines of source code with a query
term highlighted without assuming godoc source code URL parameters.
Needed for interfacing with other source code viewing servers.
R=bradfitz
CC=golang-dev
https://golang.org/cl/34200043
Split the profile parsing code out of cmd/cover into
a reusable package, to support third-party coverage
tools.
R=golang-dev, r, adg
CC=golang-dev
https://golang.org/cl/36050045
This test generates a program that declares the constant
elements of an n*n Hilbert matrix, its inverse, and the
constant elements of the explicit product of the two.
The product should be the identity matrix; that check is
also expressed as a constant expression. Type-checking
verifies that the product is indeed the identity matrix
by asserting the result of the identity check (using the
assert built-in which is available for type-check tests).
The test is run for n = 5. Other values can be tested via
the -H flag, say: go test -run=Hilbert -H=100
The generated program can be written to a file for testing
the constant arithmetic of a compiler: go test -out=test.go
Because of the mathematically precise constant arithmetic
of go/types, this test should always succeed and is only
limited by the size of the matrix. It does run successfully
from n = 0 to values larger than 100.
The Hilbert matrix is famous for being ill-conditioned and
thus exposes arithmetic imprecision very quickly. The gc
compiler only produces a correct result for n = 0 (trivially),
and n = 1 at the moment.
R=adonovan, rsc
CC=golang-dev
https://golang.org/cl/35840043
The benchmarks don't permit clear-cut apples-to-apples
comparisons since they depend on the very source code
they are testing. But they do give an indication of
the approximate performance - as a sanity test.
Using 3 different code bases makes it apparent that
there's some difference in performance per code base;
i.e., the lines/s speed varies pretty strongly. This
may be due to setup costs, or other issues. We should
investigate eventually.
R=adonovan
CC=golang-dev
https://golang.org/cl/30650043
Cause: emitExtract requires a type for each component of the
receive tuple; blank supplies no such type.
Solution: remove type parameter for emitExtract as it is no
longer needed: since rev b75cc03b4a56 it is always identical
to the tuple.Type().At(index).
+ tests.
Fixesgolang/go#6806.
R=gri, gri
CC=axwalk, golang-dev
https://golang.org/cl/30410043
This removes about 5% of φ-nodes in one large program
and eliminates many zero-value constants.
(This does cause some Idents to no longer map to an ssa.Value.
This is observable in the oracle, whose tests are here updated.)
R=gri, gri
CC=golang-dev
https://golang.org/cl/26980043
Add explicit options to Corpus to control search indexing of documentation, Go source code, and full-text.
R=bradfitz, r
CC=golang-dev
https://golang.org/cl/24190043
Users should be familiar with the sizes of all other types.
Currently we assume amd64 (as do other parts of the oracle,
e.g. go/build tags). Will parameterize later.
R=crawshaw
CC=golang-dev, gri
https://golang.org/cl/29710043
Also: Use defer to make sure scopes are always closed
even in case of early exits via bailout (and don't cause
an imbalanced scope error in debug mode).
R=adonovan, gri
CC=golang-dev
https://golang.org/cl/29300043
- consolidate them in (expr|type)string[_test].go
- support for printing all ast.Expr
- fix printing of type: chan (<-chan int) (parentheses)
- more consistent names, comments, and exports
R=adonovan
CC=golang-dev
https://golang.org/cl/28680043
Tests will still pass because it's marked as known broken,
but it will log the unexpected for now.
R=golang-dev, crawshaw
CC=golang-dev
https://golang.org/cl/27330043