]> Cypherpunks repositories - gostls13.git/log
gostls13.git
11 years agonet: fix comment on SetKeepAlivePeriod
Mikio Hara [Tue, 30 Jul 2013 07:31:57 +0000 (16:31 +0900)]
net: fix comment on SetKeepAlivePeriod

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/12091043

11 years agonet: add missing SetKeepAlivePeriod for Plan 9
Mikio Hara [Tue, 30 Jul 2013 07:29:51 +0000 (16:29 +0900)]
net: add missing SetKeepAlivePeriod for Plan 9

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/12082045

11 years agodoc: don't block page load on JavaScript fetch
Andrew Gerrand [Tue, 30 Jul 2013 04:22:14 +0000 (14:22 +1000)]
doc: don't block page load on JavaScript fetch

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/12050045

11 years agoencoding/xml: Do not pass through invalid utf8 bytes
Alex A Skinner [Tue, 30 Jul 2013 04:11:47 +0000 (14:11 +1000)]
encoding/xml: Do not pass through invalid utf8 bytes

EscapeText now escapes 0xFFFD returned from DecodeRune as 0xFFFD, rather than passing through the original byte.
Fixes #5880.

R=golang-dev, r, bradfitz, adg
CC=golang-dev
https://golang.org/cl/11975043

11 years agoA+C: Alex A Skinner (individual CLA)
Andrew Gerrand [Tue, 30 Jul 2013 04:10:50 +0000 (14:10 +1000)]
A+C: Alex A Skinner (individual CLA)

Generated by addca.

R=gobot
CC=golang-dev
https://golang.org/cl/12084043

11 years agocmd/gc: make bisonerrors compatible with GNU Bison 3.0
Rémy Oudompheng [Tue, 30 Jul 2013 02:31:15 +0000 (04:31 +0200)]
cmd/gc: make bisonerrors compatible with GNU Bison 3.0

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/11990043

11 years agodoc/codewalk: test source code
Andrew Gerrand [Mon, 29 Jul 2013 23:42:53 +0000 (09:42 +1000)]
doc/codewalk: test source code

Fixes #2648.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/11331043

11 years agogo/parser: don't report name errors if DeclarationErrors is not set
Robert Griesemer [Mon, 29 Jul 2013 23:00:28 +0000 (16:00 -0700)]
go/parser: don't report name errors if DeclarationErrors is not set

R=adonovan
CC=golang-dev
https://golang.org/cl/12072043

11 years agobuild: fix build
Russ Cox [Mon, 29 Jul 2013 20:52:40 +0000 (16:52 -0400)]
build: fix build

As promised.

TBR=dvyukov
CC=golang-dev
https://golang.org/cl/12063043

11 years agogo/parser: selectors may be method expressions
Robert Griesemer [Mon, 29 Jul 2013 20:52:15 +0000 (13:52 -0700)]
go/parser: selectors may be method expressions

R=adonovan
CC=golang-dev
https://golang.org/cl/12062043

11 years agobuild: break builds
Russ Cox [Mon, 29 Jul 2013 20:52:03 +0000 (16:52 -0400)]
build: break builds

I want to see the timing information in build logs,
and we can't see the logs for "ok" builds.
So make the build fail everywhere.

Will roll back immediately.

TBR=dvyukov
CC=golang-dev
https://golang.org/cl/12058046

11 years agoruntime: adjust timediv to avoid _vasop; mark _subv okay
Russ Cox [Mon, 29 Jul 2013 20:42:07 +0000 (16:42 -0400)]
runtime: adjust timediv to avoid _vasop; mark _subv okay

R=dvyukov
CC=golang-dev
https://golang.org/cl/12028046

11 years agoruntime: fix timediv calls on NetBSD, OpenBSD
Russ Cox [Mon, 29 Jul 2013 20:31:42 +0000 (16:31 -0400)]
runtime: fix timediv calls on NetBSD, OpenBSD

Document endian-ness assumption.

R=dvyukov
CC=golang-dev
https://golang.org/cl/12056044

11 years agoruntime: fix arm build
Dmitriy Vyukov [Mon, 29 Jul 2013 20:08:30 +0000 (00:08 +0400)]
runtime: fix arm build

The current failure is:
fatal error: runtime: stack split during syscall
goroutine 2 [stack split]:
_si2v(0xb6ebaebc, 0x3b9aca00)
        /usr/local/go/src/pkg/runtime/vlrt_arm.c:628 fp=0xb6ebae9c
runtime.timediv(0xf8475800, 0xd, 0x3b9aca00, 0xb6ebaef4)
        /usr/local/go/src/pkg/runtime/runtime.c:424 +0x1c fp=0xb6ebaed4

Just adding textflag 7 causes the following error:
notetsleep: nosplit stack overflow
        128 assumed on entry to notetsleep
        96 after notetsleep uses 32
        60 after runtime.futexsleep uses 36
        4 after runtime.timediv uses 56
        -4 after _si2v uses 8

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/12001045

11 years agomath/big: better documentation for Rat.Float64
Robert Griesemer [Mon, 29 Jul 2013 20:06:34 +0000 (13:06 -0700)]
math/big: better documentation for Rat.Float64

R=adonovan, r
CC=golang-dev
https://golang.org/cl/11961043

11 years agoruntime: fix arm build
Dmitriy Vyukov [Mon, 29 Jul 2013 19:41:12 +0000 (23:41 +0400)]
runtime: fix arm build

The current failure is:
fatal error: runtime: stack split during syscall
goroutine 2 [stack split]:
_addv(0xb6fa0f28, 0xd0a5112e, 0x13156d6e, 0xf8475800, 0xd)
        /usr/local/go/src/pkg/runtime/vlrt_arm.c:66 fp=0xb6fa0ef8
notetsleep(0xb6fa0f9c, 0xf8475800, 0xd, 0x0, 0x0, ...)
        /usr/local/go/src/pkg/runtime/lock_futex.c:156 +0xd0 fp=0xb6fa0f18
runtime.notetsleepg(0xb6fa0f9c, 0xf8475800, 0xd)
        /usr/local/go/src/pkg/runtime/lock_futex.c:197 +0x74 fp=0xb6fa0f3c

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/12052043

