]> Cypherpunks repositories - gostls13.git/log
gostls13.git
14 years agotemplate: treat map keys as zero, not non-existent.
Roger Peppe [Mon, 24 Jan 2011 19:12:54 +0000 (14:12 -0500)]
template: treat map keys as zero, not non-existent.

R=adg, r, hoka, rsc
CC=golang-dev
https://golang.org/cl/4036045

14 years agonet: return cname in LookupHost
Russ Cox [Mon, 24 Jan 2011 19:12:43 +0000 (14:12 -0500)]
net: return cname in LookupHost

Fixes #1395.

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

14 years agoencoding/line: fix up a few typos and infelicities in the doc comments
Rob Pike [Mon, 24 Jan 2011 18:19:23 +0000 (10:19 -0800)]
encoding/line: fix up a few typos and infelicities in the doc comments

R=anschelsc, agl1
CC=golang-dev
https://golang.org/cl/3988045

14 years agojson: handle capital floating point exponent (1E100).
Pieter Droogendijk [Mon, 24 Jan 2011 08:10:50 +0000 (18:10 +1000)]
json: handle capital floating point exponent (1E100).

When parsing numbers with an exponent (like "12e-1"), the JSON scanner
would only allow a lowercase 'e', while the RFC also allows the
uppercase 'E'.

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

14 years agoA+C: Pieter Droogendijk
Andrew Gerrand [Mon, 24 Jan 2011 08:09:10 +0000 (18:09 +1000)]
A+C: Pieter Droogendijk

R=nigeltao, r2
CC=golang-dev
https://golang.org/cl/4061044

14 years agogob: report an error when encoding a non-empty struct with
Rob Pike [Sat, 22 Jan 2011 08:10:11 +0000 (00:10 -0800)]
gob: report an error when encoding a non-empty struct with
no public fields.
Fix a couple of tests caught out by this change.

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

14 years agoruntime: implementation of callback functions for windows
Alex Brainman [Sat, 22 Jan 2011 02:55:53 +0000 (13:55 +1100)]
runtime: implementation of callback functions for windows

R=rsc, lxn, alex.brainman, dho
CC=golang-dev
https://golang.org/cl/1696051

14 years agogob: fix the grammar comments to match the encoder
Rob Pike [Sat, 22 Jan 2011 00:10:39 +0000 (16:10 -0800)]
gob: fix the grammar comments to match the encoder
(or at least a correct encoder, still to come).
Change the debug structure slightly to better represent
the grammar.
Minor tweaks for consistency in type.go.

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

14 years agogc: clearer error for struct == struct
Russ Cox [Fri, 21 Jan 2011 23:15:59 +0000 (18:15 -0500)]
gc: clearer error for struct == struct

cmp6.go:48: invalid operation: t3 == t3 (operator == not defined on struct)

Fixes #1438.

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

14 years agonet: Fix race condition in test.
Ian Lance Taylor [Fri, 21 Jan 2011 21:57:52 +0000 (13:57 -0800)]
net: Fix race condition in test.

The test code used to do this:

for _, tc := range tests {
ch <- &tc
}

Note that &tc is always the same value here.  As the value is
received from the channel, the sender can loop around and
change the contents of tc.  This means that the receiver's
value is unstable and can change while it is in use.

R=adg, r2, rsc
CC=chris, golang-dev
https://golang.org/cl/3978043

14 years agospec, runtime, tests: send on closed channel panics
Russ Cox [Fri, 21 Jan 2011 20:07:13 +0000 (15:07 -0500)]
spec, runtime, tests: send on closed channel panics

Close of closed channel panics.
Receive from closed channel never panics,
even if done repeatedly.

Fixes #1349.
Fixes #1419.

R=gri, iant, ken2, r, gri1, r2, iant2, rog, albert.strasheim, niemeyer, ejsherry
CC=golang-dev
https://golang.org/cl/3989042

14 years agotest/chan/doubleselect: fix various races
Russ Cox [Fri, 21 Jan 2011 20:06:44 +0000 (15:06 -0500)]
test/chan/doubleselect: fix various races

There were duplicate closes and missing closes,
with the result that the program was rarely testing
as much as it seemed to be.  Now it finishes.

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

