Commit Graph

11334 Commits

Author SHA1 Message Date
Luuk van Dijk
93c4e29605 gc: missed typecheck in subscripting a const string.
Fixes #2674.

R=rsc
CC=golang-dev
https://golang.org/cl/5574045
2012-01-23 16:57:12 +01:00
Luuk van Dijk
5ad9e2db28 gc: handle function calls in arguments to builtin complex operations.
Fixes #2582

R=rsc
CC=golang-dev
https://golang.org/cl/5574044
2012-01-23 16:56:57 +01:00
Ivan Krasin
858f0b4d95 compress/flate: delete unused util functions.
R=rsc
CC=golang-dev
https://golang.org/cl/5555071
2012-01-23 10:31:51 -05:00
Mikkel Krautz
280d85a80b ld: fix Mach-O code signing for non-cgo binaries
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5561060
2012-01-23 09:42:09 -05:00
Ivan Krasin
b35cef6704 compress/flate: use append instead of slice+counter.
R=rsc, nigeltao
CC=golang-dev
https://golang.org/cl/5561056
2012-01-23 09:26:14 -05:00
Ivan Krasin
d7e34051fc compress/flate: reduce memory pressure at cost of additional arithmetic operation.
R=rsc
CC=golang-dev
https://golang.org/cl/5555070
2012-01-23 09:19:39 -05:00
Russ Cox
427b5bddcd gc: fix recursion loop in interface comparison
iant's idea.

Fixes #2745.

R=iant, dsymonds
CC=golang-dev
https://golang.org/cl/5536085
2012-01-23 09:19:02 -05:00
Robert Griesemer
2a9c012498 godoc: log node printing error
Invaluable when changing template files.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5571044
2012-01-22 19:36:34 -08:00
Gustavo Niemeyer
5fde5cd5cb encoding/xml: support ignoring fields with "-"
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5564045
2012-01-23 01:34:35 -02:00
Gustavo Niemeyer
fd9c99511e encoding/xml: minor doc fixup
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5564046
2012-01-23 01:32:07 -02:00
Robert Griesemer
abd5bd7d54 go/doc: add more test cases
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5571043
2012-01-22 18:53:18 -08:00
Robert Griesemer
e37792191f go/doc: set Type.Name field
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5569043
2012-01-22 18:52:38 -08:00
Gustavo Niemeyer
57007fe12b encoding/xml: improve []byte handling
Marshalling of []byte in attributes and the general
marshalling of named []byte types was fixed.

A []byte field also won't be nil if an XML element
was mapped to it, even if the element is empty.

Tests were introduced to make sure that *struct{}
fields works correctly for element presence testing.
No changes to the logic made in that regard.

R=rsc
CC=golang-dev
https://golang.org/cl/5539070
2012-01-23 00:50:05 -02:00
Olivier Duperray
9d47526585 doc/progs: Add the usual Copyright notice.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5568043
2012-01-23 11:19:48 +11:00
Olivier Duperray
2eb9733fce doc/codelab/wiki: Add the usual Copyright notice.
R=adg
CC=golang-dev
https://golang.org/cl/5554073
2012-01-23 09:28:32 +11:00
Andrew Gerrand
191873981a go/build: silence all warnings
R=rsc
CC=golang-dev
https://golang.org/cl/5529055
2012-01-23 09:26:46 +11:00
Rob Pike
6e1c0df104 gob: reduce the maximum message size
It was 2^31, but that could cause overflow and trouble.
Reduce it to 2^30 and add a TODO.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/5562049
2012-01-22 12:01:12 -08:00
Ian Lance Taylor
387e7c2742 test: explicitly use variables to avoid gccgo "not used" error
I haven't looked at the source, but the gc compiler appears to
omit "not used" errors when there is an error in the
initializer.  This is harder to do in gccgo, and frankly I
think the "not used" error is still useful even if the
initializer has a problem.  This CL tweaks some tests to avoid
the error, which is not the point of these tests in any case.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5561059
2012-01-22 11:50:45 -08:00
Shenghou Ma
41914c1df8 6l, 8l: remove unused macro definition
Their last use is removed in rev 70ed048caad2.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5532115
2012-01-22 10:35:15 -08:00
Shenghou Ma
e021357673 runtime: update out-of-date comment
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5532118
2012-01-22 10:34:17 -08:00
Rob Pike
87079cc14c bytes: delete the test for huge buffers
It takes too much memory to be reliable and causes
trouble on 32-bit machines.
Sigh.

