1
0
mirror of https://github.com/golang/go synced 2024-10-03 14:21:22 -06:00
Commit Graph

13450 Commits

Author SHA1 Message Date
Matt Jibson
3f41199405 A+C: correct Matt Jibson
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/6344088
2012-07-08 12:09:15 +10:00
Matthew William Jibson
f83a47cbb9 doc: various "the the" and other typos
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/6355076
2012-07-08 11:57:04 +10:00
David Symonds
3be9f0b30a A+C: Matthew Jibson (individual CLA).
R=golang-dev, alex.brainman
CC=golang-dev
https://golang.org/cl/6349082
2012-07-08 11:56:26 +10:00
Pieter Droogendijk
34b10d7482 cmd/dist: Make verbose messages print to stderr
Made the following changes:
 - Export errprintf() from all three OS-specific modules
 - Added errprintf() to a.h
 - Moved errprintf() in windows.c under xprintf(), since they are so similar
 - Replaced all instances of xprintf() with errprintf() where a vflag check is done
Fixes #3788.

R=golang-dev, alex.brainman
CC=golang-dev
https://golang.org/cl/6346056
2012-07-06 15:00:18 +10:00
Shenghou Ma
b213891c06 misc/chrome/gophertool: fix manifest
according to http://code.google.com/chrome/extensions/browserAction.html,
it should use "default_popup" instead of "popup".

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/6349077
2012-07-05 16:52:13 -04:00
Shenghou Ma
a49172663c cmd/cgo: make typedef map traversal order consistent
So that _cgo_gotypes.go will be the same for the same source
        code.

R=nigeltao
CC=golang-dev
https://golang.org/cl/6357067
2012-07-05 15:24:33 -04:00
Dmitriy Vyukov
a54f920bfe runtime: move panic/defer/recover-related stuff to a separate file
Move panic/defer/recover-related stuff from proc.c/runtime.c to a new file panic.c.
No semantic changes.
proc.c is 1800+ LOC and is a bit difficult to work with.

R=golang-dev, dave, r
CC=golang-dev
https://golang.org/cl/6343071
2012-07-04 14:52:51 +04:00
Robert Griesemer
6044dbdf1b reflect: reflect.Zero results are neither addressable nor settable
This could be deduced from "The Laws of Reflection" but it seems
worthwhile highlighting it.

R=r
CC=golang-dev
https://golang.org/cl/6350073
2012-07-03 16:06:24 -07:00
Rémy Oudompheng
1a0a09dafe math/rand: avoid use of math.Pow in tests.
The use of math.Pow for mere squaring can be extremely
slow on soft-float ARM. Even on systems with hardware
floating-point, a speedup in test duration is observed.

On amd64
Before: ok      math/rand       2.009s
After:  ok      math/rand       0.340s

Fixes #3740.

R=dave, golang-dev, r, r
CC=golang-dev
https://golang.org/cl/6348061
2012-07-04 00:38:01 +02:00
Brad Fitzpatrick
55cc1ff721 net/http: clean up fs tests a bit
And fix some govet-caught format arg issues.

R=r
CC=golang-dev
https://golang.org/cl/6354068
2012-07-03 10:17:55 -07:00
Rob Pike
b04bf3882b encoding/gob: fix bug in Register
The old code added a star but did not indirect the reflect.Type.

R=bradfitz
CC=golang-dev
https://golang.org/cl/6348067
2012-07-03 10:05:27 -07:00
Shenghou Ma
d9c4cef670 doc/debugging_with_gdb: mention how to disable gc optimization
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6353055
2012-07-03 12:50:03 -04:00
David G. Andersen
7b6541a593 syscall: fix FreeBSD 386 sendfile
The previous version was not handling an off_t (64 bit)
parameter on 32 bit i386 systems.  This patch splits sendfile
into two implementations in their respective arch-specific files.
Tested on FreeBSD amd64 and i386.