14 years agogob: better debugging, commentary
Rob Pike [Fri, 21 Jan 2011 19:28:53 +0000 (11:28 -0800)]
gob: better debugging, commentary

Re-implement the debugging helper to be independent of the existing
implementation.  This is preparatory to a rewrite to clean up issue 1416.
Include a definition of the grammar of the data stream.

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

14 years agocc: remove pickle generation code.
Luuk van Dijk [Fri, 21 Jan 2011 16:59:35 +0000 (17:59 +0100)]
cc: remove pickle generation code.

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

14 years agotest: s/float/float64/
Ian Lance Taylor [Fri, 21 Jan 2011 16:37:58 +0000 (08:37 -0800)]
test: s/float/float64/

Otherwise gccgo gives an extra error message not matched by errchk.

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

14 years agoUse defer to unlock mutex in crypto/rand.
Anschel Schaffer-Cohen [Fri, 21 Jan 2011 15:14:43 +0000 (10:14 -0500)]
Use defer to unlock mutex in crypto/rand.

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

14 years agoFixed documentation for netchan import()
Anschel Schaffer-Cohen [Fri, 21 Jan 2011 03:58:08 +0000 (19:58 -0800)]
Fixed documentation for netchan import()

This was broken after the last update (2011-01-20).
However, I'm not sure if the changed example is a
sensible use of import(), so I'd appreciate comments.

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

14 years agogodoc: show line numbers for non-go files (bug fix)
Robert Griesemer [Thu, 20 Jan 2011 18:43:55 +0000 (10:43 -0800)]
godoc: show line numbers for non-go files (bug fix)

Also: Give line numbers a style and make them less intrusive.

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

14 years agoruntime: drop CLONE_PARENT
Russ Cox [Thu, 20 Jan 2011 18:36:00 +0000 (13:36 -0500)]
runtime: drop CLONE_PARENT

The functionality we want (shared ppid) is implied
by CLONE_THREAD already, and CLONE_PARENT
causes problems if the Go program is pid 1 (init).

See issue 1406 for more details.

Fixes #1406.

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

14 years agogotest: new cgo does not require LD_LIBRARY_PATH
Russ Cox [Thu, 20 Jan 2011 18:11:06 +0000 (13:11 -0500)]
gotest: new cgo does not require LD_LIBRARY_PATH

Fixes #1410.

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

14 years agoencoding/base32: new package
Miek Gieben [Thu, 20 Jan 2011 17:51:15 +0000 (12:51 -0500)]
encoding/base32: new package

R=rsc
CC=Miek Gieben, golang-dev
https://golang.org/cl/3926041

14 years agoA+C: Miek Gieben (individual CLA)
Russ Cox [Thu, 20 Jan 2011 17:51:02 +0000 (12:51 -0500)]
A+C: Miek Gieben (individual CLA)

Also remove second email address from AUTHORS file
in a few cases.  It only has a meaning in the CONTRIBUTORS file.

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

14 years agounsafe: add missing case to doc for Pointer
Russ Cox [Thu, 20 Jan 2011 17:50:50 +0000 (12:50 -0500)]
unsafe: add missing case to doc for Pointer

Fixes #1433.

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

14 years ago6g: fix uint64(uintptr(unsafe.Pointer(&x)))
Russ Cox [Thu, 20 Jan 2011 17:50:35 +0000 (12:50 -0500)]
6g: fix uint64(uintptr(unsafe.Pointer(&x)))

Fixes #1417.

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

14 years agohttp: follow relative redirect in Get
Russ Cox [Thu, 20 Jan 2011 17:50:27 +0000 (12:50 -0500)]
http: follow relative redirect in Get

Fixes #1431.

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

14 years ago5l: document -F, force it on old ARMs
Russ Cox [Thu, 20 Jan 2011 17:50:10 +0000 (12:50 -0500)]
5l: document -F, force it on old ARMs

Fixes #1341.

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

14 years ago8l: emit DWARF in Windows PE.
Wei Guangjing [Thu, 20 Jan 2011 16:28:30 +0000 (11:28 -0500)]
8l: emit DWARF in Windows PE.

R=rsc, lvd, brainman, Joe Poirier
CC=golang-dev
https://golang.org/cl/2124041

