1
0
mirror of https://github.com/golang/go synced 2024-10-08 05:41:21 -06:00
Commit Graph

21559 Commits

Author SHA1 Message Date
Shenghou Ma
bcf7f61f83 [dev.power64] cmd/9a: use liblink, add required additional instructions.
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/127730043
2014-08-07 14:49:41 -04:00
Shenghou Ma
fcb842c645 [dev.power64] .hgignore: update for the 9 toolchain
LGTM=dave, rsc
R=rsc, iant, dave
CC=golang-codereviews
https://golang.org/cl/124840043
2014-08-07 14:37:00 -04:00
Shenghou Ma
83f6aadf16 [dev.power64] cmd/9c: use liblink, use Go argument passing rules, support both endians
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/126800043
2014-08-07 14:36:34 -04:00
Dmitriy Vyukov
cc063592b0 encoding/gob: make benchmarks parallel
There are lots of internal synchronization in gob,
so it makes sense to have parallel benchmarks.
Also add a benchmark with slices and interfaces.

LGTM=r
R=golang-codereviews, r
CC=golang-codereviews
https://golang.org/cl/115960043
2014-08-07 21:39:32 +04:00
Russ Cox
d078d483ce go/build: look in $GOROOT/src/cmd/foo/bar for import cmd/foo/bar
This lets us have non-main packages like cmd/internal or cmd/nm/internal/whatever.

The src/pkg migration (see golang.org/s/go14mainrepo) will allow this
as a natural side effect. The explicit change here just allows use of the
effect a little sooner.

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/117630043
2014-08-07 12:33:19 -04:00
Russ Cox
08033f9816 cmd/addr2line, cmd/nm: factor object reading into cmd/internal/objfile
To do in another CL: make cmd/objdump use cmd/internal/objfile too.

