1
0
mirror of https://github.com/golang/go synced 2024-09-30 00:34:31 -06:00
Commit Graph

17406 Commits

Author SHA1 Message Date
Rob Pike
727b2b6f7d time: handle GMT possibly with offset
Update #3790
Handle time zones like GMT-8.
The more general time zone-matching problem is not yet resolved.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/12922043
2013-08-15 10:10:49 +10:00
David Symonds
80ca8c5d04 cmd/go: fix detached heads that are remnants of bad git clones.
Fixes #6042.

R=adg
CC=golang-dev
https://golang.org/cl/12923043
2013-08-15 09:44:23 +10:00
Dominik Honnef
3fe9b11cbb misc/emacs: Allow go-coverage to work in existing coverage buffers by reusing previous arguments
R=golang-dev, adonovan, bradfitz
CC=golang-dev
https://golang.org/cl/12721043
2013-08-14 16:03:44 -07:00
Russ Cox
904e113615 encoding/xml: support generic encoding interfaces
Remove custom support for time.Time.
No new tests: the tests for the time.Time special case
now test the general case.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/12751045
2013-08-14 18:52:09 -04:00
Carl Shapiro
3ec0427a07 cmd/go, runtime/cgo: explicitly target ARMv5T
The baseline architecture had been left to the GCC configured
default which can be more accomodating than the rest of the Go
toolchain.  This prevented instructions used by the 5g compiler,
like BLX, from being used in GCC compiled assembler code.

R=golang-dev, dave, rsc, elias.naur, cshapiro
CC=golang-dev
https://golang.org/cl/12954043
2013-08-14 15:21:53 -07:00
Andrew Gerrand
89ecedab26 doc: update go1.2.txt
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/12957044
2013-08-15 08:13:38 +10:00
Brad Fitzpatrick
61f5c63103 doc: update go1.2.txt
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/12953043
2013-08-14 14:56:31 -07:00
Mikio Hara
88411547d4 net: simplify dial
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/12884044
2013-08-15 05:53:53 +09:00
Elias Naur
3b4da67ee3 cmd/ld: Remove superfluous redundant iself check
CL 12741044 added an extra iself condition to an if statement that already contained it. Remove it.

R=rsc
CC=golang-dev
https://golang.org/cl/12949043
2013-08-14 16:28:40 -04:00
Dmitriy Vyukov
3bd0b0a80d runtime: fix SetBlockProfileRate
It doughtily misses all possible corner cases.
In particular on machines with <1GHz processors,
SetBlockProfileRate(1) disables profiling.
Fixes #6114.

R=golang-dev, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/12936043
2013-08-15 00:20:36 +04:00
Mikio Hara
2eb7c6ec8a net: simplify non-cgo DNS exchange
Also does less buffer allocation in case of TCP fallback.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/12925043
2013-08-15 05:08:08 +09:00
Mikio Hara
3a93626b49 net: fix TestTCPLookup
R=golang-dev, dvyukov, dave
CC=golang-dev
https://golang.org/cl/12766044
2013-08-15 05:07:35 +09:00
Russ Cox
f5806a9007 doc: update go1.2.txt
Will submit once I can fill in the CL XXX number.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/12912044
2013-08-14 15:37:23 -04:00
Rémy Oudompheng
0d9db86f74 cmd/5g, cmd/6g, cmd/8g: restore occurrences of R replaced by nil in comments.
R=golang-dev, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/12842043
2013-08-14 21:24:48 +02:00
Russ Cox
54bdfc007f encoding/xml: add, support Marshaler interface
See golang.org/s/go12xml for design.

Repeat of CL 12603044, which was submitted accidentally
and then rolled back.

Fixes #2771.
Fixes #4169.
Fixes #5975.
Fixes #6125.

R=golang-dev
CC=golang-dev
https://golang.org/cl/12919043
2013-08-14 14:58:28 -04:00
Russ Cox
84b0842a59 encoding/xml: add, support Unmarshaler interface
See golang.org/s/go12xml for design.