14 years agocgo: windows/386 port
Wei Guangjing [Thu, 20 Jan 2011 15:22:20 +0000 (10:22 -0500)]
cgo: windows/386 port

R=rsc, peterGo, brainman
CC=golang-dev
https://golang.org/cl/3733046

14 years ago6l: windows/amd64 port
Wei Guangjing [Thu, 20 Jan 2011 14:21:10 +0000 (09:21 -0500)]
6l: windows/amd64 port

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

14 years agoruntime: fix tabs in windows/386/sys.s
Hector Chu [Thu, 20 Jan 2011 14:21:04 +0000 (09:21 -0500)]
runtime: fix tabs in windows/386/sys.s

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

14 years agoruntime: make select fairer
Russ Cox [Thu, 20 Jan 2011 14:20:47 +0000 (09:20 -0500)]
runtime: make select fairer

The o+i*p approach to visiting select cases in random
order stops being fair when there is some case that
is never ready.  If that happens, then the case that follows
it in the order gets more chances than the others.

In general the only way to ensure fairness is to make
all permutations equally likely.  I've done that by computing
one explicitly.

Makes the permutations correct for n >= 4 where
previously they were broken.  For n > 12, there's not
enough randomness to do a perfect job but this should
still be much better than before.

Fixes #1425.

R=r, ken2, ejsherry
CC=golang-dev
https://golang.org/cl/4037043

14 years agocrypto/openpgp: add s2k
Adam Langley [Thu, 20 Jan 2011 12:38:34 +0000 (07:38 -0500)]
crypto/openpgp: add s2k

s2k implements the string-to-key functions for OpenPGP

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

14 years agosyscall: include all, even duplictate, invented error messages
Alex Brainman [Thu, 20 Jan 2011 10:24:15 +0000 (21:24 +1100)]
syscall: include all, even duplictate, invented error messages

Otherwise syscall.Errstr() returns "" for some (EWOULDBLOCK) errors.

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

14 years agonet: get tests working to fix windows build
Alex Brainman [Thu, 20 Jan 2011 08:18:04 +0000 (19:18 +1100)]
net: get tests working to fix windows build

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

14 years agonet: fix windows build (?)
Russ Cox [Thu, 20 Jan 2011 05:16:16 +0000 (00:16 -0500)]
net: fix windows build (?)

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

14 years agotag release.2011-01-20
Russ Cox [Thu, 20 Jan 2011 05:07:57 +0000 (00:07 -0500)]
tag release.2011-01-20

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

14 years agorelease.2011-01-20 weekly.2011-01-20
Russ Cox [Thu, 20 Jan 2011 05:02:59 +0000 (00:02 -0500)]
release.2011-01-20

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

14 years agodelete float, complex - code changes
Russ Cox [Thu, 20 Jan 2011 04:09:00 +0000 (23:09 -0500)]
delete float, complex - code changes
also:
cmplx -> complex
float64(1.0) -> 1.0
float64(1) -> 1.0

R=gri, r, gri1, r2
CC=golang-dev
https://golang.org/cl/3991043

14 years agogc: delete float, complex
Russ Cox [Thu, 20 Jan 2011 04:08:11 +0000 (23:08 -0500)]
gc: delete float, complex
rename cmplx -> complex

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

14 years agomisc: update type + builtin lists found in editor support files
Russ Cox [Thu, 20 Jan 2011 04:07:49 +0000 (23:07 -0500)]
misc: update type + builtin lists found in editor support files

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

14 years agodocs: float->float64 plus a couple of other tweaks.
Rob Pike [Thu, 20 Jan 2011 04:07:38 +0000 (23:07 -0500)]
docs: float->float64 plus a couple of other tweaks.

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

14 years agogo spec: remove float, complex in favor of float64 and complex128
Robert Griesemer [Thu, 20 Jan 2011 04:07:21 +0000 (23:07 -0500)]
go spec: remove float, complex in favor of float64 and complex128

The default float type is not very useful but for the most basic applications.
For instance, as it is now, using the math package requires conversions for float
variables (the arguments for math functions are usually float64). Typical real
applications tend to specify the floating point precision required.

This proposal removes the predeclared types float and complex. Variable declarations
without type specification but with constant floating point or complex initializer
expressions will assume the type float64 or complex128 respectively.