11 years agoruntime: fix linux/arm build
Dmitriy Vyukov [Mon, 29 Jul 2013 18:59:30 +0000 (22:59 +0400)]
runtime: fix linux/arm build
notetsleep: nosplit stack overflow
        128 assumed on entry to notetsleep
        80 after notetsleep uses 48
        44 after runtime.futexsleep uses 36
        -12 after runtime.timediv uses 56

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/12049043

11 years agoruntime: fix openbsd build
Dmitriy Vyukov [Mon, 29 Jul 2013 18:58:58 +0000 (22:58 +0400)]
runtime: fix openbsd build
notetsleep: nosplit stack overflow
        120 assumed on entry to notetsleep
        96 after notetsleep uses 24
        88 on entry to runtime.semasleep
        32 after runtime.semasleep uses 56
        24 on entry to runtime.nanotime
        -8 after runtime.nanotime uses 32

Nanotime seems to be using only 24 bytes of stack space.
Unless I am missing something.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/12041044

11 years agoruntime: fix freebsd build
Dmitriy Vyukov [Mon, 29 Jul 2013 18:58:26 +0000 (22:58 +0400)]
runtime: fix freebsd build
notetsleep: nosplit stack overflow
        120 assumed on entry to notetsleep
        80 after notetsleep uses 40
        72 on entry to runtime.futexsleep
        16 after runtime.futexsleep uses 56
        8 on entry to runtime.printf
        -16 after runtime.printf uses 24

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/12047043

11 years agoruntime: do not split stacks in syscall status
Dmitriy Vyukov [Mon, 29 Jul 2013 18:22:34 +0000 (22:22 +0400)]
runtime: do not split stacks in syscall status
Split stack checks (morestack) corrupt g->sched,
but g->sched must be preserved consistent for GC/traceback.
The change implements runtime.notetsleepg function,
which does entersyscall/exitsyscall and is carefully arranged
to not call any split functions in between.

R=rsc
CC=golang-dev
https://golang.org/cl/11575044

11 years agonet: fix memory leaks on windows
Dmitriy Vyukov [Mon, 29 Jul 2013 16:01:13 +0000 (20:01 +0400)]
net: fix memory leaks on windows
Close netpoll descriptor along with socket.
Ensure that error paths close the descriptor as well.

R=golang-dev, mikioh.mikioh, alex.brainman
CC=golang-dev
https://golang.org/cl/11987043

11 years agoruntime: allow SetFinalizer with a func(interface{})
Pieter Droogendijk [Mon, 29 Jul 2013 15:43:08 +0000 (19:43 +0400)]
runtime: allow SetFinalizer with a func(interface{})

Fixes #5368.

R=golang-dev, dvyukov
CC=golang-dev, rsc
https://golang.org/cl/11858043

11 years agonet: remove redundant comment on isWildcard
Mikio Hara [Mon, 29 Jul 2013 14:26:11 +0000 (23:26 +0900)]
net: remove redundant comment on isWildcard

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/11985043

11 years agonet: document sockaddr interface
Mikio Hara [Mon, 29 Jul 2013 14:25:39 +0000 (23:25 +0900)]
net: document sockaddr interface

This is in preparation for runtime-integrated network pollster for BSD
variants.

Update #5199

R=golang-dev, fvbommel, dave
CC=golang-dev
https://golang.org/cl/11984043

11 years agodoc/articles: state that slices/arrays start at the 0th element
Andrew Gerrand [Mon, 29 Jul 2013 08:33:39 +0000 (18:33 +1000)]
doc/articles: state that slices/arrays start at the 0th element

Fixes #5881.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/11892043

11 years agomisc/dashboard/builder: increase cmdTimeout to 10 minutes
Alex Brainman [Mon, 29 Jul 2013 04:31:21 +0000 (14:31 +1000)]
misc/dashboard/builder: increase cmdTimeout to 10 minutes

It takes more then 5 minutes to clone go repo
on windows-386 builder now.

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/12007043

11 years agomisc/dashboard: don't update tip tag for release branch commits.
David Symonds [Mon, 29 Jul 2013 02:08:19 +0000 (12:08 +1000)]
misc/dashboard: don't update tip tag for release branch commits.

This will mean that sub-repositories won't get built against the
release branch. They are often not compatible because the subrepos
often run ahead of the current release (e.g. go.tools is using
new additions to go/ast, and go.net is using new things in syscall)
so there's little point in checking them against cherrypick commits
when they'll be tested against those commits on tip anyway.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/12001043

11 years agoall: move examples into package *_test.
Rémy Oudompheng [Sun, 28 Jul 2013 23:25:51 +0000 (01:25 +0200)]
all: move examples into package *_test.

Fixes #5677.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/11992043

11 years agoeffective_go.html: make snippets look formatted.
Rémy Oudompheng [Sun, 28 Jul 2013 22:57:19 +0000 (00:57 +0200)]
effective_go.html: make snippets look formatted.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/11991043

11 years agocompress/flate: reduce tiny allocs done by encoder.
Rémy Oudompheng [Sun, 28 Jul 2013 07:42:40 +0000 (09:42 +0200)]
compress/flate: reduce tiny allocs done by encoder.

benchmark                          old allocs   new allocs    delta
BenchmarkEncodeDigitsSpeed1e4             942           91  -90.34%
BenchmarkEncodeDigitsSpeed1e5            1919          178  -90.72%
BenchmarkEncodeDigitsSpeed1e6           18539         1517  -91.82%
BenchmarkEncodeDigitsDefault1e4           734          100  -86.38%
BenchmarkEncodeDigitsDefault1e5          1958          193  -90.14%
BenchmarkEncodeDigitsDefault1e6         17338         1426  -91.78%
BenchmarkEncodeDigitsCompress1e4          734          100  -86.38%
BenchmarkEncodeDigitsCompress1e5         1958          193  -90.14%
BenchmarkEncodeDigitsCompress1e6        17338         1426  -91.78%
BenchmarkEncodeTwainSpeed1e4             1865          109  -94.16%
BenchmarkEncodeTwainSpeed1e5             3943          211  -94.65%
BenchmarkEncodeTwainSpeed1e6            31279         1595  -94.90%
BenchmarkEncodeTwainDefault1e4           1811          103  -94.31%
BenchmarkEncodeTwainDefault1e5           3708          199  -94.63%
BenchmarkEncodeTwainDefault1e6          26738         1330  -95.03%
BenchmarkEncodeTwainCompress1e4          1811          103  -94.31%
BenchmarkEncodeTwainCompress1e5          3693          190  -94.86%
BenchmarkEncodeTwainCompress1e6         26902         1333  -95.04%