R=golang-dev, dominik.honnef, dan.kortschak
CC=golang-dev
https://golang.org/cl/12556043
2013-08-14 14:57:45 -04:00
Russ Cox
7e886740d1 encoding/json: support encoding.TextMarshaler, encoding.TextUnmarshaler
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/12703043
2013-08-14 14:56:07 -04:00
Russ Cox
5822e7848a runtime: make SetFinalizer(x, f) accept any f for which f(x) is valid
Originally the requirement was f(x) where f's argument is
exactly x's type.

CL 11858043 relaxed the requirement in a non-standard
way: f's argument must be exactly x's type or interface{}.

If we're going to relax the requirement, it should be done
in a way consistent with the rest of Go. This CL allows f's
argument to have any type for which x is assignable;
that's the same requirement the compiler would impose
if compiling f(x) directly.

Fixes #5368.

R=dvyukov, bradfitz, pieter
CC=golang-dev
https://golang.org/cl/12895043
2013-08-14 14:54:31 -04:00
Russ Cox
2560f8fe22 runtime/cgo: use old-style indirect call on arm
TBR=elias.naur
CC=golang-dev
https://golang.org/cl/12943043
2013-08-14 14:54:08 -04:00
Dmitriy Vyukov
dd50dac56c runtime: fix windows build
R=golang-dev
CC=golang-dev
https://golang.org/cl/12941043
2013-08-14 22:18:49 +04:00
Dmitriy Vyukov
4e76abbc60 runtime: implement SysUnused on windows
Fixes #5584.

R=golang-dev, chaishushan, alex.brainman
CC=golang-dev
https://golang.org/cl/12720043
2013-08-14 21:54:07 +04:00
Dmitriy Vyukov
f8ca13c3e5 net: make TCPStress test shorter
It timeouts on freebsd builders:
http://build.golang.org/log/3d8169e13bff912bebf6fd3c54b34ad2d29a7221
but there are always runnable goroutines,
which suggests that it's slowly progressing.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/12939043
2013-08-14 21:53:27 +04:00
Elias Naur
dc48e9516c runtime: Fix build on older ARM
The ARM external linking CL used BLX instructions in gcc assembler. Replace with BL to retain support on older ARM processors.

R=rsc
CC=golang-dev
https://golang.org/cl/12938043
2013-08-14 13:50:12 -04:00
Dmitriy Vyukov
9bbf1e1b72 net: make TestDeadlineRace shorter
1. Do less iterations in short mode
2. Bound number of times SetDeadline is executed

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/12937043
2013-08-14 21:20:11 +04:00
Elias Naur
48c0d8b6e2 runtime: Fix netbsd/arm and freebsd/arm build
The ARM external linking CL left missed changes to sys_freebsd_arm.s and sys_netbsd_arm.s already done to sys_linux_arm.s.

R=rsc
CC=golang-dev
https://golang.org/cl/12842044
2013-08-14 13:18:32 -04:00
Russ Cox
308a3e6c52 cmd/dist: fix darwin build
The TLS block on Darwin is not the same as on ELF.

TBR=elias.naur
CC=golang-dev
https://golang.org/cl/12741044
2013-08-14 12:57:05 -04:00
Elias Naur
a5f257a042 cmd/cgo: fix windows build
The shared library changes broke the windows build because __attribute__ ((visibility ("hidden"))) is not supported in windows gcc. This change removes the attribute, as it is only needed when building shared libraries.

R=rsc
CC=golang-dev
https://golang.org/cl/12829044
2013-08-14 12:47:06 -04:00
Matt Joiner
13c7896fb6 database/sql: fix accumulation of bad conns on prepared statements
Fixes an issue where prepared statements that outlive many
connections become expensive to invoke.

Fixes #6081

R=golang-dev
CC=bradfitz, golang-dev
https://golang.org/cl/12646044
2013-08-14 09:27:30 -07:00
Brad Fitzpatrick
e0ca536f36 A+C: Matt Joiner (individual CLA)
Generated by addca.

R=gobot
CC=golang-dev
https://golang.org/cl/12933043
2013-08-14 09:22:26 -07:00
Elias Naur
45233734e2 runtime.cmd/ld: Add ARM external linking and implement -shared in terms of external linking
This CL is an aggregate of 10271047, 10499043, 9733044. Descriptions of each follow:

10499043
runtime,cmd/ld: Merge TLS symbols and teach 5l about ARM TLS