The predeclared function cmplx is renamed to complex.

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

14 years agotag release.2011-01-19
Andrew Gerrand [Thu, 20 Jan 2011 03:07:21 +0000 (14:07 +1100)]
tag release.2011-01-19

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

14 years agorelease.2011-01-19 weekly.2011-01-19
Andrew Gerrand [Thu, 20 Jan 2011 03:01:32 +0000 (14:01 +1100)]
release.2011-01-19

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

14 years agonet: remove duplicate import of runtime
Andrew Gerrand [Thu, 20 Jan 2011 01:56:32 +0000 (12:56 +1100)]
net: remove duplicate import of runtime

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

14 years agosyscall: attempt to fix windows build, supply missing constant
Andrew Gerrand [Thu, 20 Jan 2011 01:41:59 +0000 (12:41 +1100)]
syscall: attempt to fix windows build, supply missing constant

R=r, brainman, rsc1
CC=golang-dev
https://golang.org/cl/4023043

14 years ago crypto/twofish: update with rsc's comments
Adam Langley [Thu, 20 Jan 2011 00:41:27 +0000 (19:41 -0500)]
crypto/twofish: update with rsc's comments

        TBR=rsc

R=rsc
CC=berengar.lehr, golang-dev
https://golang.org/cl/4050042

14 years agoarm bug with stack adjust
Ken Thompson [Thu, 20 Jan 2011 00:30:13 +0000 (16:30 -0800)]
arm bug with stack adjust

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

14 years agocodereview: fix hg change on Windows
Hector Chu [Thu, 20 Jan 2011 00:02:47 +0000 (19:02 -0500)]
codereview: fix hg change on Windows

hg change fails on Windows with 'No valid patches found in output from hg diff'.

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

14 years agogodoc: enable fulltext index by default
Robert Griesemer [Wed, 19 Jan 2011 22:33:05 +0000 (14:33 -0800)]
godoc: enable fulltext index by default

- added flag -maxresults (default: 10000) to limit the max.
  number of full text results shown
- removed flag -fulltext; use -maxresults=0 to disable fulltext
  index
- better indication on result page if not all results are shown
  (... after line list)

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

14 years agogodoc: enable qualified identifiers ("math.Sin") as query strings again
Robert Griesemer [Wed, 19 Jan 2011 20:48:10 +0000 (12:48 -0800)]
godoc: enable qualified identifiers ("math.Sin") as query strings again

A query string of the form ident.ident will be used both as a qualified
identifier for identifier search and as a regular expression.
Qualified identifier lookup got broken accidentally when introducing
regexp full text search. Cleaned up surrounding logic a bit.

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

14 years agoxml: handle tag paths through the same element
Gustavo Niemeyer [Wed, 19 Jan 2011 20:43:58 +0000 (15:43 -0500)]
xml: handle tag paths through the same element

With the current implementation, xml unmarshalling
will silently fail to unmarshal any paths passing
through the same element, such as:

type T struct {
A string "dummy>a"
B string "dummy>b"
}

This change tweaks the algorithm so that this works
correctly.

Also, using paths that would cause the same element to
unmarshal twice will error out ahead of time explaining
the problem, rather than silently misbehaving.

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

14 years agoruntime/debug: fix build (missing Makefile)
Rob Pike [Wed, 19 Jan 2011 20:36:52 +0000 (12:36 -0800)]
runtime/debug: fix build (missing Makefile)
Why does this happen so often?

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

14 years ago5a, 5l, 6a, 6l, 8a, 8l: handle out of memory, large allocations
Jeff R. Allen [Wed, 19 Jan 2011 20:30:26 +0000 (15:30 -0500)]
5a, 5l, 6a, 6l, 8a, 8l: handle out of memory, large allocations

Fixes #392.

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

14 years agoA+C: Jeff R. Allen (individual CLA)
Russ Cox [Wed, 19 Jan 2011 20:30:18 +0000 (15:30 -0500)]
A+C: Jeff R. Allen (individual CLA)

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