benchmark                           old bytes    new bytes    delta
BenchmarkEncodeDigitsSpeed1e4         1469438      1453920   -1.06%
BenchmarkEncodeDigitsSpeed1e5         1490898      1458961   -2.14%
BenchmarkEncodeDigitsSpeed1e6         1858819      1542407  -17.02%
BenchmarkEncodeDigitsDefault1e4       1465903      1454160   -0.80%
BenchmarkEncodeDigitsDefault1e5       1491841      1459361   -2.18%
BenchmarkEncodeDigitsDefault1e6       1825424      1531545  -16.10%
BenchmarkEncodeDigitsCompress1e4      1465903      1454160   -0.80%
BenchmarkEncodeDigitsCompress1e5      1491681      1459361   -2.17%
BenchmarkEncodeDigitsCompress1e6      1825424      1531545  -16.10%
BenchmarkEncodeTwainSpeed1e4          1485308      1454400   -2.08%
BenchmarkEncodeTwainSpeed1e5          1526065      1459878   -4.34%
BenchmarkEncodeTwainSpeed1e6          2066627      1536296  -25.66%
BenchmarkEncodeTwainDefault1e4        1484380      1454240   -2.03%
BenchmarkEncodeTwainDefault1e5        1521793      1459558   -4.09%
BenchmarkEncodeTwainDefault1e6        1977504      1523388  -22.96%
BenchmarkEncodeTwainCompress1e4       1484380      1454240   -2.03%
BenchmarkEncodeTwainCompress1e5       1521457      1459318   -4.08%
BenchmarkEncodeTwainCompress1e6       1980000      1523609  -23.05%

benchmark                           old ns/op    new ns/op    delta
BenchmarkEncodeDigitsSpeed1e4         1472128      1384343   -5.96%
BenchmarkEncodeDigitsSpeed1e5         8283663      8112304   -2.07%
BenchmarkEncodeDigitsSpeed1e6        77459311     76364216   -1.41%
BenchmarkEncodeDigitsDefault1e4       1813090      1746552   -3.67%
BenchmarkEncodeDigitsDefault1e5      26221292     26052516   -0.64%
BenchmarkEncodeDigitsDefault1e6     286512472    286099039   -0.14%
BenchmarkEncodeDigitsCompress1e4      1809373      1747230   -3.43%
BenchmarkEncodeDigitsCompress1e5     26231580     26038456   -0.74%
BenchmarkEncodeDigitsCompress1e6    286140002    286025372   -0.04%
BenchmarkEncodeTwainSpeed1e4          1594094      1438600   -9.75%
BenchmarkEncodeTwainSpeed1e5          7669724      7316288   -4.61%
BenchmarkEncodeTwainSpeed1e6         68731353     65938994   -4.06%
BenchmarkEncodeTwainDefault1e4        2063497      1866488   -9.55%
BenchmarkEncodeTwainDefault1e5       22602689     22221377   -1.69%
BenchmarkEncodeTwainDefault1e6      233376842    232114297   -0.54%
BenchmarkEncodeTwainCompress1e4       2062441      1949676   -5.47%
BenchmarkEncodeTwainCompress1e5      28264344     27930627   -1.18%
BenchmarkEncodeTwainCompress1e6     304369641    303704330   -0.22%

benchmark                            old MB/s     new MB/s  speedup
BenchmarkEncodeDigitsSpeed1e4            6.79         7.22    1.06x
BenchmarkEncodeDigitsSpeed1e5           12.07        12.33    1.02x
BenchmarkEncodeDigitsSpeed1e6           12.91        13.10    1.01x
BenchmarkEncodeDigitsDefault1e4          5.52         5.73    1.04x
BenchmarkEncodeDigitsDefault1e5          3.81         3.84    1.01x
BenchmarkEncodeDigitsDefault1e6          3.49         3.50    1.00x
BenchmarkEncodeDigitsCompress1e4         5.53         5.72    1.03x
BenchmarkEncodeDigitsCompress1e5         3.81         3.84    1.01x
BenchmarkEncodeDigitsCompress1e6         3.49         3.50    1.00x
BenchmarkEncodeTwainSpeed1e4             6.27         6.95    1.11x
BenchmarkEncodeTwainSpeed1e5            13.04        13.67    1.05x
BenchmarkEncodeTwainSpeed1e6            14.55        15.17    1.04x
BenchmarkEncodeTwainDefault1e4           4.85         5.36    1.11x
BenchmarkEncodeTwainDefault1e5           4.42         4.50    1.02x
BenchmarkEncodeTwainDefault1e6           4.28         4.31    1.01x
BenchmarkEncodeTwainCompress1e4          4.85         5.13    1.06x
BenchmarkEncodeTwainCompress1e5          3.54         3.58    1.01x
BenchmarkEncodeTwainCompress1e6          3.29         3.29    1.00x

R=imkrasin, golang-dev, bradfitz, r
CC=golang-dev
https://golang.org/cl/10006043

11 years agonet: make UnixAddr implement sockaddr interface
Mikio Hara [Sun, 28 Jul 2013 07:15:07 +0000 (16:15 +0900)]
net: make UnixAddr implement sockaddr interface

This is in preparation for runtime-integrated network pollster for BSD
variants.

Update #5199

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/11932044

11 years agonet: extend sockaddr interface to the all address families
Mikio Hara [Sun, 28 Jul 2013 03:52:30 +0000 (12:52 +0900)]
net: extend sockaddr interface to the all address families

This CL extends existing sockaddr interface to accommodate not only
internet protocol family endpoint addressess but unix network family
endpoint addresses.

This is in preparation for runtime-integrated network pollster for BSD
variants.

Update #5199

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/11979043

11 years agonet: simplify socket option helpers
Mikio Hara [Sun, 28 Jul 2013 02:18:06 +0000 (11:18 +0900)]
net: simplify socket option helpers

