Russ Cox
7e5055ceea
runtime: malloc fixes
...
* throw away dead code
* add mlookup counter
* add malloc counter
* set up for blocks with no pointers
Fixes #367 .
R=r
https://golang.org/cl/165050
2009-12-03 17:22:23 -08:00
Rob Pike
10a349a7c1
The String() method requires global state that makes it not work outside of this package,
...
so make it a local method (_String()).
R=rsc
CC=golang-dev
https://golang.org/cl/165049
2009-12-03 17:14:32 -08:00
Rob Pike
fcc4dd6d64
error propagation in gob/encoder.
...
R=rsc
CC=golang-dev
https://golang.org/cl/165048
2009-12-03 17:12:57 -08:00
Rob Pike
bc3e34759c
Add ReadFrom and WriteTo methods to bytes.Buffer, to enable i/o without buffer allocation.
...
Use them in Copy and Copyn.
Speed up ReadFile by using ReadFrom and avoiding Copy altogether (a minor win).
R=rsc, gri
CC=golang-dev
https://golang.org/cl/166041
2009-12-03 12:56:16 -08:00
Christopher Wedgwood
7e7008fa5e
gc: Allow allow data types up to 1GB
...
R=rsc
https://golang.org/cl/164095
2009-12-03 12:46:34 -08:00
Robert Griesemer
6db683fe4d
- include type-associated consts and vars when filtering a PackageDoc
...
- fixes a godoc issue (for instance, "godoc os EOF" now shows an entry)
R=r
CC=rsc
https://golang.org/cl/165042
2009-12-03 11:25:20 -08:00
Russ Cox
c6e316a4b9
gc: handle _ = <-c in select.
...
Fixes #238 .
R=ken2
https://golang.org/cl/163098
2009-12-03 01:30:19 -08:00
Russ Cox
05a1eb1ab0
gc: recursive type error
...
Fixes #245 .
R=ken2
https://golang.org/cl/164094
2009-12-03 01:12:02 -08:00
Russ Cox
41861a8812
gc: better diagnosis of initialization loops
...
Fixes bug 292.
R=ken2
https://golang.org/cl/164093
2009-12-03 00:51:03 -08:00
Russ Cox
e733766dda
gc: minor import grammar bug fixes
...
Fixes #364 .
R=ken2
https://golang.org/cl/164092
2009-12-03 00:10:32 -08:00
Rob Pike
d984f98996
minor improvement to formatting: don't allocate padding strings every time.
...
R=rsc
https://golang.org/cl/164090
2009-12-03 00:04:40 -08:00
Russ Cox
272d156357
gc: function argument ordering bug
...
Fixes #370 .
R=ken2
https://golang.org/cl/163097
2009-12-02 23:54:51 -08:00
Russ Cox
8777759f59
gc: make 'invalid rune in string' a little less cryptic
...
Fixes #371 .
R=ken2
https://golang.org/cl/164091
2009-12-02 23:23:11 -08:00
Rob Pike
b0683bd77a
move ReadFile, WriteFile, and ReadDir into a separate io/ioutil package.
...
this breaks the dependency of package io on package bytes.
R=rsc
CC=golang-dev
https://golang.org/cl/163085
2009-12-02 22:02:14 -08:00
Peter Froehlich
1eba218e44
Runes: turn string into []int
...
Split: fixed typo in documentation
R=rsc, r, r1
https://golang.org/cl/157170
2009-12-02 20:47:38 -08:00
Robert Griesemer
c0efa07c65
updated documentation for gofmt
...
R=rsc
https://golang.org/cl/164085
2009-12-02 19:32:15 -08:00
Russ Cox
69c0edd59b
8g: discard tempalloc/tempfree experiment
...
in favor of tempname.
allows optimizer to do more.
unfortunately, optimizer seems to be broken; disable it.
R=ken2
https://golang.org/cl/163091
2009-12-02 18:31:29 -08:00
Russ Cox
fdb030d86f
6g etc: groundwork for eliminating redundant bounds checks.
...
drop check in range over array.
drop check in [256]array indexed by byte.
R=ken2
https://golang.org/cl/163088
2009-12-02 17:30:07 -08:00
Robert Griesemer
dc7355a974
Add flag -tabindent to gofmt: forces use of
...
tabs for indentation even if -spaces is set.
Changes to gofmt:
- added -tabindent flag
- don't recompute parser and printer mode repeatedly
Changes to go/printer:
- provide new printing mode TabIndent
Changes to tabwriter:
- implement new mode TabIndent to use tabs independent
of the actual padding character for leading empty columns
- distinguish between minimal cell width and tab width
(tabwidth is only used if the output contains tabs,
minwidth and padding are always considered)
- fixed and added more comments
- some additional factoring
By default, -tabindent is disabled and the default gofmt
behavior is unchanged. By setting -spaces and -tabindent,
gofmt will use tabs for indentation but do any other
alignment with spaces. This permits a user to change the
visible indentation by simply changing the editor's tab
width and the code will remain properly aligned without
the need to rerun gofmt.
R=rsc
https://golang.org/cl/163068
2009-12-02 16:57:15 -08:00
Russ Cox
e89441ba8f
net: test and fix support for 0-length datagram packets.
...
Fixes #274 .
R=r
CC=jonathan.r.hudson
https://golang.org/cl/163072
2009-12-02 15:17:49 -08:00
Rob Pike
acf4dd4d56
change the naming example from Vector to Ring due to loss of vector.New()
...
R=rsc
CC=golang-dev
https://golang.org/cl/164082
2009-12-02 13:46:02 -08:00
Ian Lance Taylor
ccd026486a
Add copy to the list of predeclared functions.
...
R=gri
https://golang.org/cl/164081
2009-12-02 13:26:39 -08:00
Fazlul Shahriar
0aa13c999b
gofmt: race condition in error reporting and setting exit code
...
How to reproduce:
$ mkdir /tmp/foo
$ cp /dev/null /tmp/foo/bar.go
$ chmod -r /tmp/foo/bar.go
$ gofmt /tmp/foo
open /tmp/foo/bar.go: permission denied
$ echo $? # should echo 2
0
$
Maybe you need to put a call to time.Sleep at the beginning of report().
R=gri
CC=golang-dev
https://golang.org/cl/164073
2009-12-02 13:02:42 -08:00
Robert Griesemer
d8bc797ed5
apply gofmt to json files
...
R=rsc
https://golang.org/cl/164071
2009-12-02 11:40:54 -08:00
Rob Pike
114f73f822
fix segfault printing errors. add test case and improve messages.
...
Fixes #338 .
R=rsc
CC=golang-dev
https://golang.org/cl/163083
2009-12-02 10:41:28 -08:00
Rob Pike
f6c0eba741
test that arrays work properly.
...
can't mix slices and arrays now; perhaps that should be a TODO
R=rsc
https://golang.org/cl/164079
2009-12-02 10:25:14 -08:00
Russ Cox
69f893a127
codereview: move reviewers to cc line after submit,
...
so that the issue stops showing up on the
per-reviewer dashboard page.
R=r
https://golang.org/cl/164075
2009-12-02 09:10:59 -08:00
Russ Cox
9e55d0d018
time: another bug in SecondsToUTC.
...
added random test to look for more.
Fixes #363 .
R=r, cw
https://golang.org/cl/163071
2009-12-02 08:27:57 -08:00
Ian Lance Taylor
952b91e4ad
Add Shutdown to 32-bit GNU/Linux build.
...
Submitting as a TBR to fix the build.
R=dho, rsc
https://golang.org/cl/164078
2009-12-02 08:24:14 -08:00
Devon H. O'Dell
e9a8ab031d
lxml.etree is the wrong location for this alt package
...
on my linux machine this is the correct one. lxml.etree
exists with an ElementTree class, but does not contain
an .XML method.
R=rsc
https://golang.org/cl/163082
2009-12-02 08:18:26 -08:00
Devon H. O'Dell
742221d20b
xml.etree can also be lxml.etree (e.g. CentOS 5.4 with Python 2.4.3)
...
R=rsc
CC=golang-dev
https://golang.org/cl/164053
2009-12-02 01:16:38 -08:00
Russ Cox
8d652ee8ce
time: fix handling of Jan 1 1601, 1201, 801, ...
...
R=r
CC=hurtonm
https://golang.org/cl/164074
2009-12-01 23:38:06 -08:00
Devon H. O'Dell
eb16346dac
net: fix netFD.Close races
...
Fixes #271 .
Fixes #321 .
R=rsc, agl, cw
CC=golang-dev
https://golang.org/cl/163052
2009-12-01 23:28:57 -08:00
Rob Pike
ff3ea68e52
explicitly catch attempt to decode into a value - must be a pointer to see the result.
...
R=rsc
https://golang.org/cl/163070
2009-12-01 21:47:00 -08:00
Rob Pike
f9810f1b12
make io.ReadFile use Stat.Size as a hint for preallocation
...
R=rsc
CC=golang-dev
https://golang.org/cl/163069
2009-12-01 21:44:24 -08:00
Devon H. O'Dell
49ebcfbb83
Add syscall.Shutdown to FreeBSD i386/amd64
...
Necessary for 163052
R=rsc
CC=golang-dev
https://golang.org/cl/164068
2009-12-01 21:43:39 -08:00
Evan Shaw
1664e81585
8g: Match sgen definition to declaration
...
R=rsc
CC=golang-dev
https://golang.org/cl/164069
2009-12-01 21:42:35 -08:00
Devon H. O'Dell
fd7e1a2d87
FreeBSD needs #!/usr/bin/env bash (fixes broken build on FreeBSD)
...
R=gri
https://golang.org/cl/163067
2009-12-01 19:30:17 -08:00
Russ Cox
0b126c1be4
syscall: add Shutdown on OS X, add more constants in mkerror.sh
...
R=dho
CC=golang-dev
https://golang.org/cl/163061
2009-12-01 16:53:43 -08:00
David Symonds
42ec02be36
Add 'copy' as a Go builtin function for Vim syntax highlighter spec.
...
R=rsc
https://golang.org/cl/163049
2009-12-01 16:45:21 -08:00
Rob Pike
ceb1fe2863
update package unicode to Unicode 5.2
...
R=rsc
CC=golang-dev
https://golang.org/cl/163062
2009-12-01 16:22:21 -08:00
Russ Cox
2a54997baa
gob: fix build
...
TBR=r
https://golang.org/cl/163064
2009-12-01 16:18:27 -08:00
Robert Griesemer
e919275825
Integrated feedback by Ken.
...
Easy stuff in this round, more to come.
R=iant, rsc, r, ken2
https://golang.org/cl/163058
2009-12-01 16:15:53 -08:00
Christopher Wedgwood
4f6dbc6901
Explicitly return values where it's shadowing the parameter.
...
Bad returns noticed by "Devon H. O'Dell" <devon.odell@gmail.com>.
Resolves Issue 360.
R=rsc, dho, agl, agl1
CC=ukai
https://golang.org/cl/163055
2009-12-01 15:54:49 -08:00
Charles L. Dorian
e1c347ca59
8g: fix 386 floating point stack bug
...
Also fixes issue 310 comment 5 error.
Fixes #310 .
R=rsc
https://golang.org/cl/163042
2009-12-01 15:53:50 -08:00
Rob Pike
a0f742d343
more gob bugs
...
1) need to send slice and array types (was only sending element types)
2) compatibleType needs to use decoder's type map
R=rsc
CC=golang-dev
https://golang.org/cl/164062
2009-12-01 15:31:28 -08:00
Robert Griesemer
749da968e4
make test.sh work again
...
R=rsc
https://golang.org/cl/164059
2009-12-01 13:08:36 -08:00
Russ Cox
20cacd64f1
A/C: add Charles L. Dorian
...
R=r
https://golang.org/cl/164060
2009-12-01 12:45:41 -08:00
Sven Almgren
5dd66f01cd
Added Sven Almgren to AUTHORS and CONTRIBUTORS
...
R=rsc
https://golang.org/cl/163053
2009-12-01 12:07:43 -08:00
Rob Pike
67dc2ae3a6
a couple of usage fixups in prof
...
R=rsc
https://golang.org/cl/161050
2009-12-01 11:35:34 -08:00