This CL prepares for external linking support to ARM.

The pseudo-symbols runtime.g and runtime.m are merged into a single
runtime.tlsgm symbol. When external linking, the offset of a thread local
variable is stored at a memory location instead of being embedded into a offset
of a ldr instruction. With a single runtime.tlsgm symbol for both g and m, only
one such offset is needed.

The larger part of this CL moves TLS code from gcc compiled to internally
compiled. The TLS code now uses the modern MRC instruction, and 5l is taught
about TLS fallbacks in case the instruction is not available or appropriate.

10271047
This CL adds support for -linkmode external to 5l.

For 5l itself, use addrel to allow for D_CALL relocations to be handled by the
host linker. Of the cases listed in rsc's comment in issue 4069, only case 5 and
63 needed an update. One of the TODO: addrel cases was since replaced, and the
rest of the cases are either covered by indirection through addpool (cases with
LTO or LFROM flags) or stubs (case 74). The addpool cases are covered because
addpool emits AWORD instructions, which in turn are handled by case 11.

In the runtime, change the argv argument in the rt0* functions slightly to be a
pointer to the argv list, instead of relying on a particular location of argv.

9733044
The -shared flag to 6l outputs a shared library, implemented in Go
and callable from non-Go programs such as C.

The main part of this CL change the thread local storage model.
Go uses the fastest and least general mode, local exec. TLS data in shared
libraries normally requires at least the local dynamic mode, however, this CL
instead opts for using the initial exec mode. Initial exec mode is faster than
local dynamic mode and can be used in linux since the linker has reserved a
limited amount of TLS space for performance sensitive TLS code.

Initial exec mode requires an extra load from the GOT table to determine the
TLS offset. This penalty will not be paid if ld is not in -shared mode, since
TLS accesses will be reduced to local exec.

The elf sections .init_array and .rela.init_array are added to register the Go
runtime entry with cgo at library load time.

The "hidden" attribute is added to Cgo functions called from Go, since Go
does not generate call through the GOT table, and adding non-GOT relocations for
a global function is not supported by gcc. Cgo symbols don't need to be global
and avoiding the GOT table is also faster.

The changes to 8l are only removes code relevant to the old -shared mode where
internal linking was used.

This CL only address the low level linker work. It can be submitted by itself,
but to be useful, the runtime changes in CL 9738047 is also needed.

Design discussion at
https://groups.google.com/forum/?fromgroups#!topic/golang-nuts/zmjXkGrEx6Q

Fixes #5590.

R=rsc
CC=golang-dev
https://golang.org/cl/12871044
2013-08-14 15:38:54 +00:00
Dmitriy Vyukov
c92287686d runtime: improve block profiler support for channels
1. Handle select statements.
2. Handle chan close.
3. Show top frame in debug mode (chansend/chanrecv/selectgo).
Fixes #6049.

R=golang-dev, daniel.morsing, rsc
CC=golang-dev
https://golang.org/cl/12694050
2013-08-14 13:56:01 +04:00
Russ Cox
883530c019 sync/atomic: fix new swap on arm linux
TBR=dvyukov
CC=golang-dev
https://golang.org/cl/12920043
2013-08-14 00:50:47 -04:00
Russ Cox
72636eb506 cmd/5g: fix temp-merging on ARM
mkvar was taking care of the "LeftAddr" case,
effectively hiding it from the temp-merging optimization.

Move it into prog.c.

R=ken2
CC=golang-dev
https://golang.org/cl/12884045
2013-08-14 00:34:18 -04:00
Russ Cox
071e44e4e4 time: make Time implement encoding interfaces
See golang.org/s/go12encoding for design.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/12706043
2013-08-14 00:34:00 -04:00
Russ Cox
413d4c6c11 net: make IP implement encoding.MarshalerText, encoding.UnmarshalerText
See golang.org/s/go12encoding for design.

R=golang-dev, bradfitz, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/12705043
2013-08-14 00:33:20 -04:00
Russ Cox
56ce83f7ba undo CL 12603044 / 2ca230b93195
fat fingers - did not intend to submit.
depends on the Unmarshaler CL anyway.

««« original CL description
encoding/xml: add, support Marshaler interface