Also consolidates syscall.IPPROTO_TCP level option helper files.

R=golang-dev, dave, alex.brainman
CC=golang-dev
https://golang.org/cl/8637049

11 years agomisc/dashboard: fix typo in comment
Dmitriy Vyukov [Sat, 27 Jul 2013 09:54:34 +0000 (13:54 +0400)]
misc/dashboard: fix typo in comment

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/11936045

11 years agocmd/dist: fix crash on windows
Dmitriy Vyukov [Sat, 27 Jul 2013 09:53:18 +0000 (13:53 +0400)]
cmd/dist: fix crash on windows
currently 'dist install' always crashes on windows

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/11919043

11 years agoruntime: fix potential deadlock in netpoll on windows
Dmitriy Vyukov [Sat, 27 Jul 2013 09:46:40 +0000 (13:46 +0400)]
runtime: fix potential deadlock in netpoll on windows
If netpoll has been told to block, it must not return with nil,
otherwise scheduler assumes that netpoll is disabled.

R=golang-dev, alex.brainman
CC=golang-dev
https://golang.org/cl/11920044

11 years agonet: temporary skip hanging test on windows
Dmitriy Vyukov [Sat, 27 Jul 2013 09:36:27 +0000 (13:36 +0400)]
net: temporary skip hanging test on windows
Update #5971.

R=alex.brainman
CC=golang-dev
https://golang.org/cl/11938046

11 years agomisc/notepadplus: use new User Defined Language system (UDL2)
ChaiShushan [Fri, 26 Jul 2013 22:12:42 +0000 (08:12 +1000)]
misc/notepadplus: use new User Defined Language system (UDL2)

Add missing single quotation and backslash marks.

Change dot and underscore character keyword type.
"_" is a predeclared identifier, not a operator.
"." is a selector, x.f should be one identifier highlight.
So the fix is to change it.

Fixes #5775.
Fixes #5788.
Fixes #5798.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/10480044

11 years agoruntime: handle runtime.Goexit during init
Russ Cox [Fri, 26 Jul 2013 17:54:44 +0000 (13:54 -0400)]
runtime: handle runtime.Goexit during init

Fixes #5963.

R=golang-dev, dsymonds, dvyukov
CC=golang-dev
https://golang.org/cl/11879045

11 years agoruntime: refactor mallocgc
Dmitriy Vyukov [Fri, 26 Jul 2013 17:17:24 +0000 (21:17 +0400)]
runtime: refactor mallocgc
Make it accept type, combine flags.
Several reasons for the change:
1. mallocgc and settype must be atomic wrt GC
2. settype is called from only one place now
3. it will help performance (eventually settype
functionality must be combined with markallocated)
4. flags are easier to read now (no mallocgc(sz, 0, 1, 0) anymore)

R=golang-dev, iant, nightlyone, rsc, dave, khr, bradfitz, r
CC=golang-dev
https://golang.org/cl/10136043

11 years agocrypto/des: faster block expansion.
Rémy Oudompheng [Fri, 26 Jul 2013 07:10:29 +0000 (09:10 +0200)]
crypto/des: faster block expansion.

On amd64:

benchmark           old ns/op    new ns/op    delta
BenchmarkEncrypt         6170         3593  -41.77%
BenchmarkDecrypt         6209         3564  -42.60%

benchmark            old MB/s     new MB/s  speedup
BenchmarkEncrypt         1.30         2.23    1.72x
BenchmarkDecrypt         1.29         2.24    1.74x

Update #4299.

R=golang-dev, agl, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/11874043

11 years agocmd/pack: support removing of leading file prefix on windows
Alex Brainman [Fri, 26 Jul 2013 06:56:24 +0000 (16:56 +1000)]
cmd/pack: support removing of leading file prefix on windows

Fixes #5550

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/11904043

11 years agogc: fix line directive processing on windows
Alex Brainman [Fri, 26 Jul 2013 03:38:24 +0000 (13:38 +1000)]
gc: fix line directive processing on windows

This change should have been part of 5671737303a0.

Fixes #5904

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/11894043

11 years agoundo CL 11788043 / 62d06cccc261
Keith Randall [Fri, 26 Jul 2013 00:51:33 +0000 (17:51 -0700)]
undo CL 11788043 / 62d06cccc261

Reason for breakage fixed with CL 11888043.

««« original CL description
undo CL 11683043 / bb75d03e6ccb

Broke arm build.
R=dave

««« original CL description
cc: generate argument pointer maps for C functions.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/11683043
»»»

R=golang-dev
CC=golang-dev
https://golang.org/cl/11788043
»»»

TBR=dave
CC=golang-dev
https://golang.org/cl/11789043

11 years ago5c: fix pc recalculation in the presence of AFUNCDATA
Keith Randall [Fri, 26 Jul 2013 00:40:29 +0000 (17:40 -0700)]
5c: fix pc recalculation in the presence of AFUNCDATA

This makes CL 11683043 not break arm anymore.

R=golang-dev, bradfitz, dave
CC=golang-dev
https://golang.org/cl/11888043

11 years agogo/parser: restrict ParseDir to files with suffix ".go"
Robert Griesemer [Thu, 25 Jul 2013 16:36:22 +0000 (09:36 -0700)]
go/parser: restrict ParseDir to files with suffix ".go"

Fixes #5956.

R=rsc, r
CC=golang-dev
https://golang.org/cl/11813043

11 years agospec: update prose in Constants section
Robert Griesemer [Thu, 25 Jul 2013 16:35:55 +0000 (09:35 -0700)]
spec: update prose in Constants section

Fixes #5952.

R=r, rsc
CC=golang-dev
https://golang.org/cl/11812043

11 years agonet: give more detail when test panics
Mikio Hara [Thu, 25 Jul 2013 15:21:37 +0000 (00:21 +0900)]
net: give more detail when test panics

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/11811043

11 years agosyscall: prlimit argument error for Getrlimit and Setrlimit on Linux 32-bit
Peter Mundy [Thu, 25 Jul 2013 13:56:06 +0000 (09:56 -0400)]
syscall: prlimit argument error for Getrlimit and Setrlimit on Linux 32-bit