R=bradfitz
CC=golang-dev
https://golang.org/cl/6356048
2012-07-03 08:16:43 -07:00
Dmitriy Vyukov
a0c688331f runtime: refactor proc.c
1. Rename 'g' and 'm' local vars to 'gp' and 'mp' (convention already used in some functions)
'g' and 'm' are global vars that mean current goroutine and current machine,
when they are shadowed by local vars, it's confusing, no ability to debug log both, etc.
2. White-space shuffling.
No semantic changes.
In preparation to bigger changes.

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/6355061
2012-07-03 12:54:13 +04:00
Han-Wen Nienhuys
8b7d39e7b6 syscall: use 32 bits structure for Getrlimit/Setrlimit on 386/ARM.
Fixes #2492

R=rsc, bradfitz
CC=golang-dev
https://golang.org/cl/6295073
2012-07-02 22:57:32 -07:00
Nigel Tao
18e86644a3 cmd/gc: cache itab lookup in convT2I.
There may be further savings if convT2I can avoid the function call
if the cache is good and T is uintptr-shaped, a la convT2E, but that
will be a follow-up CL.

src/pkg/runtime:
benchmark                  old ns/op    new ns/op    delta
BenchmarkConvT2ISmall             43           15  -64.01%
BenchmarkConvT2IUintptr           45           14  -67.48%
BenchmarkConvT2ILarge            130          101  -22.31%

test/bench/go1:
benchmark                 old ns/op    new ns/op    delta
BenchmarkBinaryTree17    8588997000   8499058000   -1.05%
BenchmarkFannkuch11      5300392000   5358093000   +1.09%
BenchmarkGobDecode         30295580     31040190   +2.46%
BenchmarkGobEncode         18102070     17675650   -2.36%
BenchmarkGzip             774191400    771591400   -0.34%
BenchmarkGunzip           245915100    247464100   +0.63%
BenchmarkJSONEncode       123577000    121423050   -1.74%
BenchmarkJSONDecode       451969800    596256200  +31.92%
BenchmarkMandelbrot200     10060050     10072880   +0.13%
BenchmarkParse             10989840     11037710   +0.44%
BenchmarkRevcomp         1782666000   1716864000   -3.69%
BenchmarkTemplate         798286600    723234400   -9.40%

R=rsc, bradfitz, go.peter.90, daniel.morsing, dave, uriel
CC=golang-dev
https://golang.org/cl/6337058
2012-07-03 09:09:05 +10:00
David G. Andersen
917f764382 math/big: Remove unnecessary test from nat.go multiplication
The switch at the beginning of the function already ensures n > 1,
so testing for n < 2 is redundant.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/6350051
2012-07-02 15:30:00 -07:00
Dmitriy Vyukov
21de1ab359 reflect: set GOMAXPROCS=1 in the malloc test
Occasionally I see:
--- FAIL: TestAllocations-15 (0.00 seconds)
        all_test.go:1575: 6 mallocs after 100 iterations
Tested:
$ go test -cpu=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 reflect

R=golang-dev, dsymonds, r
CC=golang-dev
https://golang.org/cl/6354063
2012-07-02 20:55:08 +04:00
Dmitriy Vyukov
804e562a62 net/http: fix comment
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/6348062
2012-07-02 20:10:31 +04:00
Shenghou Ma
435a001d68 image: fix doc typo
Fixes #3789.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/6357058
2012-07-01 23:12:42 -04:00
Shenghou Ma
a732cbb593 cmd/gc: add missing case for OCOM in defaultlit()
Fixes #3765.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6349064
2012-07-02 09:33:22 +08:00
Dmitriy Vyukov
91e56e6486 test: enforce 1 proc in the test
otherwise it fails spuriously with "newfunc allocated unexpectedly" message
when run with GOMAXPROCS>1 (other goroutine allocates).

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/6347056
2012-07-01 21:59:50 +04:00
Dmitriy Vyukov
ed516df4e4 runtime: add freemcache() function
It will be required for scheduler that maintains
GOMAXPROCS MCache's.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6350062
2012-07-01 13:10:01 +04:00
Amir Mohammad Saied
35030a9966 cmd/go: httpGet function does not use global variable httpClient
No change, just for consistency.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/6346048
2012-06-30 12:27:57 -07:00
Brad Fitzpatrick
f06b12f0c7 net/http: ignore malicious or dumb Range requests
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/6356050
2012-06-30 12:26:06 -07:00
Brad Fitzpatrick
ccbac5a480 api: update next.txt
Some accumulated changes from the past few weeks.