See golang.org/s/go12xml for design.

Fixes #2771.
Fixes #4169.
Fixes #5975.
Fixes #6125.

R=golang-dev, iant, dan.kortschak
CC=golang-dev
https://golang.org/cl/12603044
»»»

TBR=golang-dev
CC=golang-dev
https://golang.org/cl/12918043
2013-08-14 00:20:55 -04:00
Russ Cox
ce3ba126a0 encoding/gob: support new generic interfaces in package encoding
R=r
CC=golang-dev
https://golang.org/cl/12681044
2013-08-14 00:18:48 -04:00
Russ Cox
48b90bbc55 encoding: new package
See golang.org/s/go12encoding for design.

R=r
CC=golang-dev
https://golang.org/cl/12541051
2013-08-14 00:18:20 -04:00
Russ Cox
85f3acd788 encoding/xml: add, support Marshaler interface
See golang.org/s/go12xml for design.

Fixes #2771.
Fixes #4169.
Fixes #5975.
Fixes #6125.

R=golang-dev, iant, dan.kortschak
CC=golang-dev
https://golang.org/cl/12603044
2013-08-14 00:17:42 -04:00
ChaiShushan
844bc6c0ac misc/notepadplus: support Calltips
Fixes #5789.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/10601043
2013-08-14 13:41:36 +10:00
Andrew Gerrand
5dde7ccecf cmd/go: add -t flag to 'go get' to download test dependencies
Fixes #5126.

R=golang-dev, dsymonds, bradfitz, r, rsc, rogpeppe
CC=golang-dev
https://golang.org/cl/12566046
2013-08-14 11:01:17 +10:00
Russ Cox
1a09d70e23 runtime: fix build on arm
Do not use ? :
I cannot say this enough.

TBR=dvyukov
CC=golang-dev
https://golang.org/cl/12903043
2013-08-13 19:37:54 -04:00
Brad Fitzpatrick
a2599cf50e archive/zip: add File.DataOffset
Accessor to find where the bytes of a file start.

R=golang-dev, rsc, dsymonds, adg
CC=golang-dev
https://golang.org/cl/12784045
2013-08-13 16:29:51 -07:00
Mikio Hara
45cb2e1b70 net: make Dial, Listen and ListenPacket return consistent error value
Update #4856

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/12763044
2013-08-14 07:04:39 +09:00
Brad Fitzpatrick
ca3ed9f352 database/sql: add a disabled broken test
Update #6081

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/12810043
2013-08-13 14:56:40 -07:00
Brad Fitzpatrick
c7d352c941 archive/zip: remove an allocation, speed up a test
Update #6138

TestOver65kFiles spends all its time garbage collecting.
Removing the 1.4 MB of allocations per each of the 65k
files brings this from 34 seconds to 0.23 seconds.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/12894043
2013-08-13 14:48:08 -07:00
Rob Pike
c18af467fd encoding/binary: make Write work like Read
Use the fast path calculation to shorten the code.
No effect on benchmarks.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/12696046
2013-08-14 07:03:56 +10:00
Rob Pike
c32a8830bd cmd/go: nicer error diagnosis in go test
Before,
        go test -bench .
would just dump the long generic "go help" message. Confusing and
unhelpful. Now the message is short and on point and also reminds the
user about the oft-forgotten "go help testflag".

        % go test -bench
        go test: missing argument for flag bench
        run "go help test" or "go help testflag" for more information
        %

R=rsc
CC=golang-dev
https://golang.org/cl/12662046
2013-08-14 07:03:18 +10:00
Dmitriy Vyukov
992374f8fb net: fix build fix
Now builders say:
pkg/net/dnsclient_unix_test.go:10: imported and not used: "runtime"

R=golang-dev
CC=golang-dev
https://golang.org/cl/12890043
2013-08-14 00:55:18 +04:00
Dmitriy Vyukov
d90a81c39f net: fix windows build
Windows builders say:
pkg\net\dnsclient_unix_test.go:24: undefined: dnsConfig
pkg\net\dnsclient_unix_test.go:25: undefined: exchange

R=golang-dev
CC=golang-dev
https://golang.org/cl/12889043
2013-08-14 00:44:57 +04:00