The rlimit arguments for prlimit are reversed for linux 32-bit (386 and arm).
Getrlimit becomes Setrlimit and vice versa.
Fixes #5949.

R=iant, mikioh.mikioh, rsc
CC=golang-dev
https://golang.org/cl/11803043

11 years agocmd/cgo: gccgo fixes
Ian Lance Taylor [Thu, 25 Jul 2013 13:53:57 +0000 (09:53 -0400)]
cmd/cgo: gccgo fixes

Don't require a full-scale callback for calls to the special
prologue functions.

Always use a simple wrapper function for C functions, so that
we can handle static functions defined in the import "C"
comment.

Disable a test that relies on gc-specific function names.

Fixes #5905.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/11406047

11 years agocmd/gc: avoid passing unevaluated constant expressions to backends.
Rémy Oudompheng [Thu, 25 Jul 2013 13:42:05 +0000 (09:42 -0400)]
cmd/gc: avoid passing unevaluated constant expressions to backends.

Backends do not exactly expect receiving binary operators with
constant operands or use workarounds to move them to
register/stack in order to handle them.

Fixes #5841.

R=golang-dev, daniel.morsing, rsc
CC=golang-dev
https://golang.org/cl/11107044

11 years agonet: simplify probeIPv6Stack
Mikio Hara [Thu, 25 Jul 2013 10:29:20 +0000 (19:29 +0900)]
net: simplify probeIPv6Stack

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/11807043

11 years agocrypto/md5: native arm assembler version
Nick Craig-Wood [Thu, 25 Jul 2013 03:28:27 +0000 (13:28 +1000)]
crypto/md5: native arm assembler version

An ARM version of md5block.go with a big improvement in
throughput (up to 2.5x) and a reduction in object size (21%).

Code size

  Before 3100 bytes
  After 2424 bytes
  21% smaller

Benchmarks on Rasperry Pi

benchmark                       old ns/op    new ns/op    delta
BenchmarkHash8Bytes                 11703         6636  -43.30%
BenchmarkHash1K                     38057        21881  -42.50%
BenchmarkHash8K                    208131       142735  -31.42%
BenchmarkHash8BytesUnaligned        11457         6570  -42.66%
BenchmarkHash1KUnaligned            69334        26841  -61.29%
BenchmarkHash8KUnaligned           455120       182223  -59.96%

benchmark                        old MB/s     new MB/s  speedup
BenchmarkHash8Bytes                  0.68         1.21    1.78x
BenchmarkHash1K                     26.91        46.80    1.74x
BenchmarkHash8K                     39.36        57.39    1.46x
BenchmarkHash8BytesUnaligned         0.70         1.22    1.74x
BenchmarkHash1KUnaligned            14.77        38.15    2.58x
BenchmarkHash8KUnaligned            18.00        44.96    2.50x

benchmark                      old allocs   new allocs    delta
BenchmarkHash8Bytes                     1            0  -100.00%
BenchmarkHash1K                         2            0  -100.00%
BenchmarkHash8K                         2            0  -100.00%
BenchmarkHash8BytesUnaligned            1            0  -100.00%
BenchmarkHash1KUnaligned                2            0  -100.00%
BenchmarkHash8KUnaligned                2            0  -100.00%

benchmark                       old bytes    new bytes    delta
BenchmarkHash8Bytes                    64            0  -100.00%
BenchmarkHash1K                       128            0  -100.00%
BenchmarkHash8K                       128            0  -100.00%
BenchmarkHash8BytesUnaligned           64            0  -100.00%
BenchmarkHash1KUnaligned              128            0  -100.00%
BenchmarkHash8KUnaligned              128            0  -100.00%

This also adds another test which makes sure that the sums
over larger blocks work properly. I wrote this test when I was
worried about memory corruption.

R=golang-dev, dave, bradfitz, rsc, ajstarks
CC=golang-dev, minux.ma, remyoudompheng
https://golang.org/cl/11648043

11 years agobufio: check buffer availability before reading in ReadFrom
Andrew Gerrand [Thu, 25 Jul 2013 01:29:13 +0000 (11:29 +1000)]
bufio: check buffer availability before reading in ReadFrom

Fixes #5947.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/11801043

11 years agocmd/cgo: Fix issue with cgo cdefs
Kevin Klues [Thu, 25 Jul 2013 00:27:42 +0000 (17:27 -0700)]
cmd/cgo: Fix issue with cgo cdefs

The problem is that the cdecl() function in cmd/cgo/godefs.go isn't
properly translating the Go array type to a C array type when an
asterisk follows the [] in the array type declaration (it is perfectly
legal to put the asterisk on either side of the [] in go syntax,
depending on how you set up your pointers).

That said, the cdefs tool is only designed to translate from Go types
generated using the cgo *godefs* tool -- where the godefs tool is
designed to translate gcc-style C types into Go types. In essence, the
cdefs tool translates from gcc-style C types to Go types (via the godefs
tool), then back to kenc-style C types. Because of this, cdefs does not
need to know how to translate arbitraty Go types into C, just the ones
produced by godefs.

The problem is that during this translation process, the logic is
slightly wrong when going from (e.g.):

char *array[10];
to:
array [10]*int8;
back to:
int8 *array[10];

In the current implementation of cdecl(), the translation from the Go
type declaration back to the kenc-style declaration looks for Go
types of the form:

name *[]type;
rather than the actual generated Go type declaration of:
name []*type;

Both are valid Go syntax, with slightly different semantics, but the
latter is the only one that can ever be generated by the godefs tools.
(The semantics of the former are not directly expressible in a
single C statement -- you would have to have to first typedef the array
type, then declare a pointer to that typedef'd type in a separate
statement).

This commit changes the logic of cdecl() to look properly for, and
translate, Go type declarations of the form:
name []*type;

Additionally, the original implementation only allowed for a single
asterisk and a single sized aray (i.e. only a single level of pointer
indirection, and only one set of []) on the type, whereas the patched
version allows for an arbitrary number of both.

Tests are included in misc/cgo/testcdefs and the all.bash script has been
updated to account for these.

R=golang-dev, bradfitz, dave, iant
CC=golang-dev
https://golang.org/cl/11377043

