go/src/cmd
Robert Griesemer 4808fc4443 [dev.inline] cmd/internal/src: replace src.Pos with syntax.Pos
This replaces the src.Pos LineHist-based position tracking with
the syntax.Pos implementation and updates all uses.

The LineHist table is not used anymore - the respective code is still
there but should be removed eventually. CL forthcoming.

Passes toolstash -cmp when comparing to the master repo (with the
exception of a couple of swapped assembly instructions, likely due
to different instruction scheduling because the line-based sorting
has changed; though this is won't affect correctness).

The sizes of various important compiler data structures have increased
significantly (see the various sizes_test.go files); this is probably
the reason for an increase of compilation times (to be addressed). Here
are the results of compilebench -count 5, run on a "quiet" machine (no
apps running besides a terminal):

name       old time/op     new time/op     delta
Template       256ms ± 1%      280ms ±15%  +9.54%          (p=0.008 n=5+5)
Unicode        132ms ± 1%      132ms ± 1%    ~             (p=0.690 n=5+5)
GoTypes        891ms ± 1%      917ms ± 2%  +2.88%          (p=0.008 n=5+5)
Compiler       3.84s ± 2%      3.99s ± 2%  +3.95%          (p=0.016 n=5+5)
MakeBash       47.1s ± 1%      47.2s ± 2%    ~             (p=0.841 n=5+5)

name       old user-ns/op  new user-ns/op  delta
Template        309M ± 1%       326M ± 2%  +5.18%          (p=0.008 n=5+5)
Unicode         165M ± 1%       168M ± 4%    ~             (p=0.421 n=5+5)
GoTypes        1.14G ± 2%      1.18G ± 1%  +3.47%          (p=0.008 n=5+5)
Compiler       5.00G ± 1%      5.16G ± 1%  +3.12%          (p=0.008 n=5+5)

Change-Id: I241c4246cdff627d7ecb95cac23060b38f9775ec
Reviewed-on: https://go-review.googlesource.com/34273
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2017-01-09 22:33:23 +00:00
..
addr2line
api api: promote next.txt to go1.8.txt, update go tool 2016-12-01 02:54:21 +00:00
asm [dev.inline] cmd/internal/src: replace src.Pos with syntax.Pos 2017-01-09 22:33:23 +00:00
cgo cmd/cgo: fix cgo checking when fetching errno value 2016-12-01 02:13:50 +00:00
compile [dev.inline] cmd/internal/src: replace src.Pos with syntax.Pos 2017-01-09 22:33:23 +00:00
cover cmd/cover: handle multiple samples from the same location 2016-11-18 20:44:52 +00:00
dist [dev.inline] cmd/compile: introduce cmd/internal/src.Pos type for line numbers 2016-12-08 21:26:25 +00:00
doc cmd/doc: show documentation for interface methods when requested explicitly 2016-10-25 20:09:49 +00:00
fix cmd/fix: add golang.org/x/net/context fix 2016-09-15 19:24:04 +00:00
go cmd/go: ensure streaming test's stdout, stderr are same as cmd/go's 2016-12-07 01:12:22 +00:00
gofmt cmd/gofmt: don't call Chmod on windows 2016-11-23 01:55:21 +00:00
internal [dev.inline] cmd/internal/src: replace src.Pos with syntax.Pos 2017-01-09 22:33:23 +00:00
link cmd/link: hash packages after loading all symbols 2016-12-06 14:07:40 +00:00
nm all: use sort.Slice where applicable 2016-10-04 05:10:56 +00:00
objdump all: call flag.Parse from TestMain only if used 2016-11-16 19:01:01 +00:00
pack
pprof cmd/pprof: add options to skip tls verification 2016-11-12 18:30:15 +00:00
trace cmd/trace: fix goroutine view 2016-11-18 17:49:18 +00:00
vendor cmd/vendor/golang.org/x/arch/ppc64/ppc64asm: skip TestObjdumpPowerManual if not ppc64x 2016-11-01 17:00:46 +00:00
vet all: call flag.Parse from TestMain only if used 2016-11-16 19:01:01 +00:00