There is a package placement decision in this CL:
cmd/internal/objfile instead of internal/objfile.
I chose to put internal under cmd to make clear (and enforce)
that no standard library packages should use this
(it's a bit dependency-heavy).

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/123910043
2014-08-07 12:33:06 -04:00
Shenghou Ma
2358603f0c [dev.power64] liblink: move span and asmout related function from obj9.c to asm9.c
To reduce delta for the upcoming liblink CL.
Just code movement, no semantic changes.

LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/124830043
2014-08-07 12:02:36 -04:00
Andrew Gerrand
fad69a7b77 cmd/fix: mention -help instead of the non-existent -? flag
Update #8314

TBR=r
R=golang-codereviews
CC=golang-codereviews
https://golang.org/cl/123890043
2014-08-07 23:24:32 +10:00
Peter Collingbourne
e03bce158f cmd/cc, runtime: eliminate use of the unnamed substructure C extension
Eliminating use of this extension makes it easier to port the Go runtime
to other compilers. This CL also disables the extension in cc to prevent
accidental use.

LGTM=rsc, khr
R=rsc, aram, khr, dvyukov
CC=axwalk, golang-codereviews
https://golang.org/cl/106790044
2014-08-07 09:00:02 -04:00
Russ Cox
6cee4d3e8f os: in Getwd, $PWD override syscall.Getwd
This makes os.Getwd mimic C getwd on OS X,
and possibly other systems. The change on OS X
was a regression from 1.2 to 1.3.

Fixes #8400.

LGTM=bradfitz
R=iant, bradfitz
CC=golang-codereviews
https://golang.org/cl/118970043
2014-08-07 08:58:25 -04:00
Russ Cox
689995a73e cmd/gc: remove ignored debugging arguments in Fconv print
LGTM=dave
R=golang-codereviews, dave
CC=golang-codereviews
https://golang.org/cl/123880043
2014-08-07 08:17:41 -04:00
Dmitriy Vyukov
aac7f1a0d6 runtime: convert markallocated from C to Go
benchmark                      old ns/op     new ns/op     delta
BenchmarkMalloc8               28.7          22.4          -21.95%
BenchmarkMalloc16              44.8          33.8          -24.55%
BenchmarkMallocTypeInfo8       49.0          32.9          -32.86%
BenchmarkMallocTypeInfo16      46.7          35.8          -23.34%
BenchmarkMallocLargeStruct     907           901           -0.66%
BenchmarkGobDecode             13235542      12036851      -9.06%
BenchmarkGobEncode             10639699      9539155       -10.34%
BenchmarkJSONEncode            25193036      21898922      -13.08%
BenchmarkJSONDecode            96104044      89464904      -6.91%

Fixes #8452.

LGTM=khr
R=golang-codereviews, bradfitz, rsc, dave, khr
CC=golang-codereviews
https://golang.org/cl/122090043
2014-08-07 13:34:30 +04:00
Dmitriy Vyukov
c5b2c370c6 runtime: fix plan9/windows build
Fix few remaining cases after cl/117580043.

TBR=dfc
R=golang-codereviews
CC=dave, golang-codereviews
https://golang.org/cl/124850043
2014-08-07 13:28:10 +04:00
Dmitriy Vyukov
cd2f8356ce runtime: remove mal/malloc/FlagNoGC/FlagNoInvokeGC
FlagNoGC is unused now.
FlagNoInvokeGC is unneeded as we don't invoke GC
on g0 and when holding locks anyway.
mal/malloc have very few uses and you never remember
the exact set of flags they use and the difference between them.
Moreover, eventually we need to give exact types to all allocations,
something what mal/malloc do not support.

LGTM=khr
R=golang-codereviews, khr
CC=golang-codereviews, rsc
https://golang.org/cl/117580043
2014-08-07 13:04:04 +04:00
Dmitriy Vyukov
192bccbf33 runtime: shrink stacks in parallel
Shrinkstack does not touch normal heap anymore,
so we can shink stacks concurrently with marking.

LGTM=khr
R=golang-codereviews, khr
CC=golang-codereviews, khr, rlh, rsc
https://golang.org/cl/122130043
2014-08-07 12:55:28 +04:00
Andrew Gerrand
af403c08fc doc: document new ParseMultipartForm behavior
Fixes #8403.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/123860043
2014-08-07 15:42:06 +10:00
Shenghou Ma
c689eb9b21 [dev.power64] cmd/dist: power64/power64le support.
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/117670045
2014-08-06 23:59:14 -04:00
Shenghou Ma
7582ecc996 [dev.power64] cmd/9g: add doc.go to prevent build failures.
After CL 117670045, cmd/dist will expect to have a cmd/9g directory.

LGTM=rsc, dave
R=rsc, iant, dave
CC=golang-codereviews
https://golang.org/cl/126780043
2014-08-06 23:43:36 -04:00
Shenghou Ma
117b1d4685 [dev.power64] cmd/9a, cmd/9c, cmd/9l, liblink: import code from Vita Nuova.
No modifications other than adding copyright header to each file, and
concatenating several cmd/9l files together to form the liblink files.

LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/123840043
2014-08-06 23:41:29 -04:00
Andrew Gerrand
cfed26c7ce misc/nacl: wrap lines in README file
LGTM=dan.kortschak, dave
R=dave, dan.kortschak
CC=golang-codereviews
https://golang.org/cl/121350043
2014-08-07 11:50:27 +10:00
Andrew Gerrand
9f07456c13 C: add Paul Nasrat (Google CLA)
TBR=gobot
R=golang-codereviews
CC=golang-codereviews
https://golang.org/cl/125790043
2014-08-07 11:21:32 +10:00
Mikio Hara
cdf7767628 doc/go1.4.txt: add support for ALPN
LGTM=minux
R=r, agl, minux
CC=golang-codereviews
https://golang.org/cl/121340043
2014-08-07 09:28:49 +09:00
Alex Brainman
7ce3406c8f doc/go1.4.txt: implement monotonic clocks on windows
LGTM=dave
R=golang-codereviews, dave
CC=golang-codereviews
https://golang.org/cl/126760043
2014-08-07 10:25:50 +10:00
Alex Brainman
a2d3669ef7 path/filepath: do not restore original working directory twice in test
LGTM=dave
R=golang-codereviews, dave
CC=golang-codereviews
https://golang.org/cl/122910043
2014-08-07 10:22:10 +10:00
Russ Cox
b91aea5536 encoding/xml: add InputOffset method to Decoder
Among other things, this allows users to match the decoded
pieces with the original XML, which can be necessary for
implementing standards like XML signatures.

Fixes #8484.

LGTM=bradfitz
R=bradfitz
CC=golang-codereviews
https://golang.org/cl/122960043
2014-08-06 18:00:06 -04:00
Russ Cox
fef54b22f8 cmd/go: revise disallowInternal
This fixes two problems: x/internal/y/z was using parent = x/internal/y instead of x,
and hasPathPrefix only looks at /, not \ for Windows.

LGTM=bradfitz
R=bradfitz
CC=golang-codereviews
https://golang.org/cl/121280045
2014-08-06 17:59:30 -04:00
Rob Pike
7bcaff70ed debug/dwarf: fix typos in comment for UnspecifiedType
LGTM=iant, bradfitz
R=bradfitz, iant
CC=golang-codereviews
https://golang.org/cl/120700043
2014-08-06 14:43:50 -07:00
Keith Randall
e359bea8ad runtime: clean up naming of mcallable functions.
Introduce the mFunction type to represent an mcall/onM-able function.
Name such functions using _m.

LGTM=bradfitz
R=bradfitz
CC=golang-codereviews
https://golang.org/cl/121320043
2014-08-06 14:33:57 -07:00
Alan Donovan
161ba662b1 test/mapnan.go: add regression test for non-empty interfaces.
LGTM=rsc, khr
R=rsc, khr, bradfitz
CC=golang-codereviews
https://golang.org/cl/126720043
2014-08-06 17:02:55 -04:00
Russ Cox
5fbcdb2661 runtime: use better hash for floating point inputs
Hashing on the bytes instead of the words does
a (much) better job of using all the bits, so that
maps of floats have linear performance.

LGTM=khr
R=golang-codereviews, khr
CC=adonovan, golang-codereviews
https://golang.org/cl/126720044
2014-08-06 16:47:54 -04:00
Russ Cox
1338f327b2 cmd/go: implement 'internal' convention
See golang.org/s/go14internal for design.

LGTM=r
R=r, adg
CC=golang-codereviews
https://golang.org/cl/120600043
2014-08-06 16:45:06 -04:00
Keith Randall
ea3ac6ba75 runtime: shorten hash declarations
LGTM=iant
R=dvyukov, iant
CC=golang-codereviews
https://golang.org/cl/117680044
2014-08-06 13:42:00 -07:00
Russ Cox
f098a29630 runtime: use better hash for non-empty interface
The implementation 'return 0' results in too many collisions.

LGTM=khr
R=golang-codereviews, adonovan, khr
CC=golang-codereviews, iant, khr, r
https://golang.org/cl/125720044
2014-08-06 16:22:52 -04:00
Shenghou Ma
9512e470e1 [dev.power64] cmd/dist: recognize power64 and power64le as GOHOSTARCH
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/125760043
2014-08-06 16:16:28 -04:00
Russ Cox
ffb07c0e6c [dev.power64] all: merge default, for codereview update
LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/124820043
2014-08-06 16:15:22 -04:00
Russ Cox
2185dbcd85 codereview: do not hit upload_complete on first patch
Causes server 500 error, so don't do it.

TBR=minux
CC=golang-codereviews
https://golang.org/cl/125770043
2014-08-06 16:12:24 -04:00
Russ Cox
4cc8be60e9 codereview: fix submit of merge + include branch prefix in submitted message
hg insists that we not list explicit files for a merge.

for benefit of other tools reading logs, include branch prefix
at start of every commit message.

LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/124780044
2014-08-06 16:10:08 -04:00
Russ Cox
7aa3031eba cmd/gc: make liveness ~10x faster
1) The arrayindexof lookup function is O(n). Replace with O(1) lookups.