14 years agonetchan: do not block sends; implement flow control.
Roger Peppe [Wed, 19 Jan 2011 20:28:49 +0000 (12:28 -0800)]
netchan: do not block sends; implement flow control.
When data is received for a channel, but that channel
is not ready to receive it, the central run() loop
is currently blocked, but this can lead to deadlock
and interference between independent channels.
This CL adds an explicit buffer size to netchan
channels (an API change) - the sender will not
send values until the buffer is non empty.

The protocol changes to send ids rather than channel names
because acks can still be sent after a channel is hung up,
we we need an identifier that can be ignored.

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

14 years agoruntime/debug: new package
Rob Pike [Wed, 19 Jan 2011 20:28:38 +0000 (12:28 -0800)]
runtime/debug: new package
Facilities for printing stack traces from within a running goroutine.

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

14 years agonet: fix build on freebsd
Russ Cox [Wed, 19 Jan 2011 20:24:25 +0000 (15:24 -0500)]
net: fix build on freebsd

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

14 years agohttp: support for relative URLs
Brad Fitzpatrick [Wed, 19 Jan 2011 20:13:42 +0000 (15:13 -0500)]
http: support for relative URLs

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

14 years agonet: add LookupAddr
Kyle Lemons [Wed, 19 Jan 2011 20:11:03 +0000 (15:11 -0500)]
net: add LookupAddr

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

14 years agoCONTRIBUTORS: secondary email for Kyle Lemons
Russ Cox [Wed, 19 Jan 2011 20:10:58 +0000 (15:10 -0500)]
CONTRIBUTORS: secondary email for Kyle Lemons

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

14 years agowindows: implement exception handling
Hector Chu [Wed, 19 Jan 2011 20:10:15 +0000 (15:10 -0500)]
windows: implement exception handling

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

14 years ago8l: pe changes
Alex Brainman [Wed, 19 Jan 2011 20:10:01 +0000 (15:10 -0500)]
8l: pe changes

Dll names and function names padded to even size.
Refactoring of imports writing code.

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

14 years agonet: implement windows timeout
Wei Guangjing [Wed, 19 Jan 2011 19:49:25 +0000 (14:49 -0500)]
net: implement windows timeout

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

14 years agocodereview: don't mail change lists with no files
Ryan Hitchman [Wed, 19 Jan 2011 19:46:06 +0000 (14:46 -0500)]
codereview: don't mail change lists with no files

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

14 years agonet, syscall: return source address in Recvmsg
Albert Strasheim [Wed, 19 Jan 2011 19:34:53 +0000 (14:34 -0500)]
net, syscall: return source address in Recvmsg

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

14 years agocgo: add complex float, complex double
Sebastien Binet [Wed, 19 Jan 2011 19:30:57 +0000 (14:30 -0500)]
cgo: add complex float, complex double

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

14 years agomath: handle denormals in Frexp, Ilogb, Ldexp, and Logb
Eoghan Sherry [Wed, 19 Jan 2011 19:23:59 +0000 (14:23 -0500)]
math: handle denormals in Frexp, Ilogb, Ldexp, and Logb

Also:
* document special cases for Frexp and Ldexp
* handle ±Inf in Ldexp
* correctly return -0 on underflow in Ldexp
* test special cases for Ldexp
* test boundary cases for Frexp, Ilogb, Ldexp, and Logb

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

14 years agonet: add unixpacket
Albert Strasheim [Wed, 19 Jan 2011 19:21:58 +0000 (14:21 -0500)]
net: add unixpacket

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

14 years agoregexp: reject bare ?
Ben Lynn [Wed, 19 Jan 2011 18:47:04 +0000 (13:47 -0500)]
regexp: reject bare ?

Minor cleanup:
  - removed a duplicate test case
  - added a function to remove repeated code
  - for consistency, replaced "return nil" with a panic at an
    unreachable point

Fixes #1428.

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

14 years agoCONTRIBUTORS: add Ben Lynn (Google employee)
Rob Pike [Wed, 19 Jan 2011 18:46:58 +0000 (13:46 -0500)]
CONTRIBUTORS: add Ben Lynn (Google employee)

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

14 years agoruntime: add per-pause gc stats
Russ Cox [Wed, 19 Jan 2011 18:41:42 +0000 (13:41 -0500)]
runtime: add per-pause gc stats

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

14 years agofmt: document %X of string, []byte
Russ Cox [Wed, 19 Jan 2011 18:35:45 +0000 (13:35 -0500)]
fmt: document %X of string, []byte

