Russ Cox
5032a7dc0c
runtime: distinct panic message for call of nil func value
...
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5531062
2012-01-10 11:46:57 -08:00
Brad Fitzpatrick
57f15a3d03
A+C: add Shenghou Ma (Individual CLA)
...
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5528065
2012-01-10 11:13:27 -08:00
Dave Cheney
bc1f4c1823
runtime: regenerate defs_darwin_{386,amd64}.h
...
Regenerated under Lion 10.7.2 amd64.
Also tested on Snow Leopart 10.6.8 386.
R=golang-dev, dsymonds, minux.ma
CC=golang-dev
https://golang.org/cl/5533058
2012-01-10 09:48:10 -08:00
Maxim Pimenov
800c49820a
go: fix typo in comment
...
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5531060
2012-01-10 07:43:48 -08:00
Luuk van Dijk
a6c49098bc
gc: Nicer errors before miscompiling.
...
This fixes issue 2444.
A big cleanup of all 31/32bit size boundaries i'll leave for another cl though. (see also issue 1700).
R=rsc
CC=golang-dev
https://golang.org/cl/5484058
2012-01-10 11:19:22 +01:00
Luuk van Dijk
4bcc9c6b5e
gc: disallow declaration of variables outside package.
...
Fixes #2231 .
Declaring main.i in package main in the same way already triggers syntax errors.
R=rsc
CC=golang-dev
https://golang.org/cl/5483078
2012-01-10 11:18:56 +01:00
Luuk van Dijk
556258e57b
gc: fix stray %#N in error message
...
Fixes #2639 .
R=rsc
CC=bradfitz, golang-dev
https://golang.org/cl/5489140
2012-01-10 11:09:04 +01:00
Luuk van Dijk
ba25778f3f
gc: omit runtime.closure wrap for closures without closure variables
...
Fixes #1894 .
test/closure.go's test for newfunc already covers this.
R=rsc, dsymonds, bradfitz
CC=golang-dev
https://golang.org/cl/5516051
2012-01-10 11:07:35 +01:00
Mikio Hara
ad3e82e736
undo CL 5530063 / 1d7295fdf62e
...
runtime: enable runtime.ncpu on FreeBSD
««« original CL description
cmd/go: fix freebsd build
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5530063
»»»
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5531059
2012-01-10 16:11:31 +09:00
Devon H. O'Dell
12bf00054e
runtime: enable runtime.ncpu on FreeBSD
...
R=adg, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/5528062
2012-01-10 17:39:17 +11:00
Mikio Hara
8cad9251b3
cmd/go: fix freebsd build
...
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5530063
2012-01-10 14:47:20 +09:00
Russ Cox
8d8829c671
cmd/go: add -p flag for parallelism (like make -j)
...
On my MacBookAir4,1:
19.94r go install -a -p 1 std
12.36r go install -a -p 2 std
9.76r go install -a -p 3 std
10.77r go install -a -p 4 std
86.57r go test -p 1 std -short
52.69r go test -p 2 std -short
43.75r go test -p 3 std -short
40.44r go test -p 4 std -short
157.50r go test -p 1 std
99.58r go test -p 2 std
87.24r go test -p 3 std
80.18r go test -p 4 std
R=golang-dev, adg, r
CC=golang-dev
https://golang.org/cl/5531057
2012-01-09 21:06:31 -08:00
Russ Cox
6dfdd4c1e3
runtime: add NumCPU
...
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5528061
2012-01-09 18:45:59 -08:00
Sameer Ajmani
cbf4f4b8d0
strconv: return ErrSyntax when unquoting illegal octal sequences. This
...
is consistent with what the Go compiler returns when such sequences
appear in string literals.
Fixes #2658 .
R=golang-dev, rsc, r, r, nigeltao
CC=golang-dev
https://golang.org/cl/5530051
2012-01-09 19:55:18 -05:00
Robert Griesemer
1320ce00c4
spec: pointer comparison for pointers to 0-sized variables
...
- define "0-sized"
- add clarifying sentence to pointer comparison
- removed notion "location" which was used only in pointer comparisons
and which was never defined
Fixes #2620 .
R=r, rsc, iant
CC=golang-dev
https://golang.org/cl/5528053
2012-01-09 16:54:24 -08:00
Brad Fitzpatrick
024952fb8a
syscall: make Environ return original order
...
Fixes #2619
R=r, rsc
CC=golang-dev
https://golang.org/cl/5528058
2012-01-09 16:51:20 -08:00
Russ Cox
146a703cd1
cmd/go: add -v flag to build and install
...
The -v flag prints the names of packages as they are built/installed.
Use -v in make.bash/run.bash to avoid a silent pause during
the build while Go code is being compiled.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5532055
2012-01-09 16:44:01 -08:00
Russ Cox
b8615a0931
go: add ... patterns in import path arguments
...
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5530058
2012-01-09 16:23:00 -08:00
Robert Griesemer
22dfc77c99
go/doc: first steps towards cleaning up go/doc
...
- separated exported data structures from doc reader
by extracting all exported data structures into doc.go
and moving the implementation into reader.go
- added missing documentation comments
- no API or semantic changes (but moved positions of
PackageDoc.Doc and TypeDoc.Decl field up for consistency)
- runs all tests
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5527063
2012-01-09 16:14:01 -08:00
Nigel Tao
748fab9d11
html: foreign element HTML integration points, tag name adjustment,
...
shorten the MathML namespace abbreviation from "mathml" to "math".
Python's html5lib uses "mathml", but I think that that is an internal
implementation detail; the test cases use "math".
Pass tests10.dat, test 30:
<div><svg><path><foreignObject><math></div>a
| <html>
| <head>
| <body>
| <div>
| <svg svg>
| <svg path>
| <svg foreignObject>
| <math math>
| "a"
R=andybalholm
CC=golang-dev
https://golang.org/cl/5529044
2012-01-10 11:06:09 +11:00
Russ Cox
0ad241dd55
cmd/go: fix import directory list for compilation
...
This fixes the most annoying bug in the go command,
that 'go build' sometimes ignored packages it had just
rebuilt in favor of stale installed ones.
This part of the code needs more thought, but this small
change is an important improvement.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5531053
2012-01-09 15:38:07 -08:00
Anthony Martin
1421b4ceff
syscall: ignore godefs input when building on Plan 9
...
R=golang-dev, akumar, rsc
CC=golang-dev
https://golang.org/cl/5534055
2012-01-09 15:09:40 -08:00
Russ Cox
cc02ef0258
os: add ModeCharDevice
...
This should make conversion from Unix mode
to os.FileMode and back not lossy.
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/5531052
2012-01-09 14:22:53 -08:00
Adam Langley
f942736495
crypto/openpgp: truncate hashes before checking DSA signatures.
...
I didn't believe that OpenPGP allowed > SHA-1 with DSA, but it does and
so we need to perform hash truncation.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5510044
2012-01-09 16:57:51 -05:00
Rémy Oudompheng
f5d024a746
text/template: handle panic values that are not errors.
...
The recover code assumes that the panic() argument was
an error, but it is usually a simple string.
Fixes #2663 .
R=golang-dev, r, r, gri
CC=golang-dev, remy
https://golang.org/cl/5527046
2012-01-09 12:54:31 -08:00
Alexey Borzenkov
793768e9d5
encoding/gob: fix panic when decoding []byte to incompatible slice types
...
Fixes #2662 .
R=golang-dev, rogpeppe, r, r
CC=golang-dev, r, rogpeppe
https://golang.org/cl/5515050
2012-01-09 12:52:03 -08:00
Luuk van Dijk
41806ec26d
gc: remove now redundant typecheck of ->ninit on switches.
...
Fixes #2576 .
R=rsc
CC=golang-dev
https://golang.org/cl/5498105
2012-01-09 21:42:24 +01:00
Ian Lance Taylor
900b8becb3
cgo: if value for constant did not parse, get it from DWARF info
...
R=rsc, borman
CC=golang-dev
https://golang.org/cl/5525043
2012-01-09 11:22:26 -08:00
Robert Griesemer
b4be65bc7f
math/big: simplify fast string conversion
...
- use slice ops for convertWords instead of lo/hi boundaries
- always compute leading zeroes (simplifies logic significantly),
but remove them once, at the end (since leafSize is small, the
worst-case scenario is not adding significant overhead)
- various comment cleanups (specifically, replaced direct -> iterative,
and indirect -> recursive)
- slightly faster overall for -bench=String
(This CL incorporates the changes re: my comments to CL 5418047
https://golang.org/cl/5418047/ )
benchmark old ns/op new ns/op delta
big.BenchmarkString10Base2 519 527 +1.54%
big.BenchmarkString100Base2 2279 2158 -5.31%
big.BenchmarkString1000Base2 18475 17323 -6.24%
big.BenchmarkString10000Base2 178248 166219 -6.75%
big.BenchmarkString100000Base2 1548494 1431587 -7.55%
big.BenchmarkString10Base8 415 422 +1.69%
big.BenchmarkString100Base8 1025 978 -4.59%
big.BenchmarkString1000Base8 6822 6428 -5.78%
big.BenchmarkString10000Base8 64598 61065 -5.47%
big.BenchmarkString100000Base8 593788 549150 -7.52%
big.BenchmarkString10Base10 654 645 -1.38%
big.BenchmarkString100Base10 1863 1835 -1.50%
big.BenchmarkString1000Base10 12099 11981 -0.98%
big.BenchmarkString10000Base10 57601 56888 -1.24%
big.BenchmarkString100000Base10 20123120 19827890 -1.47%
big.BenchmarkString10Base16 358 362 +1.12%
big.BenchmarkString100Base16 815 776 -4.79%
big.BenchmarkString1000Base16 4710 4421 -6.14%
big.BenchmarkString10000Base16 43938 40968 -6.76%
big.BenchmarkString100000Base16 406307 373930 -7.97%
R=michael.jones, mtj
CC=golang-dev
https://golang.org/cl/5432090
2012-01-09 11:20:09 -08:00
Peter Mundy
834830d2bb
doc: use 2012 for year in model standard copyright header
...
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5531048
2012-01-09 10:47:28 -08:00
Florian Weimer
70ed0ac588
go-mode.el: fix syntax highlighting of backticks
...
Instead of syntax-tables, an extended go-mode-cs is used for
from a font-lock callback.
Cache invalidation must happen in a before-change-function
because font-lock runs in an after-change-function, potentially
before the cache invalidation takes place.
Performance is reasonable, even with src/pkg/html/entity.go
and test/fixedbugs/bug257.go.
Fixes #2330 .
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5529045
2012-01-09 12:58:29 -05:00
Russ Cox
8a4bd094a0
undo CL 5504108 / 0edee03791f4
...
breaks 386 build
««« original CL description
gc: put limit on size of exported recursive interface
Prevents edge-case recursive types from consuming excessive memory.
Fixes #1909 .
R=golang-dev, lvd, rsc
CC=golang-dev
https://golang.org/cl/5504108
»»»
R=lvd, lvd
CC=golang-dev
https://golang.org/cl/5534049
2012-01-09 09:45:08 -08:00
Lorenzo Stoakes
aa63a928ea
gc: put limit on size of exported recursive interface
...
Prevents edge-case recursive types from consuming excessive memory.
Fixes #1909 .
R=golang-dev, lvd, rsc
CC=golang-dev
https://golang.org/cl/5504108
2012-01-09 11:48:53 -05:00
Albert Strasheim
2cb6fcf63f
syscall: Linux-only support for parent death signal
...
As discussed in this thread:
https://groups.google.com/group/golang-dev/browse_thread/thread/5b76b7700265a787
I've tried to come up with a solution that is minimally invasive for the platforms that don't support "parent death signal", without splitting up exec_unix.go.
See also: http://www.win.tue.nl/~aeb/linux/lk/lk-5.html#ss5.8
R=rsc, dave, borman, iant, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/5487061
2012-01-09 21:37:46 +09:00
Andrew Gerrand
468e692e38
doc: only trim newlines in tmpltohtml, gofmt progs
...
R=golang-dev, r, r
CC=golang-dev
https://golang.org/cl/5530048
2012-01-09 20:05:34 +11:00
Andrew Gerrand
c7e91724c0
go/build: handle and warn of duplicate GOPATH entries
...
R=golang-dev, alex.brainman
CC=golang-dev
https://golang.org/cl/5519050
2012-01-09 14:24:05 +11:00
Andrew Gerrand
7478bb981a
doc: float -> float64 in Effective Go template
...
R=r, dsymonds
CC=golang-dev
https://golang.org/cl/5530047
2012-01-09 12:48:42 +11:00
Jeff R. Allen
b7f44e97a3
doc: float -> float64 in Effective Go
...
R=golang-dev
CC=golang-dev
https://golang.org/cl/5531046
2012-01-09 11:53:20 +11:00
Wei Guangjing
9569c67a6b
windows: use ArbitraryUserPointer as TLS slot
...
R=hectorchu, alex.brainman
CC=golang-dev
https://golang.org/cl/5519054
2012-01-09 11:23:07 +11:00
Florian Weimer
0448ce13a0
encoding/asn1: document support for *big.Int
...
Also add basic tests.
R=golang-dev
CC=golang-dev
https://golang.org/cl/5533045
2012-01-08 10:02:23 -05:00
Sameer Ajmani
1379d90651
time: fix godoc for After and NewTicker.
...
R=golang-dev, gri, bradfitz, iant
CC=golang-dev, rsc
https://golang.org/cl/5523049
2012-01-07 20:53:53 -05:00
Ryan Hitchman
a15448d65e
gc: improve unsafe.Pointer type-check error messages
...
Fixes #2627 .
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/5498088
2012-01-06 14:34:16 -08:00
Sameer Ajmani
518872bf8f
A+C: add sameer@golang.org to CONTRIBUTORS.
...
R=gri
CC=golang-dev
https://golang.org/cl/5515052
2012-01-06 14:11:51 -08:00
Adam Langley
d4d5bd1bb7
Add Szabolcs Nagy as a contributor.
...
R=iant, gri
CC=golang-dev
https://golang.org/cl/5517056
2012-01-06 12:38:01 -05:00
Robert Griesemer
e36acdfb56
sort: eliminate extra Len() call
...
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5521052
2012-01-05 18:40:17 -08:00
Robert Hencke
a3baccefd6
various: fix prints
...
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5516049
2012-01-05 18:38:01 -08:00
Andrew Gerrand
2c459f14e9
goinstall: fix test data
...
R=gri
CC=golang-dev
https://golang.org/cl/5519048
2012-01-06 09:48:03 +11:00
Eric Eisner
fd1322828c
cmd/go: Pass arguments to command for run
...
Command arguments are separated from input .go file arguments
by a -- separator.
R=rsc, golang-dev, adg
CC=golang-dev
https://golang.org/cl/5514046
2012-01-06 09:23:00 +11:00
Andrew Gerrand
9443949207
doc: add Slices: usage and internals article
...
Originally published on the Go blog on 5 Jan 2011:
http://blog.golang.org/2011/01/go-slices-usage-and-internals.html
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5516046
2012-01-06 09:21:43 +11:00
Andrew Gerrand
c2ea412296
goinstall: use correct checkout URL for Google Code svn repos
...
Fixes #2655 .
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5510045
2012-01-06 09:20:59 +11:00