Fixes #2756.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5567043
2012-01-22 09:25:47 -08:00
Robert Griesemer
e17afa4d0c bytes.Buffer: remove dead code, complete documentation
R=r, dave, r
CC=golang-dev
https://golang.org/cl/5533086
2012-01-21 21:31:21 -08:00
Rob Pike
b0d2713b77 bytes.Buffer: restore panic on out-of-memory
Make the panic detectable, and use that in ioutil.ReadFile to
give an error if the file is too big.

R=golang-dev, minux.ma, bradfitz
CC=golang-dev
https://golang.org/cl/5563045
2012-01-21 09:46:59 -08:00
Ivan Krasin
4d3b9d9757 compress/flate: fix a typo, improve compression rate by 3-4%.
R=rsc
CC=golang-dev
https://golang.org/cl/5556077
2012-01-21 12:18:15 -05:00
Mikio Hara
68daa41d1b net: Dial, ListenPacket with "ip:protocol" network for raw IP sockets
Fixes #2654.

R=rsc
CC=golang-dev
https://golang.org/cl/5545058
2012-01-21 21:51:53 +09:00
David Symonds
c3eddc4503 gc: test case for recursive interface bug.
R=rsc
CC=golang-dev
https://golang.org/cl/5555066
2012-01-21 17:02:54 +11:00
Russ Cox
e56dc0ad37 cmd/go: every test imports regexp
This fixes the bug Rob ran into when editing package bytes.
Regexp imports regexp/syntax, which imports bytes, and
regexp/syntax was not being properly recompiled during a
test of a change to package bytes.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5555065
2012-01-20 23:35:28 -05:00
Ivan Krasin
c4b16a3864 compress/flate: make lazy matching work.
R=rsc, imkrasin
CC=golang-dev
https://golang.org/cl/5554066
2012-01-20 23:35:18 -05:00
Anthony Martin
fb3b27329e os: fix Plan 9 build after more FileMode changes
This should go in after Brad's CL 5553064.

R=bradfitz, rsc
CC=golang-dev
https://golang.org/cl/5555056
2012-01-20 20:01:29 -08:00
Robert Griesemer
35ba05ee28 bytes: simplified logic
Also: Avoid potential crash due to reslicing of nil buffer.

R=r
CC=golang-dev
https://golang.org/cl/5556075
2012-01-20 15:39:14 -08:00
Rob Pike
531ded922f doc/go1: flag, runtime, testing
R=golang-dev, dsymonds, gri
CC=golang-dev
https://golang.org/cl/5557076
2012-01-20 15:38:03 -08:00
Stefan Nilsson
14d7e869eb doc: fix typo in Go for C++ programmers
R=iant
CC=golang-dev
https://golang.org/cl/5555062
2012-01-20 14:44:05 -08:00
Rob Pike
0a1376a1df doc/go1: rearrange a bit, sort the packages
This should make it easier to add the zillion little changes coming.
No content change here beyond a couple of introductory sentences.
Sections have been moved wholesale without editing them.

R=golang-dev, rsc, gri
CC=golang-dev
https://golang.org/cl/5557074
2012-01-20 14:28:48 -08:00
Russ Cox
290e68b983 gc: undo most of 'fix infinite recursion for embedded interfaces'
Preserve test.

changeset:   11593:f1deaf35e1d1
user:        Luuk van Dijk <lvd@golang.org>
date:        Tue Jan 17 10:00:57 2012 +0100
summary:     gc: fix infinite recursion for embedded interfaces

This is causing 'interface type loop' errors during compilation
of a complex program.  I don't understand what's happening
well enough to boil it down to a simple test case, but undoing
this change fixes the problem.

The change being undone is fixing a corner case (uses of
pointer to interface in an interface definition) that basically
only comes up in erroneous Go programs.  Let's not try to
fix this again until after Go 1.

Unfixes issue 1909.

