1
0
mirror of https://github.com/golang/go synced 2024-09-25 01:20:13 -06:00
Commit Graph

7342 Commits

Author SHA1 Message Date
Eoghan Sherry
cf63e34b1d gc: correct rounding of denormal constants
Fixes #1463.

R=rsc
CC=golang-dev
https://golang.org/cl/4079060
2011-02-02 22:36:54 -05:00
Hector Chu
fb9fc886ff windows: syscall: Make ForkExec acquire the ForkLock
so that spawned processes avoid inheriting pipes.

Implement CloseOnExec.
Make file and pipe handles inheritable.

R=rsc, brainman, vincent.vanackere
CC=golang-dev
https://golang.org/cl/4126047
2011-02-03 12:50:41 +11:00
Robert Griesemer
68b40fbbb8 Getting Started guide: update for new versions of Mercurial
Newer versions of Mercurial require the configuration
of Certification Authorities.

R=rsc
CC=golang-dev
https://golang.org/cl/4128052
2011-02-02 15:53:32 -08:00
Russ Cox
259a974292 cgo: rename internal f to avoid conflict with possible C global named f
Fixes #1452.

R=r
CC=golang-dev
https://golang.org/cl/4023060
2011-02-02 18:53:03 -05:00
Russ Cox
8a2891fc56 gc: select receive bug fix
Affects receive using := when new variable escapes to heap.

Fixes #1468.

R=ken2
CC=golang-dev
https://golang.org/cl/4119052
2011-02-02 18:34:09 -05:00
Robert Griesemer
c5fc3b6972 fmt: rename internal interfaces
readRuner -> runeReader
unreadRuner -> runeUnreader

R=r, rsc
CC=golang-dev
https://golang.org/cl/4000054
2011-02-02 15:00:14 -08:00
Russ Cox
b287d7cbe1 runtime: more detailed panic traces, line number work
Follow morestack, so that crashes during a stack split
give complete traces.  Also mark stack segment boundaries
as an aid to debugging.

Correct various line number bugs with yet another attempt
at interpreting the pc/ln table.  This one has a chance at
being correct, because I based it on reading src/cmd/ld/lib.c
instead of on reading the documentation.

Fixes #1138.
Fixes #1430.
Fixes #1461.

throw: runtime: split stack overflow

runtime.throw+0x3e /home/rsc/g/go2/src/pkg/runtime/runtime.c:78
        runtime.throw(0x81880af, 0xf75c8b18)
runtime.newstack+0xad /home/rsc/g/go2/src/pkg/runtime/proc.c:728
        runtime.newstack()
runtime.morestack+0x4f /home/rsc/g/go2/src/pkg/runtime/386/asm.s:184
        runtime.morestack()
----- morestack called from stack: -----
runtime.new+0x1a /home/rsc/g/go2/src/pkg/runtime/malloc.c:288
        runtime.new(0x1, 0x0, 0x0)
gongo.makeBoard+0x33 /tmp/Gongo/gongo_robot_test.go:344
        gongo.makeBoard(0x809d238, 0x1, 0xf76092c8, 0x1)
----- stack segment boundary -----
gongo.checkEasyScore+0xcc /tmp/Gongo/gongo_robot_test.go:287
        gongo.checkEasyScore(0xf764b710, 0x0, 0x809d238, 0x1)
gongo.TestEasyScore+0x8c /tmp/Gongo/gongo_robot_test.go:255
        gongo.TestEasyScore(0xf764b710, 0x818a990)
testing.tRunner+0x2f /home/rsc/g/go2/src/pkg/testing/testing.go:132
        testing.tRunner(0xf764b710, 0xf763b5dc, 0x0)
runtime.goexit /home/rsc/g/go2/src/pkg/runtime/proc.c:149
        runtime.goexit()

R=ken2, r
CC=golang-dev
https://golang.org/cl/4000053
2011-02-02 16:44:20 -05:00
Robert Griesemer
827e98d4fd io: rename interfaces
ReadByter -> ByteReader
ReadRuner -> RuneReader