11 years agoC: add Kevin Klues (Google CLA)
Brad Fitzpatrick [Wed, 24 Jul 2013 23:39:38 +0000 (16:39 -0700)]
C: add Kevin Klues (Google CLA)

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/11797043

11 years agoundo CL 11683043 / bb75d03e6ccb
Keith Randall [Wed, 24 Jul 2013 22:04:10 +0000 (15:04 -0700)]
undo CL 11683043 / bb75d03e6ccb

Broke arm build.
R=dave

««« original CL description
cc: generate argument pointer maps for C functions.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/11683043
»»»

R=golang-dev
CC=golang-dev
https://golang.org/cl/11788043

11 years agomisc/emacs: replace our go-goto-opening-parenthesis with backward-up-list
Dominik Honnef [Wed, 24 Jul 2013 17:48:04 +0000 (13:48 -0400)]
misc/emacs: replace our go-goto-opening-parenthesis with backward-up-list

R=adonovan
CC=golang-dev
https://golang.org/cl/11524045

11 years agolog/syslog: restore use of serverConn interface
Ian Lance Taylor [Wed, 24 Jul 2013 17:28:57 +0000 (10:28 -0700)]
log/syslog: restore use of serverConn interface

Revision 15629 (8d71734a0cb0) removed the serverConn interface
that was introduce in revision 7718 (ee5e80c62862).  The
serverConn interface was there for use by gccgo on Solaris,
and it is still needed there.  Solaris does not support
connecting to the syslog daemon over TCP, and gccgo simply
calls the C library function.  This CL restores the
interface.

R=golang-dev, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/11737043

11 years agoruntime: only define SEH when we need it.
Keith Randall [Wed, 24 Jul 2013 16:59:47 +0000 (09:59 -0700)]
runtime: only define SEH when we need it.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/11769043

11 years agocc: generate argument pointer maps for C functions.
Keith Randall [Wed, 24 Jul 2013 16:41:06 +0000 (09:41 -0700)]
cc: generate argument pointer maps for C functions.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/11683043

11 years agoruntime: drop EV_RECEIPT support from network pollster on kqueue
Mikio Hara [Wed, 24 Jul 2013 15:24:17 +0000 (00:24 +0900)]
runtime: drop EV_RECEIPT support from network pollster on kqueue

Currently Darwin and FreeBSD support and NetBSD and OpenBSD do not
support EV_RECEIPT flag. We will drop use of EV_RECEIPT for now.

Also enables to build runtime-integrated network pollster on
freebsd/amd64,386 and openbsd/amd64,386. It just does build but never
runs pollster stuff.

This is in preparation for runtime-integrated network pollster for BSD
variants.

Update #5199

R=dvyukov, minux.ma
CC=golang-dev
https://golang.org/cl/11759044

11 years agomisc/emacs: Make godef-jump behave more like find-tag by supporting pop-tag-mark
Dominik Honnef [Wed, 24 Jul 2013 15:20:53 +0000 (11:20 -0400)]
misc/emacs: Make godef-jump behave more like find-tag by supporting pop-tag-mark

Push point to the find-tag marker ring to support pop-tag-mark.

Fixes #5804.

R=adonovan
CC=golang-dev
https://golang.org/cl/11457044

11 years agoruntime: more cgocallback_gofunc work
Russ Cox [Wed, 24 Jul 2013 13:01:57 +0000 (09:01 -0400)]
runtime: more cgocallback_gofunc work

Debugging the Windows breakage I noticed that SEH
only exists on 386, so we can balance the two stacks
a little more on amd64 and reclaim another word.

Now we're down to just one word consumed by
cgocallback_gofunc, having reclaimed 25% of the
overall budget (4 words out of 16).

Separately, fix windows/386 - the SEH must be on the
m0 stack, as must the saved SP, so we are forced to have
a three-word frame for 386. It matters much less for
386, because there 128 bytes gives 32 words to use.

R=dvyukov, alex.brainman
CC=golang-dev
https://golang.org/cl/11551044

11 years agoruntime: fix throw message in netpoll
Mikio Hara [Wed, 24 Jul 2013 08:48:13 +0000 (17:48 +0900)]
runtime: fix throw message in netpoll

R=dvyukov, r
CC=golang-dev
https://golang.org/cl/11761043

11 years agoruntime: fix windows build
Russ Cox [Wed, 24 Jul 2013 02:59:32 +0000 (22:59 -0400)]
runtime: fix windows build

TBR=golang-dev
CC=golang-dev
https://golang.org/cl/11595045

11 years agodoc/go1.2.txt: document new functions/types added to image/gif and image/draw.
Andrew Bonventre [Wed, 24 Jul 2013 02:41:52 +0000 (12:41 +1000)]
doc/go1.2.txt: document new functions/types added to image/gif and image/draw.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/11492045

11 years agodoc/go1.2.txt: document new function unicode.In
Rob Pike [Wed, 24 Jul 2013 00:54:33 +0000 (10:54 +1000)]
doc/go1.2.txt: document new function unicode.In

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/11745044

11 years agounicode: add "In" function to test membership of a rune
Rob Pike [Wed, 24 Jul 2013 00:27:58 +0000 (10:27 +1000)]
unicode: add "In" function to test membership of a rune
The existing function, IsOneOf, is hard to use. Since the slice comes
before the rune, in parallelism with the other Is functions, the slice
is clumsy to build. This CL adds a nicer-signatured In function of
equivalent functionality (its implementation is identical) that's much
easier to use. Compare:
        unicode.IsOneOf([]*unicode.RangeTable{unicode.Letter, unicode.Number}, r)
        unicode.In(r, unicode.Letter, unicode.Number)

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/11672044

11 years agonet: consolidate listenerBacklog declaration
Mikio Hara [Tue, 23 Jul 2013 23:43:08 +0000 (08:43 +0900)]
net: consolidate listenerBacklog declaration

Also adds maxListenerBacklog placeholder for Plan 9.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/11674044

11 years agoruntime: reduce frame size for runtime.cgocallback_gofunc
Russ Cox [Tue, 23 Jul 2013 22:40:02 +0000 (18:40 -0400)]
runtime: reduce frame size for runtime.cgocallback_gofunc