2) The checkptxt function is O(n²) and is purely for debugging.
Only run when the debugging flags are turned on.

3) Iterating over sparse bitmaps can be done faster word by word.
Introduce and use bvnext for that.

Run times before and after, on my 2.5 GHz Core i5 MacBook Pro.

x.go       9.48  0.84  issue 8259

x100.go    0.01  0.01  issue 8354
x1000.go   0.10  0.10
x2000.go   0.62  0.19
x3000.go   1.33  0.34
x4000.go   2.29  0.49
x5000.go   3.89  0.67
x6000.go   5.00  0.90
x7000.go   6.70  1.13
x8000.go   9.44  1.38
x9000.go  11.23  1.87
x10000.go 13.78  2.09

Fixes #8259.
Fixes #8354.

LGTM=iant, r
R=golang-codereviews, iant, r
CC=golang-codereviews
https://golang.org/cl/125720043
2014-08-06 15:46:33 -04:00
Russ Cox
245ed93c20 all: merge default, for codereview fixes
LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/124810043
2014-08-06 15:36:24 -04:00
Russ Cox
c1fcdb0e00 codereview: handle upload of merge
LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/118690043
2014-08-06 15:25:17 -04:00
Russ Cox
6ff5c317eb codereview: preserve branch prefix in subject during hg mail
LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/124800043
2014-08-06 15:15:45 -04:00
Russ Cox
bd69b4479a cmd/dist: generate anames9.c
LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/120690043
2014-08-06 15:12:08 -04:00
Derek Parker
c0ccf6f314 debug/dwarf: fix Reader panic on DW_TAG_unspecified_type
The linker currently produces the DWARF 3 DW_TAG_unspecified_type tag, however the Reader in debug/dwarf will panic whenever that tag is encountered.