R=r, r2, rsc
CC=golang-dev
https://golang.org/cl/4023062
2011-02-02 13:42:15 -08:00
Russ Cox
fdb46fb470 codereview: record repository, base revision
Include repository URL in initial mail.
Record repository and base revision in patch description.

R=r
CC=golang-dev
https://golang.org/cl/4126052
2011-02-02 16:39:31 -05:00
Rob Pike
029bbe18e0 fmt.Scan: scan binary-exponent floating format, 2.4p-3
R=rsc, rog, r2
CC=golang-dev
https://golang.org/cl/4128049
2011-02-02 12:38:48 -08:00
Russ Cox
bc874ec0dd runtime: correct runtime.GOOS, runtime.GOARCH
If the same directory was used for multiple builds,
it was possible for a stale version.go to contain the
wrong definitions for $GOOS and $GOARCH, because
they can change even if the hg version does not.
Split into multiple files to fix.

R=r, r2
CC=golang-dev
https://golang.org/cl/4124050
2011-02-02 15:35:54 -05:00
Robert Griesemer
bd4e49f524 Effective Go: fix typo
Fixes #1467.

R=r, r2
CC=golang-dev
https://golang.org/cl/3981054
2011-02-02 11:02:56 -08:00
Rob Pike
7c189a8417 sync: tidy a couple of comments.
no semantic change.

R=rsc
CC=golang-dev
https://golang.org/cl/4128048
2011-02-01 21:29:46 -08:00
Rob Pike
03a93158d2 fmt: document %b for floating point
R=rsc
CC=golang-dev
https://golang.org/cl/4073051
2011-02-01 21:10:16 -08:00
Rob Pike
622d729b86 io: add ReadRuner
Put it in the same package as ReadByter.
There is no implementation here for either interface.

R=rsc
CC=golang-dev
https://golang.org/cl/4121051
2011-02-01 21:09:33 -08:00
Rob Pike
8a2d706487 regexp tests: make some benchmarks more meaningful
The first two "Literal" tests were silly.
Also fix a naming typo in a couple of tests.

R=rsc
CC=golang-dev
https://golang.org/cl/4127045
2011-02-01 17:48:42 -08:00
Andrew Gerrand
97ce34244f tag release.2011-02-01.1
R=gri
CC=golang-dev
https://golang.org/cl/4023061
2011-02-02 12:11:29 +11:00
Andrew Gerrand
b08746ee5e release.2011-02-01.1
Re-issue to include go/ast fixes for godoc.