Tying preemption to stack splits means that we have to able to
complete the call to exitsyscall (inside cgocallbackg at least for now)
without any stack split checks, meaning that the whole sequence
has to work within 128 bytes of stack, unless we increase the size
of the red zone. This CL frees up 24 bytes along that critical path
on amd64. (The 32-bit systems have plenty of space because all
their words are smaller.)

R=dvyukov
CC=golang-dev
https://golang.org/cl/11676043

11 years agomath/rand: mention that the default Source is thread-safe
Andrew Gerrand [Tue, 23 Jul 2013 22:27:20 +0000 (08:27 +1000)]
math/rand: mention that the default Source is thread-safe

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/11709043

11 years agomisc/cgo/test: test recursive internal OS thread lock
Russ Cox [Tue, 23 Jul 2013 18:43:55 +0000 (14:43 -0400)]
misc/cgo/test: test recursive internal OS thread lock

This would have failed with CL 11663043.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/11480045

11 years agomath/rand: mention Seed in overview, add another top-level example
Andrew Gerrand [Tue, 23 Jul 2013 06:07:28 +0000 (16:07 +1000)]
math/rand: mention Seed in overview, add another top-level example

Fixes #5937.

R=golang-dev, mirtchovski, r
CC=golang-dev
https://golang.org/cl/11705043

11 years agonet/http: respect tls.Config.ServerName in Transport
Brad Fitzpatrick [Tue, 23 Jul 2013 05:39:09 +0000 (22:39 -0700)]
net/http: respect tls.Config.ServerName in Transport

When making an HTTPS client request, respect the
ServerName field in the tls.Config.

Fixes #5829

R=golang-dev, agl, adg
CC=golang-dev
https://golang.org/cl/11691043

11 years agodatabase/sql: close statement before connection
Alex Brainman [Tue, 23 Jul 2013 04:09:53 +0000 (14:09 +1000)]
database/sql: close statement before connection

Fixes #5936

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/11620046

11 years agoall: be more idiomatic when documenting boolean return values.
Rob Pike [Tue, 23 Jul 2013 01:59:49 +0000 (11:59 +1000)]
all: be more idiomatic when documenting boolean return values.
Phrases like "returns whether or not the image is opaque" could be
describing what the function does (it always returns, regardless of
the opacity) or what it returns (a boolean indicating the opacity).
Even when the "or not" is missing, the phrasing is bizarre.

Go with "reports whether", which is still clunky but at least makes
it clear we're talking about the return value.

These were edited by hand. A few were cleaned up in other ways.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/11699043

11 years agonet: make use of noDeadline instead of time.Time{}
Mikio Hara [Tue, 23 Jul 2013 01:13:58 +0000 (10:13 +0900)]
net: make use of noDeadline instead of time.Time{}

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/11691044

11 years agoruntime: Stop arm memmove corrupting its parameters
Nick Craig-Wood [Mon, 22 Jul 2013 23:29:25 +0000 (09:29 +1000)]
runtime: Stop arm memmove corrupting its parameters

Change use of x+(SP) to access the stack frame into x-(SP)

Fixes #5925.

R=golang-dev, bradfitz, dave, remyoudompheng, nick, rsc
CC=dave cheney <dave, golang-dev
https://golang.org/cl/11647043

11 years agoall: change "true iff" to "whether" in public docs
Brad Fitzpatrick [Mon, 22 Jul 2013 23:20:30 +0000 (16:20 -0700)]
all: change "true iff" to "whether" in public docs

For consistency with Go documentation style.

R=golang-dev, khr
CC=golang-dev
https://golang.org/cl/11697043

11 years agocmd/ld: fix warnings on Plan 9
David du Colombier [Mon, 22 Jul 2013 21:33:41 +0000 (17:33 -0400)]
cmd/ld: fix warnings on Plan 9

src/cmd/ld/lib.c:1379 set and not used: p
src/cmd/ld/lib.c:1426 format mismatch 6llux INT, arg 3
src/cmd/ld/lib.c:1437 format mismatch 6llux INT, arg 3
src/cmd/ld/lib.c:1456 format mismatch 6llux INT, arg 3
src/cmd/ld/lib.c:1477 format mismatch 6llux INT, arg 3
src/cmd/ld/lib.c:1459 set and not used: started

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/11615044

11 years agoruntime: introduce notetsleepg function
Dmitriy Vyukov [Mon, 22 Jul 2013 19:02:27 +0000 (23:02 +0400)]
runtime: introduce notetsleepg function
notetsleepg is the same as notetsleep, but is called on user g.
It includes entersyscall/exitsyscall and will help to avoid
split stack functions in syscall status.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/11681043

11 years agomisc/cgo/test: add test for cgo callbacks with different amount of stack space available
Dmitriy Vyukov [Mon, 22 Jul 2013 17:53:20 +0000 (21:53 +0400)]
misc/cgo/test: add test for cgo callbacks with different amount of stack space available

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/11677043

11 years agoruntime: allow stack split in body of closechan
Dmitriy Vyukov [Mon, 22 Jul 2013 16:47:39 +0000 (20:47 +0400)]
runtime: allow stack split in body of closechan
This gives more space during the call to runtime.lock.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/11679043

11 years agoruntime: clarify comment for m->locked
Dmitriy Vyukov [Mon, 22 Jul 2013 12:37:31 +0000 (16:37 +0400)]
runtime: clarify comment for m->locked

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/11671043

11 years agonet: remove unnecessary bit masking
Mikio Hara [Mon, 22 Jul 2013 11:08:58 +0000 (20:08 +0900)]
net: remove unnecessary bit masking

R=dave
CC=golang-dev
https://golang.org/cl/11537044

11 years agonet: implement netpoll for windows
Alex Brainman [Mon, 22 Jul 2013 02:49:57 +0000 (12:49 +1000)]
net: implement netpoll for windows

Moves the network poller from net package into runtime.