Fixes #8437.

LGTM=rsc
R=golang-codereviews, bradfitz, iant, rsc
CC=golang-codereviews
https://golang.org/cl/117280043
2014-08-06 12:11:37 -07:00
Brad Fitzpatrick
059f93be8a A+C: Derek Parker (individual CLA)
Generated by a+c.

R=gobot
CC=golang-codereviews
https://golang.org/cl/125750043
2014-08-06 12:10:00 -07:00
Russ Cox
ccd880f290 cmd/dist, go/build: add power64, power64le to known GOARCH lists
LGTM=dave, minux, aram
R=minux, dave, bradfitz, aram
CC=golang-codereviews
https://golang.org/cl/119470043
2014-08-06 14:58:17 -04:00
Russ Cox
8ad746d226 [dev.power64] remove dummy file 2014-08-06 14:57:34 -04:00
Russ Cox
dc2bb6d061 [dev.power64] create dev branch 2014-08-06 14:56:58 -04:00
Russ Cox
69c2e2b9e0 codereview: enable work and code reviews in development branches
This is an experiment. See mail on golang-dev
(subject: "an experiment: development branches").

LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/117660043
2014-08-06 14:52:12 -04:00
Russ Cox
e5e547c71f runtime: turn off 'unexpected return pc' print on arm traceback
It can happen legitimately if a profiling signal arrives at just the wrong moment.
It's harmless.

Fixes #8153.

LGTM=minux
R=golang-codereviews, minux
CC=golang-codereviews, iant, r
https://golang.org/cl/118670043
2014-08-06 14:50:09 -04:00
Percy Wegmann
14e8885c32 crypto/tls: Added dynamic alternative to NameToCertificate map for SNI
Revised version of https://golang.org/cl/81260045/

LGTM=agl
R=golang-codereviews, gobot, agl, ox
CC=golang-codereviews
https://golang.org/cl/107400043
2014-08-06 11:22:00 -07:00