suggested by Mark Summerfield

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

14 years agogo spec: adjust language for constant typing
Robert Griesemer [Wed, 19 Jan 2011 18:33:41 +0000 (10:33 -0800)]
go spec: adjust language for constant typing

Fixes #1421.

R=r, rsc, iant, ken2
CC=golang-dev
https://golang.org/cl/4039042

14 years agoA+C: Clement Skau (individual CLA)
Russ Cox [Wed, 19 Jan 2011 15:07:44 +0000 (10:07 -0500)]
A+C: Clement Skau (individual CLA)

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

14 years agohttp: fix Content-Range and Content-Length in response
Clement Skau [Wed, 19 Jan 2011 15:05:48 +0000 (10:05 -0500)]
http: fix Content-Range and Content-Length in response

RFC2616 sections 4.4 and 14.16:
  * Cannot use Content-Length with non-identity Transfer-Encoding
  * Content-Range response is "bytes x-y/z" not "x-y/z"

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

14 years agonet: avoid nil dereference if /etc/services can't be opened
Corey Thomasson [Wed, 19 Jan 2011 14:55:46 +0000 (09:55 -0500)]
net: avoid nil dereference if /etc/services can't be opened

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

14 years agosyscall: fix build. WUNTRACED isn't defined for win32.
Yasuhiro Matsumoto [Wed, 19 Jan 2011 07:00:19 +0000 (23:00 -0800)]
syscall: fix build. WUNTRACED isn't defined for win32.
For Windows, the options for syscall.Wait4() aren't used.
Then this will be dummy value like WNOHANG, WSTOPPED.

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

14 years agocrypto/cipher: fix build (missing file in Makefile)
Rob Pike [Wed, 19 Jan 2011 04:56:55 +0000 (20:56 -0800)]
crypto/cipher: fix build (missing file in Makefile)

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

14 years agoarm register allocation/tempname allocation bug
Ken Thompson [Wed, 19 Jan 2011 04:45:17 +0000 (20:45 -0800)]
arm register allocation/tempname allocation bug

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

14 years agocrypto/cipher: add OFB mode
Adam Langley [Tue, 18 Jan 2011 23:16:06 +0000 (18:16 -0500)]
crypto/cipher: add OFB mode

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

14 years agocc: fix vlong condition
Russ Cox [Tue, 18 Jan 2011 21:28:21 +0000 (16:28 -0500)]
cc: fix vlong condition

Fixes #1032.

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

14 years agogc, runtime: make range on channel safe for multiple goroutines
Russ Cox [Tue, 18 Jan 2011 20:59:19 +0000 (15:59 -0500)]
gc, runtime: make range on channel safe for multiple goroutines

Fixes #397.

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

14 years agoxml: support for > in tags
Gustavo Niemeyer [Tue, 18 Jan 2011 20:39:38 +0000 (15:39 -0500)]
xml: support for > in tags

This introduces support for selecting which subelement
to unmarshal into a given struct field by providing a
nesting path separated by the > character.

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

14 years agoruntime: print signal information during panic
Russ Cox [Tue, 18 Jan 2011 19:15:11 +0000 (14:15 -0500)]
runtime: print signal information during panic

$ 6.out
panic: runtime error: invalid memory address or nil pointer dereference

[signal 11 code=0x1 addr=0x0 pc=0x1c16]

runtime.panic+0xa7 /Users/rsc/g/go/src/pkg/runtime/proc.c:1089
runtime.panic(0xf6c8, 0x25c010)
runtime.panicstring+0x69 /Users/rsc/g/go/src/pkg/runtime/runtime.c:88
runtime.panicstring(0x24814, 0x0)
runtime.sigpanic+0x144 /Users/rsc/g/go/src/pkg/runtime/darwin/thread.c:465
runtime.sigpanic()
main.f+0x16 /Users/rsc/x.go:5
main.f()
main.main+0x1c /Users/rsc/x.go:9
main.main()
runtime.mainstart+0xf /Users/rsc/g/go/src/pkg/runtime/amd64/asm.s:77
runtime.mainstart()
runtime.goexit /Users/rsc/g/go/src/pkg/runtime/proc.c:149
runtime.goexit()

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