benchmark                           old ns/op    new ns/op    delta
BenchmarkTCP4OneShot                   316386       287061   -9.27%
BenchmarkTCP4OneShot-2                 339822       313424   -7.77%
BenchmarkTCP4OneShot-3                 330057       306589   -7.11%
BenchmarkTCP4OneShotTimeout            341775       287061  -16.01%
BenchmarkTCP4OneShotTimeout-2          380835       295849  -22.32%
BenchmarkTCP4OneShotTimeout-3          398412       328070  -17.66%
BenchmarkTCP4Persistent                 40622        33392  -17.80%
BenchmarkTCP4Persistent-2               44528        35736  -19.74%
BenchmarkTCP4Persistent-3               44919        36907  -17.84%
BenchmarkTCP4PersistentTimeout          45309        33588  -25.87%
BenchmarkTCP4PersistentTimeout-2        50289        38079  -24.28%
BenchmarkTCP4PersistentTimeout-3        51559        37103  -28.04%
BenchmarkTCP6OneShot                   361305       345645   -4.33%
BenchmarkTCP6OneShot-2                 361305       331976   -8.12%
BenchmarkTCP6OneShot-3                 376929       347598   -7.78%
BenchmarkTCP6OneShotTimeout            361305       322212  -10.82%
BenchmarkTCP6OneShotTimeout-2          378882       333928  -11.86%
BenchmarkTCP6OneShotTimeout-3          388647       335881  -13.58%
BenchmarkTCP6Persistent                 47653        35345  -25.83%
BenchmarkTCP6Persistent-2               49215        35736  -27.39%
BenchmarkTCP6Persistent-3               38474        37493   -2.55%
BenchmarkTCP6PersistentTimeout          56637        34369  -39.32%
BenchmarkTCP6PersistentTimeout-2        42575        38079  -10.56%
BenchmarkTCP6PersistentTimeout-3        44137        37689  -14.61%

R=dvyukov
CC=golang-dev
https://golang.org/cl/8670044

11 years agoruntime: add a missing newline in a debug printf.
David Symonds [Mon, 22 Jul 2013 02:42:42 +0000 (12:42 +1000)]
runtime: add a missing newline in a debug printf.

Trivial, but annoying while debugging this code.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/11656043

11 years agodoc: fix wiki content error
Andrew Gerrand [Mon, 22 Jul 2013 02:22:14 +0000 (12:22 +1000)]
doc: fix wiki content error

Fixes #5898.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/11556043

11 years agoregexp: use a very fast random generator for benchmarks.
Rémy Oudompheng [Sat, 20 Jul 2013 21:31:51 +0000 (23:31 +0200)]
regexp: use a very fast random generator for benchmarks.

Calls into math/rand are very slow, especially under race
detector because of heap accesses.

go test -bench . -run none -benchtime .1s
Before: 23.0s
After:  17.4s

Fixes #5837.

R=golang-dev, dave, r
CC=golang-dev
https://golang.org/cl/11564044

11 years agolibmach: support more 386/amd64 instructions
Anthony Martin [Sat, 20 Jul 2013 07:38:26 +0000 (00:38 -0700)]
libmach: support more 386/amd64 instructions

R=golang-dev, dave, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/10030043

11 years agolibmach,lib9: override unused parameter warnings (fixes netbsd and openbsd builds)
Alex Brainman [Sat, 20 Jul 2013 06:09:30 +0000 (16:09 +1000)]
libmach,lib9: override unused parameter warnings (fixes netbsd and openbsd builds)

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/11623043

11 years agolibmach,lib9: override unused parameter warnings (fixes windows build)
Alex Brainman [Sat, 20 Jul 2013 02:43:50 +0000 (12:43 +1000)]
libmach,lib9: override unused parameter warnings (fixes windows build)

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/11620044

11 years agocmd/dist, cmd/go: enable more warnings, make clang errors legible
Russ Cox [Fri, 19 Jul 2013 23:36:15 +0000 (19:36 -0400)]
cmd/dist, cmd/go: enable more warnings, make clang errors legible

This does not change the default compiler on OS X to clang.
It appears that for now we can keep using gcc as long as we
enable a few more warning settings that are on-by-default
elsewhere.

R=golang-dev, bradfitz, dave
CC=golang-dev
https://golang.org/cl/11610044

11 years agocmd/ld, runtime: remove unused fields from Func
Russ Cox [Fri, 19 Jul 2013 22:52:35 +0000 (18:52 -0400)]
cmd/ld, runtime: remove unused fields from Func

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/11604043

11 years agocmd/gc, cmd/ld: fix build: remove unused var, use correct var in printf
Ian Lance Taylor [Fri, 19 Jul 2013 22:04:53 +0000 (15:04 -0700)]
cmd/gc, cmd/ld: fix build: remove unused var, use correct var in printf

Fixes #5924.

R=golang-dev, khr, rsc
CC=golang-dev
https://golang.org/cl/11606043

11 years agoruntime: use funcdata to supply garbage collection information
Russ Cox [Fri, 19 Jul 2013 20:04:09 +0000 (16:04 -0400)]
runtime: use funcdata to supply garbage collection information

This CL introduces a FUNCDATA number for runtime-specific
garbage collection metadata, changes the C and Go compilers
to emit that metadata, and changes the runtime to expect it.

The old pseudo-instructions that carried this information
are gone, as is the linker code to process them.

R=golang-dev, dvyukov, cshapiro
CC=golang-dev
https://golang.org/cl/11406044

11 years agocmd/dist: generate offsets for P structure
Russ Cox [Fri, 19 Jul 2013 19:40:32 +0000 (15:40 -0400)]
cmd/dist: generate offsets for P structure

So far no checked-in assembly needs these,
but it matches having them for M and G.
I needed these for some manual testing.

R=golang-dev, dvyukov
CC=golang-dev
https://golang.org/cl/11595043

11 years agodebug/gosym: put pclinetest file in temporary directory
Keith Randall [Fri, 19 Jul 2013 19:31:42 +0000 (12:31 -0700)]
debug/gosym: put pclinetest file in temporary directory
where it belongs.

R=rsc
CC=golang-dev
https://golang.org/cl/11596043

11 years agoruntime: cleanup: use ArgsSizeUnknown to mark all functions
Keith Randall [Fri, 19 Jul 2013 18:19:18 +0000 (11:19 -0700)]
runtime: cleanup: use ArgsSizeUnknown to mark all functions
whose argument size is unknown (C vararg functions, and
assembly code without an explicit specification).

We used to use 0 to mean "unknown" and 1 to mean "zero".
Now we use ArgsSizeUnknown (0x80000000) to mean "unknown".

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/11590043