We want to make an if look like two blocks and have the coverage
report for the else block decorate the "else" keyword with the right
color. To do this, we adjust the apparent starting point of the else
block to include the "else".
The previous code assumed the way to do this was to move the
width of "else " backwards from the else block's opening brace, but
that assumes there is a space there. Instead, we now just start the
else block exactly at the end of the if block. Simpler, cleaner, and
fixes a bug.
Fixesgolang/go#8557.
LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/127620043
This is so that we don't corrupt our commit history with reports
from old builders, after the migration to the latest build dashboard.
LGTM=dvyukov
R=dvyukov
CC=golang-codereviews
https://golang.org/cl/130300043
Currently for every benchmark/metric we show all changes for all builders x procs.
With 4 builders and 5 procs, that's 20 changes (20 red/green boxes in a single cell).
Instead show only maximum change for every benchmark/metric.
This significantly reduces clutter in UI.
When you click on the red/green box, you can see the rest of the changes.
LGTM=adg
R=adg
CC=golang-codereviews
https://golang.org/cl/126430043
Currently appspot logs say:
delay: gob encoding failed: gob: type build.PerfChange has no exported fields
And I was thinking why it is not sending mails...
LGTM=adg
R=adg
CC=golang-codereviews
https://golang.org/cl/125480043
Currently we still see some flakes on perf dashboard (e.g. sys-stack is quite frequent).
I am planning to run real perf builder with 5 different values of GOMAXPROCS,
so we can require 3 builders to agree on a change instead of 2.
This will provide 20x improvement in flake detection.
At the same time lower noise bar from 1.2 to 1.1, as I see some real perf changes gets ignored as noise.
All these magic numbers affect only representation of data, but not the data stored in DB.
So we can continue freely tuning them later. There are no significant risks here.
LGTM=adg
R=adg
CC=golang-codereviews
https://golang.org/cl/127520044
As requested on Stack Overflow: http://goo.gl/ams9fY
(Kudos to sberry for his JavaScript solution, provided there.
This change does the same thing on the server side.)
LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/127030043
(1) support Example functions defined in programs that don't
import "testing". We emit code to testmain.main() to call
them directly, since we can't call testing.Main.
(2) expose a FindTests function which reports the set of
Test, Example and Benchmark functions it finds.
Certain clients need this.
Added test for logic in FindTests.
LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/115290048
Previously these were recorded in the PackageInfo, but not
reported to the user's error handler (types.Config.Error),
which is typically what prints them.
Minor subtlety: that function must now be able to handle error
values that are not of type types.Error.
+ Test (and renamed it).
LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/121290043
- Break out parts of coverage.go into more specific files.
- Re-enable test of nil interface-to-interface conversion.
- Update initorder test to reflect spec ambiguity and gc vs go/types variance.
- Re-enable test dependent on now-fixed bug 8189 ("value,ok" yields an untyped bool)
LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/119530043
And serialize the printing of each item with a mutex.
It is the formatted output of this tool, after all.
Also: minor doc tweaks.
LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/114620044
Examples:
- "foo$1" becomes "pkg.foo$1"
- "init$1" (meaning the first declared "init" function) becomes "init#1",
to distinguish it from "init$1" (meaning the first anonymous function
within the synthetic "init" function that initializes package-level vars).
It is now an invariant that all source-level (non-synthetic)
functions have distinct names, and that all names include the
enclosing package. Added test for this.
+ updated various clients.
LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/122750043
It was missing from the four conversions and the Make* instructions.
(Experiments with pure bytes.Buffer-based printing were not faster; various TODOs removed.)
LGTM=crawshaw
R=gri, crawshaw
CC=golang-codereviews
https://golang.org/cl/58040043
golang.org now serves HTTPS,
so the scripts should work
with either HTTP ot HTTPS.
LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/111640043
This transforms the virtualized directory (build.Context).Dir to a physical one,
for proprietary build systems that distinguish them.
LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/116230043
Users need only add an extra file to the package to specify
additional imports and initialization steps in testmain, to
match their build system.
LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/120090043
Right now they're all "Global" so you can't click use the table of
contents headings for "Types", "Functions", and "Methods".
LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/118100043
Without it, no value appears to be sent on NewTicker/NewTimer channels.
+ test
Also:
- add (callgraph.Edge).{Description,Pos} convenience methods
to simplify client code when Site==nil.
LGTM=gri
R=gri, friestein68503
CC=golang-codereviews
https://golang.org/cl/112610043
`go test` takes -run and -bench; the -test.run and -test.bench flags
are only for the test binary itself.
LGTM=adg
R=adg
CC=golang-codereviews
https://golang.org/cl/113390043
If an expression is addressable, we compute its address then load, rather than
extracting the value of subelements. For aggregates this avoids large copies.
Example:
var x [2]struct{y [3]int}
print(x[1].y[2])
Was:
t0 = local [3]struct{x [5]int} (x) *[3]struct{x [5]int}
t1 = *t0 [3]struct{x [5]int}
t2 = t1[1:int] struct{x [5]int}
t3 = t2.x [#0] [5]int
t4 = t3[2:int] int
Now:
t1 = &t0[1:int] *struct{x [5]int}
t2 = &t1.x [#0] *[5]int
t3 = &t2[2:int] *int
t4 = *t3 int
Also:
- make emitFieldSelections responsible for calling emitDebugRef, as
one of its two calls was forgetting to do it.
- relax the specification of (*Program).VarValue because not all
subexpressions are materalized as values now.
- fix up the objlookup.go test expectations to match.
go/ssa/interp test runs 10% faster.
Thanks to Peter Collingbourne for pointing this out.
LGTM=pcc
R=pcc, gri
CC=golang-codereviews
https://golang.org/cl/109710043
PackageInfo:
- deleted IsType
- inlined + deleted: ValueOf, TypeCaseVar, ImportSpecPkg
- on failure, TypeOf accessor now returns nil (was: panic)
go/ssa: avoid extra map lookups by using Uses or Defs directly when safe to do so,
and keeping the TypeAndValue around in expr0().
LGTM=gri
R=gri, pcc
CC=golang-codereviews
https://golang.org/cl/107650043
The InitOrder needs to be reset.
+ Test.
This bug manifested itself in duplicate HTML in the godoc -analysis view,
e.g. "f((x)" or "funcfunc f()"
LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/107660044
This extends the sanity checker to identify and report referrers
which do not appear in the function's instruction lists, and fixes two
bugs in the lifting algorithm which were caught by the sanity check.
LGTM=adonovan
R=adonovan
CC=axwalk, golang-codereviews
https://golang.org/cl/110210045