TBR=lvd
CC=golang-dev
https://golang.org/cl/5555063
2012-01-20 17:14:09 -05:00
Rob Pike
696bf79350 bytes.Buffer: turn buffer size overflows into errors
Fixes #2743.

R=golang-dev, gri, r
CC=golang-dev
https://golang.org/cl/5556072
2012-01-20 13:51:49 -08:00
Robert Griesemer
0796c1c3ec encoding/varint: deleted WriteXvarint
Fixes #2748.

R=rsc, r, r
CC=golang-dev
https://golang.org/cl/5557072
2012-01-20 12:57:53 -08:00
Robert Griesemer
6923f6d12a doc/go1.html: fix broken links
R=r
CC=golang-dev
https://golang.org/cl/5555060
2012-01-20 12:57:43 -08:00
Shenghou Ma
c088ebef16 go run: correctly handle -n and -x flags
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5557069
2012-01-20 15:48:01 -05:00
Jeff R. Allen
46e7cb57c9 gc: do not try to add a key with incorrect type to a hash
Fixes #2623.

R=rsc, bradfitz
CC=golang-dev
https://golang.org/cl/5533043
2012-01-20 13:34:38 -05:00
Shenghou Ma
541978af0a libmach: cross compiling support
We already use GOHOSTOS to represent the host OS that the toolchain
        will be run on, so no need to resort to uname(1) to get that (and
        use uname(1) will make cross-compiling for another host impossible).

R=rsc, golang-dev
CC=golang-dev
https://golang.org/cl/5530050
2012-01-20 13:34:30 -05:00
Russ Cox
4ec8fd1cec A+C: Berengar Lehr (individual CLA)
Was added to CONTRIBUTORS file in:

changeset:   7092:638ad4d7d280
user:        Berengar Lehr <Berengar.Lehr@gmx.de>
date:        Tue Jan 11 20:51:35 2011 -0500
summary:     crypto: add twofish package

but never added to AUTHORS file.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5532107
2012-01-20 13:34:25 -05:00
Scott Lawrence
b0360e469c go/ast: respect ImportSpec.EndPos
Fixes #2566.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5541068
2012-01-20 13:34:19 -05:00
Russ Cox
88010973aa go/doc: avoid the name 'a.out' in the testdata
R=golang-dev, gri, r
CC=golang-dev
https://golang.org/cl/5561047
2012-01-20 13:34:11 -05:00
Rob Pike
a67c69cbae goyacc: fix indexing bug when yydebug >= 2
Fixes #2701.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5556070
2012-01-20 10:22:41 -08:00
Shenghou Ma
0a851754a0 misc/xcode/go.xclangspec: fix typo
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/5553049
2012-01-20 07:17:52 -08:00
Dmitriy Vyukov
1ff1405cc7 runtime: add type algorithms for zero-sized types
BenchmarkChanSem old=127ns new=78.6ns

R=golang-dev, bradfitz, sameer, rsc
CC=golang-dev
https://golang.org/cl/5558049
2012-01-20 10:32:55 +04:00
Nigel Tao
43b4db194a tag weekly.2012-01-20
R=dsymonds
CC=golang-dev
https://golang.org/cl/5558059
2012-01-20 17:01:55 +11:00
Nigel Tao
22ef504654 weekly.2012-01-20
R=r
CC=golang-dev
https://golang.org/cl/5557067
2012-01-20 16:57:10 +11:00
Mikio Hara
5e59e8537c net: fix linux build
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5558056
2012-01-19 18:56:17 -08:00
Alex Brainman
8d6958fc04 misc/cgo/test: make tests run on windows
- use proper Win64 gcc calling convention when
  calling initcgo on amd64
- increase g0 stack size to 64K on amd64 to make
  it the same as 386
- implement C.sleep
- do not use C.stat, since it is renamed to C._stat by mingw
- use fopen to implement TestErrno, since C.strtol
  always succeeds on windows
- skip TestSetEnv on windows, because os.Setenv
  sets windows process environment, while C.getenv
  inspects internal C runtime variable instead

R=golang-dev, vcc.163, rsc
CC=golang-dev
https://golang.org/cl/5500094
2012-01-20 12:59:44 +11:00