R=gri
CC=golang-dev
https://golang.org/cl/3989058
2011-02-02 12:09:31 +11:00
Robert Griesemer
3a54d43825 go/ast: add missing handling of SendStmt to ast.Walk
R=adg
CC=golang-dev
https://golang.org/cl/4044048
2011-02-01 16:57:45 -08:00
Andrew Gerrand
d203c43568 tag release.2011-02-01
R=rsc
CC=golang-dev
https://golang.org/cl/4124048
2011-02-02 11:02:54 +11:00
Andrew Gerrand
7aa758df0c release.2011-02-01
R=rsc
CC=golang-dev
https://golang.org/cl/4119050
2011-02-02 10:59:59 +11:00
Russ Cox
1fa4173444 5l, 8l: pass stack frame size to morestack when needed
Shame on me: I fixed the same bug in 6l in 8691fcc6a66e
(https://golang.org/cl/2609041) and neglected
to look at 5l and 8l to see if they were affected.

On the positive side, the check I added in that CL is the
one that detected this bug.

Fixes #1457.

R=ken2
CC=golang-dev
https://golang.org/cl/3981052
2011-02-01 18:34:41 -05:00
Rob Pike
80f07cfbea arm: disable peep for release
R=ken2
CC=golang-dev
https://golang.org/cl/4001051
2011-02-01 15:02:07 -08:00
Robert Griesemer
288a39c86b go/ast: reflect communication operator changes accurately in ast
- go/ast: introduce SendStmt; adjust SelectStmt
- go/parser: accept new communication syntax, minor
  unrelated cleanups
- go/printer: adjustments for new ast, fewer binary
  expression precedences
- go/token: remove one binary precedence

Adjusted dependent code. gofmt -w src -misc. Ran all tests.

R=rsc, gri
CC=golang-dev
https://golang.org/cl/3989056
2011-02-01 13:47:51 -08:00
Robert Griesemer
7fc4e37853 go spec: s/log.Crash/log.Panic/
There is no log.Crash.

R=r, rsc
CC=golang-dev
https://golang.org/cl/4058048
2011-02-01 12:51:10 -08:00
Ian Lance Taylor
9040da9e40 ld: Add -I option to set ELF interpreter.
R=rsc
CC=golang-dev
https://golang.org/cl/4080049
2011-02-01 12:49:56 -08:00
Rob Pike
eea18d959e log: rename Exit* to Fatal*
This aligns the naming scheme with the testing package and
also lets govet work on more logging calls.

R=rsc
CC=golang-dev
https://golang.org/cl/4001048
2011-02-01 12:47:35 -08:00
Rob Pike
6a13175f7d govet: add Panic to the list of functions
R=rsc
CC=golang-dev
https://golang.org/cl/4119049
2011-02-01 12:47:09 -08:00
Robert Griesemer
b50ed022f5 go spec: follow-up cleanups after communication operator changes
These are syntactical changes to better reflect the communication
operator's new status in the language.

- sending to a channel is now done via a send statement
- there is no binary communication operation anymore which
  leads to a reduction of the number of precedence levels
  from 6 to 5 (yeah!)
- small semantic change: since a send operation is not part
  of the expression syntax anymore, a <- send operator is
  binding weaker than any other operator now
- receiving from a channel is done as before via the unary
  receive expression
- communication clauses in select statement now can contain
  send statements or receive expressions

R=rsc, r, iant, ken2, gri1
CC=golang-dev
https://golang.org/cl/3973051
2011-02-01 12:02:49 -08:00
Russ Cox
dc9a02fa66 codereview: more ascii vs unicode nonsense
R=r
CC=golang-dev
https://golang.org/cl/4124047
2011-02-01 14:17:41 -05:00
Russ Cox
05b9050bda gc: handle invalid name in type switch
Fixes #1453.

R=ken2
CC=golang-dev
https://golang.org/cl/4125043
2011-02-01 14:00:36 -05:00
Jose Luis Vázquez González
865d576702 http: add host patterns
R=bradfitzgo, rsc
CC=golang-dev
https://golang.org/cl/4070043
2011-02-01 13:58:59 -05:00
Russ Cox
9557103ea6 A+C: Jose Luis Vázquez González (individual CLA)
R=gri, josvazg, gri1
CC=golang-dev
https://golang.org/cl/4044047
2011-02-01 13:31:28 -05:00
Russ Cox
850ad9a402 strconv: add test that trips up other implementations
R=r, gri1
CC=golang-dev
https://golang.org/cl/4092045
2011-02-01 12:48:18 -05:00
Gustavo Niemeyer
59a47732dd exec: use custom error for LookPath
Make the error message and the needed action more obvious
when a command isn't found to obtain the source code
of a project.  Users seem to strugle with the existing
wording in practice.

R=rsc
CC=golang-dev
https://golang.org/cl/4058047
2011-02-01 12:12:51 -05:00
Eoghan Sherry
e6a934a1d9 6g: fix registerization of temporaries
Use correct range in allocated register test.

R=rsc, ken2
CC=golang-dev
https://golang.org/cl/4073049
2011-02-01 12:12:42 -05:00
Gustavo Niemeyer
e71d8a2fe4 6l: add comment to CMOV* relocation
R=rsc
CC=golang-dev
https://golang.org/cl/4042045
2011-02-01 11:49:33 -05:00
Hector Chu
62afa225af windows: multiple improvements and cleanups
The callback mechanism has been made more flexible.
Eliminated one round of argument copying in Syscall.
Faster Get/SetLastError implemented.
Added gettime for gc perf profiling.

R=rsc, brainman, mattn, rog
CC=golang-dev
https://golang.org/cl/4058046
2011-02-01 11:49:24 -05:00
Adam Langley
e308d55973 crypto: add package.
The crypto package is added as a common place to store identifiers for
hash functions. At the moment, the rsa package has an enumeration of
hash functions and knowledge of their digest lengths. This is an
unfortunate coupling and other high level crypto packages tend to need
to duplicate this enumeration and knowledge (i.e. openpgp).

crypto pulls this code out into a common location.

It would also make sense to add similar support for ciphers to crypto,
but the problem there isn't as acute that isn't done in this change.

R=bradfitzgo, r, rsc
CC=golang-dev
https://golang.org/cl/4080046
2011-02-01 11:02:48 -05:00
Mikio Hara
400ea843c6 syscall: add network interface constants for freebsd/386, freebsd/amd64
R=rsc
CC=golang-dev
https://golang.org/cl/4105046
2011-02-01 08:46:21 -05:00
Gustavo Niemeyer
4fd867b283 cgo: define CGO_CFLAGS and CGO_LDFLAGS in Go files
R=rsc, binet
CC=golang-dev
https://golang.org/cl/3921043
2011-02-01 08:44:18 -05:00
Russ Cox
0e47460915 gc: fix send precedence
Test and fix case found by Robert.
Add receive inside send to tree too.

R=ken2
CC=golang-dev
https://golang.org/cl/3973052
2011-02-01 08:29:21 -05:00
Gustavo Niemeyer
5887ef7571 misc/vim: Define import commands on buffer switch
This change fixes the import plugin so that the
defined commands are available when opening a new
Go buffer from within Vim itself.

R=adg, rsc
CC=golang-dev
https://golang.org/cl/3998053
2011-02-01 11:12:57 +11:00
Gustavo Niemeyer
400d7772cc misc/vim: Document better syntax sync parameter
Forcing the synchronization of 500 lines is both slower and
less precise than searching for a known sync point.
Unfortunately, though, the way to synchronize correctly is
using the grouphere instruction, which has a bug.

I've already proposed the fix to Vim, so future releases
should have this working.  We can continue using the 500 lines
syncing for now.

This change just documents the proper way to sync.

R=adg, dsymonds
CC=golang-dev
https://golang.org/cl/4029047
2011-02-01 11:12:45 +11:00
Russ Cox
cb584707af gc: remove non-blocking send, receive syntax
R=ken2
CC=golang-dev
https://golang.org/cl/4126043
2011-01-31 18:52:16 -05:00
Russ Cox
f4e76d8309 replace non-blocking send, receive syntax with select
R=golang-dev, nigeltao, niemeyer, r
CC=golang-dev
https://golang.org/cl/4079053
2011-01-31 18:36:28 -05:00
Rob Pike
fc52d7029f unicode: update to unicode 6.0.0
R=rsc
CC=golang-dev
https://golang.org/cl/3981049
2011-01-31 15:20:44 -08:00
Russ Cox
614391860a ebnflint: exit with non-zero status on error
Tweak spec to avoid ebnflint complaints.

R=gri
CC=golang-dev
https://golang.org/cl/3973050
2011-01-31 17:42:10 -05:00
Rob Pike
6990bc124f doc/progs: make sure all programs compile and run
Fixes #1455.

R=rsc
CC=golang-dev
https://golang.org/cl/4079055
2011-01-31 14:41:36 -08:00
Ian Lance Taylor
31d7efd4d2 .hgignore: Add some more files created by all.bash.
R=rsc
CC=golang-dev
https://golang.org/cl/4105044
2011-01-31 13:21:44 -08:00