Just cleans up all.bash output.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/6354056
2012-06-30 12:25:38 -07:00
Pieter Droogendijk
735780c27e cmd/dist: Make windows.c's fatal() print to stderr
Generating env.bat using dist env -wp > env.bat failed silently
if case of an error, because the message was redirected to env.bat.
Verbose messages still go to stdout, causing problems, but that's
a seperate change.
Made errprintf() identical to xprintf(), except for the output handle.
Yes, it's duplicate code, but most of the function is unpacking
the argument list and preparing it for WriteFile(), which has to be
done anyway.

R=golang-dev, alex.brainman
CC=golang-dev
https://golang.org/cl/6343047
2012-07-01 00:27:05 +10:00
Alex Brainman
c644a4ddfe path/filepath: avoid allocation in Clean of cleaned path even on windows (fix build)
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6344049
2012-06-30 22:08:53 +10:00
Shenghou Ma
33d2b495c5 cmd/cgo: generate definitions for GoSlice
Fixes #3741.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6308076
2012-06-30 12:40:07 +08:00
Jean-Marc Eurin
11cafa3a42 misc/emacs: Fix the gofmt patching when the TMPDIR is not the default.
The previous code assumed the gofmt output referred to /tmp but
that's not true if TMPDIR points somewhere else (like on Macs).
Fixes #3782.

R=sameer
CC=golang-dev
https://golang.org/cl/6346050
2012-06-29 12:49:31 -04:00
Brad Fitzpatrick
fa6f9b4a3e net/http: support multiple byte ranges in ServeContent
Fixes #3784

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/6351052
2012-06-29 07:44:04 -07:00
Andrey Mirtchovski
4c3dc1ba74 net/http: Fix a verb-tense mismatch and a typo in documentation.
R=bradfitz
CC=golang-dev
https://golang.org/cl/6357049
2012-06-28 15:18:35 -07:00
Robert Griesemer
72a2abf8ad go/parser: minor internal cleanups
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6356046
2012-06-28 12:22:47 -07:00
Robert Griesemer
71de83b733 go spec: clean up section on selectors
- point out difference between selectors and qualified identifiers
- differentiate between illegal selectors and run-time panics
- use "indirect" as opposed to "dereference" consistently
- add extra links

Fixes #3779.

R=r, rsc, iant, ken
CC=golang-dev
https://golang.org/cl/6326059
2012-06-28 12:22:24 -07:00
Han-Wen Nienhuys
8907f94a51 path/filepath: add test case for rooted ".."
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6350047
2012-06-28 09:46:44 -07:00
Joe Poirier
8357dc9015 syscall: add missing argument type
And update implementation location comment.

R=golang-dev, alex.brainman
CC=golang-dev
https://golang.org/cl/6352046
2012-06-27 18:21:48 -05:00
Mathieu Lonjaret
b6cc39d0dd image/jpeg: support for reading 4:4:0 subsampling.
Updates #2362.

R=nigeltao
CC=golang-dev
https://golang.org/cl/6326057
2012-06-27 14:37:17 -07:00
Russ Cox
71643b2fdb runtime: fix string optimization
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6354048
2012-06-27 17:32:41 -04:00
Russ Cox
8744d35dd3 runtime: avoid allocation for "" + x + ""
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6359043
2012-06-27 17:06:49 -04:00
Russ Cox
f009fefd79 net: fix build (FreeBSD sendfile)
TBR=bradfitz
CC=golang-dev
https://golang.org/cl/6358043
2012-06-27 17:02:39 -04:00
Russ Cox
9525372e31 path/filepath: avoid allocation in Clean of cleaned path
Alternative to https://golang.org/cl/6330044.

Fixes #3681.