14 years agotutorial: update go_tutorial.txt
Rob Pike [Tue, 18 Jan 2011 19:07:02 +0000 (11:07 -0800)]
tutorial: update go_tutorial.txt
should have been included in last CL; no idea why it was not

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

14 years agosyscall: correct WSTOPPED on OS X
Russ Cox [Tue, 18 Jan 2011 19:02:41 +0000 (14:02 -0500)]
syscall: correct WSTOPPED on OS X

Have to set #defines correctly to get correct value.
Otherwise get a mask for use in implementing WIFSTOPPED(status).

Changed WSTOPPED definition in os because on
OS X WSTOPPED and WUNTRACED have different values
even though they seem to mean the same thing.

Fixes #1374.

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

14 years agotutorial: make stdin, stdout, stderr work on Windows.
Rob Pike [Tue, 18 Jan 2011 19:01:47 +0000 (11:01 -0800)]
tutorial: make stdin, stdout, stderr work on Windows.

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

14 years agogodoc: bring back "indexing in progress" message
Robert Griesemer [Tue, 18 Jan 2011 18:59:54 +0000 (10:59 -0800)]
godoc: bring back "indexing in progress" message

A wrongly nested if prevented the message from appearing.

Fixes #1420.

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

14 years agogc: fix typed constant declarations
Anthony Martin [Tue, 18 Jan 2011 16:24:49 +0000 (11:24 -0500)]
gc: fix typed constant declarations

Fixes #1411.

R=rsc, gri, ejsherry
CC=golang-dev
https://golang.org/cl/4035042

14 years agoexpvar: add Float
Jos Visser [Tue, 18 Jan 2011 16:24:43 +0000 (11:24 -0500)]
expvar: add Float

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

14 years agoC: add Jos Visser (Google CLA)
Russ Cox [Tue, 18 Jan 2011 16:24:13 +0000 (11:24 -0500)]
C: add Jos Visser (Google CLA)

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

14 years agosyscall: Correct length of GNU/Linux abstract Unix domain sockaddr.
Ian Lance Taylor [Tue, 18 Jan 2011 16:10:22 +0000 (08:10 -0800)]
syscall: Correct length of GNU/Linux abstract Unix domain sockaddr.

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

14 years agoarm reg bug with SP adjust
Ken Thompson [Tue, 18 Jan 2011 04:39:26 +0000 (20:39 -0800)]
arm reg bug with SP adjust
after call to deferproc

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

14 years agoarm bug address of a string
Ken Thompson [Mon, 17 Jan 2011 21:27:05 +0000 (13:27 -0800)]
arm bug address of a string

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

14 years agoarm reg bug with address(variable)
Ken Thompson [Sun, 16 Jan 2011 23:25:13 +0000 (15:25 -0800)]
arm reg bug with address(variable)

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

14 years agodisable reg - tar test failed
Ken Thompson [Sun, 16 Jan 2011 01:11:24 +0000 (17:11 -0800)]
disable reg - tar test failed

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

14 years agoarm reg bug MOVW into bool variable
Ken Thompson [Sun, 16 Jan 2011 00:55:47 +0000 (16:55 -0800)]
arm reg bug MOVW into bool variable

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

14 years agobytes.Buffer: fix typo in comment (doubled 'to')
Rob Pike [Sat, 15 Jan 2011 07:00:02 +0000 (23:00 -0800)]
bytes.Buffer: fix typo in comment (doubled 'to')

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

14 years agoruntime: fix arm reflect.call boundary case
Russ Cox [Fri, 14 Jan 2011 19:05:20 +0000 (14:05 -0500)]
runtime: fix arm reflect.call boundary case

The fault was lucky: when it wasn't faulting it was silently
copying a word from some other block and later putting
that same word back.  If some other goroutine had changed
that word of memory in the interim, too bad.

The ARM code was inconsistent about whether the
"argument frame" included the saved LR.  Including it made
some things more regular but mostly just caused confusion
in the places where the regularity broke.  Now the rule
reflects reality: argp is always a pointer to arguments,
never a saved link register.

Renamed struct fields to make meaning clearer.

Running ARM in QEMU, package time's gotest:
  * before: 27/58 failed
  * after: 0/50

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