R=golang-dev, r, hanwen, iant
CC=golang-dev
https://golang.org/cl/6335056
2012-06-27 16:52:36 -04:00
Dmitriy Vyukov
5a5e698c8f runtime: add goroutine creation benchmark
Current results on 2 core darwin/amd64:
BenchmarkGoroutineChain		351 ns/op
BenchmarkGoroutineChain-2	3840 ns/op
BenchmarkGoroutineChain-4	4040 ns/op
BenchmarkConcGoroutineChain	350 ns/op
BenchmarkConcGoroutineChain-2	875 ns/op
BenchmarkConcGoroutineChain-4	2027 ns/op

R=r, rsc
CC=golang-dev
https://golang.org/cl/6332054
2012-06-27 21:57:49 +04:00
Robert Griesemer
809e06babc go spec: clean up use of QualifiedIdent production.
Fixes #3763.

R=r, rsc, iant, ken
CC=golang-dev
https://golang.org/cl/6333066
2012-06-26 11:49:19 -07:00
Russ Cox
596762e9a1 syscall: fix build
I missed the API change in the last FreeBSD CL, but the tool caught it.

TBR=bradfitz
CC=golang-dev
https://golang.org/cl/6331063
2012-06-25 20:45:18 -04:00
Patrick Mylund Nielsen
abb3c0618b net/http: provide access to POST-only form values
Fixes #3630.

R=rsc
CC=bradfitz, dsymonds, golang-dev, rodrigo.moraes
https://golang.org/cl/6210067
2012-06-25 20:41:46 -04:00
L Campbell
a9a8d7b544 syscall, net: sendfile for FreeBSD
R=golang-dev, rsc, bradfitz, devon.odell
CC=golang-dev
https://golang.org/cl/6221054
2012-06-25 20:26:19 -04:00
Russ Cox
ab14888712 A+C: L Campbell (individual CLA)
Guess I was wrong about being done for the day.

R=golang-dev, r
CC=golang-dev, unpantsu
https://golang.org/cl/6325060
2012-06-25 20:25:59 -04:00
Rob Pike
a308be5fa8 fmt: set p.field before nil check
Fixes #3752.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6331062
2012-06-25 16:48:20 -07:00
Dave Cheney
d1537809ba runtime: add arm soft division and modulo benchmarks
arm soft div and mod performance plays an important part
in runtime performance.

The currently implementation is very stable, but we believe
we can best it. This benchmark provides a reference point.

linux/arm omap4 pandaboard

BenchmarkUint32Div7     10000000               298 ns/op
BenchmarkUint32Div37    10000000               298 ns/op
BenchmarkUint32Div123   10000000               298 ns/op
BenchmarkUint32Div763   10000000               298 ns/op
BenchmarkUint32Div1247  10000000               299 ns/op
BenchmarkUint32Div9305  10000000               298 ns/op
BenchmarkUint32Div13307 10000000               298 ns/op
BenchmarkUint32Div52513 10000000               298 ns/op
BenchmarkUint32Div60978747      10000000               298 ns/op
BenchmarkUint32Div106956295     10000000               297 ns/op
BenchmarkUint32Mod7     10000000               280 ns/op
BenchmarkUint32Mod37    10000000               280 ns/op
BenchmarkUint32Mod123   10000000               280 ns/op
BenchmarkUint32Mod763   10000000               280 ns/op
BenchmarkUint32Mod1247  10000000               280 ns/op
BenchmarkUint32Mod9305  10000000               280 ns/op
BenchmarkUint32Mod13307 10000000               280 ns/op
BenchmarkUint32Mod52513 10000000               280 ns/op
BenchmarkUint32Mod60978747      10000000               280 ns/op
BenchmarkUint32Mod106956295     10000000               280 ns/op

R=minux.ma, rsc
CC=golang-dev
https://golang.org/cl/6258067
2012-06-26 08:58:00 +10:00
Andrew Gerrand
c42a1d4906 doc: drop video title from homepage
It's just stutter.

R=golang-dev, dsymonds, r
CC=golang-dev
https://golang.org/cl/6334053
2012-06-25 14:54:26 -07:00