]> Cypherpunks repositories - gostls13.git/log
gostls13.git
14 years agogc, ld: package name main no longer reserved
Russ Cox [Thu, 3 Feb 2011 19:17:20 +0000 (14:17 -0500)]
gc, ld: package name main no longer reserved

R=ken2
CC=golang-dev
https://golang.org/cl/4128054

14 years agosyscall: add SetsockoptIpMreq
Dave Cheney [Thu, 3 Feb 2011 19:15:35 +0000 (14:15 -0500)]
syscall: add SetsockoptIpMreq

notes:
* due to Issue 1466 the Msghdr struct for
 src/pkg/syscall/ztypes_darwin_386.go
 src/pkg/syscall/ztypes_darwin_amd64.go
had to be edited after the godefs generation.
* ztypes_*.go files for linux, freebsd and darwin
have been prepared on the correct host OS and ARCH.
While the total increase is a dozen lines per file
the diff is larger due to a change to godefs,
 http://code.google.com/p/go/source/detail?r=c79e30afe9c8
while has altered the names of Pad members which
causes gofmt to realign the affected structs

R=rsc, mikioh
CC=golang-dev
https://golang.org/cl/4119053

14 years agoA+C: Dave Cheney (individual CLA)
Russ Cox [Thu, 3 Feb 2011 19:15:27 +0000 (14:15 -0500)]
A+C: Dave Cheney (individual CLA)

R=adg, gri
CC=golang-dev
https://golang.org/cl/4126055

14 years agogo spec: adjust notion of Assignability
Robert Griesemer [Thu, 3 Feb 2011 18:53:31 +0000 (10:53 -0800)]
go spec: adjust notion of Assignability

This change makes it legal to pass a struct value as receiver
outside the package declaring the struct even if the respective
struct type has non-exported fields.

This is a backwards-compatible language change motivated by the
fact that it is already possible to circumvent the assignment
restriction when calling methods through interfaces (see issue
1402).

R=r, rsc, iant, ken2
CC=golang-dev
https://golang.org/cl/3926044

14 years agocgo: os/arch dependent #cgo directives
Gustavo Niemeyer [Thu, 3 Feb 2011 18:51:47 +0000 (13:51 -0500)]
cgo: os/arch dependent #cgo directives

This enables #cgo directives to contain a os/arch
specification which restricts the definition of
the given option to matching systems.

For example:

#cgo amd64 CFLAGS: -DAMD64=1
#cgo linux CFLAGS: -DLINUX=1
#cgo linux/amd64 CFLAGS: -DLINUX_ON_AMD64=1

R=rsc
CC=golang-dev
https://golang.org/cl/4121048

14 years agogc, ld: detect stale or incompatible object files
Russ Cox [Thu, 3 Feb 2011 18:51:43 +0000 (13:51 -0500)]
gc, ld: detect stale or incompatible object files

The object files begin with a header that is

        $GOARCH

on a line by itself.  This CL changes that header to

        go object $GOOS $GOARCH release.2011-01-01 4567+

where the final two fields are the most recent release
tag and the current hg version number.

All objects imported into a Go compilation or linked into an
executable must have the same header line, and that header
line must match the compiler and linker versions.

The effect of this will be that if you update and run all.bash
and then try to link in objects compiled with an earlier version
of the compiler (or invoke the wrong version of the compiler),
you will get an error showing the different headers instead
of perhaps silent incompatibility.

Normal usage with all.bash should be unaffected, because
all.bash deletes all the object files in $GOROOT/pkg/$GOOS_$GOARCH
and cleans all intermediate object files before starting.

This change is intended to diagnose stale objects arising when
users maintaining alternate installation directories forget to
rebuild some of their files after updating.

It should help make the adoption of $GOPATH (CL 3780043)
less error-prone.

R=ken2, r
CC=golang-dev
https://golang.org/cl/4023063

14 years agospec: allow imported packages named main
Russ Cox [Thu, 3 Feb 2011 18:40:51 +0000 (13:40 -0500)]
spec: allow imported packages named main

Prior to this CL, there were two requirements about the
package name main.

1. The package that sits at the root of the import graph
   (the one where program execution begins)
   must be named main.

2. No other package in the program can be named main.

This CL only removes requirement #2, which can be done
without changing any other Go documentation.

The new wording and formatting is such that removing
requirement #1 can be done by deleting a single line,
but making that change is explicitly outside the scope
of this CL, because it would require changes to other
documentation at the same time.

R=gri, r, gri1
CC=golang-dev
https://golang.org/cl/4126053

14 years agocrypto/openpgp/packet: add basic routines
Adam Langley [Thu, 3 Feb 2011 14:22:40 +0000 (09:22 -0500)]
crypto/openpgp/packet: add basic routines

Since nobody suggested major changes to the higher level API, I'm
splitting up the lower level code for review. This is the first of the
changes for the packet reading/writing code.

It deliberately doesn't include a Makefile because the package is
incomplete.

R=bradfitzgo
CC=golang-dev
https://golang.org/cl/4080051

14 years agocrypto/openpgp/armor: bug fixes
Adam Langley [Thu, 3 Feb 2011 14:19:20 +0000 (09:19 -0500)]
crypto/openpgp/armor: bug fixes

* Don't require lines to be full.
* Don't forget to flush the line buffer.
* Update the test so that it doesn't happen to include only full lines
  in order to test the above.
* Always write the line after the header as GNUPG expects it.

R=bradfitzgo
CC=golang-dev
https://golang.org/cl/4124043

14 years agocrypto/cipher: add resync open to OCFB mode.
Adam Langley [Thu, 3 Feb 2011 14:17:42 +0000 (09:17 -0500)]
crypto/cipher: add resync open to OCFB mode.

OpenPGP changed its OCFB mode for more modern packets (for example, the
MDC symmetrically encrypted packet). This change adds a bool to
determine which mode is used.

R=bradfitzgo, r, rsc
CC=golang-dev
https://golang.org/cl/4126041

14 years agobuild: fix spaces in GOROOT
Christopher Nielsen [Thu, 3 Feb 2011 05:42:03 +0000 (00:42 -0500)]
build: fix spaces in GOROOT

Fixes #1413.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4007041

14 years agoA+C: add Christopher Nielsen (individual CLA)
Russ Cox [Thu, 3 Feb 2011 05:36:24 +0000 (00:36 -0500)]
A+C: add Christopher Nielsen (individual CLA)

R=golang-dev, r2
CC=golang-dev
https://golang.org/cl/3989061

14 years agoruntime: faster allocator, garbage collector
Russ Cox [Thu, 3 Feb 2011 04:03:47 +0000 (23:03 -0500)]
runtime: faster allocator, garbage collector

GC is still single-threaded.
Multiple threads will happen in another CL.

Garbage collection pauses are typically
about half as long as they were before this CL.

R=brainman, iant, r
CC=golang-dev
https://golang.org/cl/3975046

14 years agowindows: fix build?
Russ Cox [Thu, 3 Feb 2011 03:53:10 +0000 (22:53 -0500)]
windows: fix build?

Shot in the dark.

TBR=r
CC=golang-dev
https://golang.org/cl/4126054

14 years agocodereview: fix hgpatch on windows
Yasuhiro Matsumoto [Thu, 3 Feb 2011 03:43:40 +0000 (22:43 -0500)]
codereview: fix hgpatch on windows

R=rsc
CC=golang-dev
https://golang.org/cl/3989059

14 years agocgo: fix _cgo_run timestamp file order
Gustavo Niemeyer [Thu, 3 Feb 2011 03:37:40 +0000 (22:37 -0500)]
cgo: fix _cgo_run timestamp file order

The timestamp file is being created before cgo
runs, which means errors will not prevent it
from being created and thus will cause the
build to break by rendering the rule up-to-date
when it isn't.

R=rsc
CC=golang-dev
https://golang.org/cl/4001049

14 years agogc: correct rounding of denormal constants
Eoghan Sherry [Thu, 3 Feb 2011 03:36:54 +0000 (22:36 -0500)]
gc: correct rounding of denormal constants

Fixes #1463.

R=rsc
CC=golang-dev
https://golang.org/cl/4079060

14 years agowindows: syscall: Make ForkExec acquire the ForkLock
Hector Chu [Thu, 3 Feb 2011 01:50:41 +0000 (12:50 +1100)]
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

14 years agoGetting Started guide: update for new versions of Mercurial
Robert Griesemer [Wed, 2 Feb 2011 23:53:32 +0000 (15:53 -0800)]
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

14 years agocgo: rename internal f to avoid conflict with possible C global named f
Russ Cox [Wed, 2 Feb 2011 23:53:03 +0000 (18:53 -0500)]
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

14 years agogc: select receive bug fix
Russ Cox [Wed, 2 Feb 2011 23:34:09 +0000 (18:34 -0500)]
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

14 years agofmt: rename internal interfaces
Robert Griesemer [Wed, 2 Feb 2011 23:00:14 +0000 (15:00 -0800)]
fmt: rename internal interfaces

readRuner -> runeReader
unreadRuner -> runeUnreader

R=r, rsc
CC=golang-dev
https://golang.org/cl/4000054

14 years agoruntime: more detailed panic traces, line number work
Russ Cox [Wed, 2 Feb 2011 21:44:20 +0000 (16:44 -0500)]
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

14 years agoio: rename interfaces
Robert Griesemer [Wed, 2 Feb 2011 21:42:15 +0000 (13:42 -0800)]
io: rename interfaces

ReadByter -> ByteReader
ReadRuner -> RuneReader

R=r, r2, rsc
CC=golang-dev
https://golang.org/cl/4023062

14 years agocodereview: record repository, base revision
Russ Cox [Wed, 2 Feb 2011 21:39:31 +0000 (16:39 -0500)]
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

14 years agofmt.Scan: scan binary-exponent floating format, 2.4p-3
Rob Pike [Wed, 2 Feb 2011 20:38:48 +0000 (12:38 -0800)]
fmt.Scan: scan binary-exponent floating format, 2.4p-3

R=rsc, rog, r2
CC=golang-dev
https://golang.org/cl/4128049

14 years agoruntime: correct runtime.GOOS, runtime.GOARCH
Russ Cox [Wed, 2 Feb 2011 20:35:54 +0000 (15:35 -0500)]
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

14 years agoEffective Go: fix typo
Robert Griesemer [Wed, 2 Feb 2011 19:02:56 +0000 (11:02 -0800)]
Effective Go: fix typo

Fixes #1467.

R=r, r2
CC=golang-dev
https://golang.org/cl/3981054

14 years agosync: tidy a couple of comments.
Rob Pike [Wed, 2 Feb 2011 05:29:46 +0000 (21:29 -0800)]
sync: tidy a couple of comments.
no semantic change.

R=rsc
CC=golang-dev
https://golang.org/cl/4128048

14 years agofmt: document %b for floating point
Rob Pike [Wed, 2 Feb 2011 05:10:16 +0000 (21:10 -0800)]
fmt: document %b for floating point

R=rsc
CC=golang-dev
https://golang.org/cl/4073051

14 years agoio: add ReadRuner
Rob Pike [Wed, 2 Feb 2011 05:09:33 +0000 (21:09 -0800)]
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

14 years agoregexp tests: make some benchmarks more meaningful
Rob Pike [Wed, 2 Feb 2011 01:48:42 +0000 (17:48 -0800)]
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

14 years agotag release.2011-02-01.1
Andrew Gerrand [Wed, 2 Feb 2011 01:11:29 +0000 (12:11 +1100)]
tag release.2011-02-01.1

R=gri
CC=golang-dev
https://golang.org/cl/4023061

14 years agorelease.2011-02-01.1 weekly.2011-02-01.1
Andrew Gerrand [Wed, 2 Feb 2011 01:09:31 +0000 (12:09 +1100)]
release.2011-02-01.1

Re-issue to include go/ast fixes for godoc.

R=gri
CC=golang-dev
https://golang.org/cl/3989058

14 years agogo/ast: add missing handling of SendStmt to ast.Walk
Robert Griesemer [Wed, 2 Feb 2011 00:57:45 +0000 (16:57 -0800)]
go/ast: add missing handling of SendStmt to ast.Walk

R=adg
CC=golang-dev
https://golang.org/cl/4044048

14 years agotag release.2011-02-01
Andrew Gerrand [Wed, 2 Feb 2011 00:02:54 +0000 (11:02 +1100)]
tag release.2011-02-01

R=rsc
CC=golang-dev
https://golang.org/cl/4124048

14 years agorelease.2011-02-01 weekly.2011-02-01
Andrew Gerrand [Tue, 1 Feb 2011 23:59:59 +0000 (10:59 +1100)]
release.2011-02-01

R=rsc
CC=golang-dev
https://golang.org/cl/4119050

14 years ago5l, 8l: pass stack frame size to morestack when needed
Russ Cox [Tue, 1 Feb 2011 23:34:41 +0000 (18:34 -0500)]
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

14 years agoarm: disable peep for release
Rob Pike [Tue, 1 Feb 2011 23:02:07 +0000 (15:02 -0800)]
arm: disable peep for release

R=ken2
CC=golang-dev
https://golang.org/cl/4001051

14 years agogo/ast: reflect communication operator changes accurately in ast
Robert Griesemer [Tue, 1 Feb 2011 21:47:51 +0000 (13:47 -0800)]
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

14 years agogo spec: s/log.Crash/log.Panic/
Robert Griesemer [Tue, 1 Feb 2011 20:51:10 +0000 (12:51 -0800)]
go spec: s/log.Crash/log.Panic/

There is no log.Crash.

R=r, rsc
CC=golang-dev
https://golang.org/cl/4058048

14 years agold: Add -I option to set ELF interpreter.
Ian Lance Taylor [Tue, 1 Feb 2011 20:49:56 +0000 (12:49 -0800)]
ld: Add -I option to set ELF interpreter.

R=rsc
CC=golang-dev
https://golang.org/cl/4080049

14 years agolog: rename Exit* to Fatal*
Rob Pike [Tue, 1 Feb 2011 20:47:35 +0000 (12:47 -0800)]
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

14 years agogovet: add Panic to the list of functions
Rob Pike [Tue, 1 Feb 2011 20:47:09 +0000 (12:47 -0800)]
govet: add Panic to the list of functions

R=rsc
CC=golang-dev
https://golang.org/cl/4119049

14 years agogo spec: follow-up cleanups after communication operator changes
Robert Griesemer [Tue, 1 Feb 2011 20:02:49 +0000 (12:02 -0800)]
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

14 years agocodereview: more ascii vs unicode nonsense
Russ Cox [Tue, 1 Feb 2011 19:17:41 +0000 (14:17 -0500)]
codereview: more ascii vs unicode nonsense

R=r
CC=golang-dev
https://golang.org/cl/4124047

14 years agogc: handle invalid name in type switch
Russ Cox [Tue, 1 Feb 2011 19:00:36 +0000 (14:00 -0500)]
gc: handle invalid name in type switch

Fixes #1453.

R=ken2
CC=golang-dev
https://golang.org/cl/4125043

14 years agohttp: add host patterns
Jose Luis Vázquez González [Tue, 1 Feb 2011 18:58:59 +0000 (13:58 -0500)]
http: add host patterns

R=bradfitzgo, rsc
CC=golang-dev
https://golang.org/cl/4070043

14 years agoA+C: Jose Luis Vázquez González (individual CLA)
Russ Cox [Tue, 1 Feb 2011 18:31:28 +0000 (13:31 -0500)]
A+C: Jose Luis Vázquez González (individual CLA)

R=gri, josvazg, gri1
CC=golang-dev
https://golang.org/cl/4044047

14 years agostrconv: add test that trips up other implementations
Russ Cox [Tue, 1 Feb 2011 17:48:18 +0000 (12:48 -0500)]
strconv: add test that trips up other implementations

R=r, gri1
CC=golang-dev
https://golang.org/cl/4092045

14 years agoexec: use custom error for LookPath
Gustavo Niemeyer [Tue, 1 Feb 2011 17:12:51 +0000 (12:12 -0500)]
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

14 years ago6g: fix registerization of temporaries
Eoghan Sherry [Tue, 1 Feb 2011 17:12:42 +0000 (12:12 -0500)]
6g: fix registerization of temporaries

Use correct range in allocated register test.

R=rsc, ken2
CC=golang-dev
https://golang.org/cl/4073049

14 years ago6l: add comment to CMOV* relocation
Gustavo Niemeyer [Tue, 1 Feb 2011 16:49:33 +0000 (11:49 -0500)]
6l: add comment to CMOV* relocation

R=rsc
CC=golang-dev
https://golang.org/cl/4042045

14 years agowindows: multiple improvements and cleanups
Hector Chu [Tue, 1 Feb 2011 16:49:24 +0000 (11:49 -0500)]
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

14 years agocrypto: add package.
Adam Langley [Tue, 1 Feb 2011 16:02:48 +0000 (11:02 -0500)]
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

14 years agosyscall: add network interface constants for freebsd/386, freebsd/amd64
Mikio Hara [Tue, 1 Feb 2011 13:46:21 +0000 (08:46 -0500)]
syscall: add network interface constants for freebsd/386, freebsd/amd64

R=rsc
CC=golang-dev
https://golang.org/cl/4105046

14 years agocgo: define CGO_CFLAGS and CGO_LDFLAGS in Go files
Gustavo Niemeyer [Tue, 1 Feb 2011 13:44:18 +0000 (08:44 -0500)]
cgo: define CGO_CFLAGS and CGO_LDFLAGS in Go files

R=rsc, binet
CC=golang-dev
https://golang.org/cl/3921043

14 years agogc: fix send precedence
Russ Cox [Tue, 1 Feb 2011 13:29:21 +0000 (08:29 -0500)]
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

14 years agomisc/vim: Define import commands on buffer switch
Gustavo Niemeyer [Tue, 1 Feb 2011 00:12:57 +0000 (11:12 +1100)]
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

14 years agomisc/vim: Document better syntax sync parameter
Gustavo Niemeyer [Tue, 1 Feb 2011 00:12:45 +0000 (11:12 +1100)]
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

14 years agogc: remove non-blocking send, receive syntax
Russ Cox [Mon, 31 Jan 2011 23:52:16 +0000 (18:52 -0500)]
gc: remove non-blocking send, receive syntax

R=ken2
CC=golang-dev
https://golang.org/cl/4126043

14 years agoreplace non-blocking send, receive syntax with select
Russ Cox [Mon, 31 Jan 2011 23:36:28 +0000 (18:36 -0500)]
replace non-blocking send, receive syntax with select

R=golang-dev, nigeltao, niemeyer, r
CC=golang-dev
https://golang.org/cl/4079053

14 years agounicode: update to unicode 6.0.0
Rob Pike [Mon, 31 Jan 2011 23:20:44 +0000 (15:20 -0800)]
unicode: update to unicode 6.0.0

R=rsc
CC=golang-dev
https://golang.org/cl/3981049

14 years agoebnflint: exit with non-zero status on error
Russ Cox [Mon, 31 Jan 2011 22:42:10 +0000 (17:42 -0500)]
ebnflint: exit with non-zero status on error

Tweak spec to avoid ebnflint complaints.

R=gri
CC=golang-dev
https://golang.org/cl/3973050

14 years agodoc/progs: make sure all programs compile and run
Rob Pike [Mon, 31 Jan 2011 22:41:36 +0000 (14:41 -0800)]
doc/progs: make sure all programs compile and run

Fixes #1455.

R=rsc
CC=golang-dev
https://golang.org/cl/4079055

14 years ago.hgignore: Add some more files created by all.bash.
Ian Lance Taylor [Mon, 31 Jan 2011 21:21:44 +0000 (13:21 -0800)]
.hgignore: Add some more files created by all.bash.

R=rsc
CC=golang-dev
https://golang.org/cl/4105044

14 years agosuffixarray: fix construction bug
Eric Eisner [Mon, 31 Jan 2011 21:13:02 +0000 (13:13 -0800)]
suffixarray: fix construction bug

Previously, group numbers were updated while being read,
sometimes leading to inconsistencies.

R=gri, gri1
CC=golang-dev
https://golang.org/cl/4121045

14 years agoeffective go: remove non-blocking ops in leaky bucket example
Rob Pike [Mon, 31 Jan 2011 20:46:38 +0000 (12:46 -0800)]
effective go: remove non-blocking ops in leaky bucket example

R=rsc
CC=golang-dev
https://golang.org/cl/4029048

14 years agoos: add ETIMEDOUT
Albert Strasheim [Mon, 31 Jan 2011 19:54:58 +0000 (14:54 -0500)]
os: add ETIMEDOUT

R=rsc
CC=golang-dev
https://golang.org/cl/4017045

14 years agocgo: improve error reporting slightly.
Roger Peppe [Mon, 31 Jan 2011 19:31:34 +0000 (14:31 -0500)]
cgo: improve error reporting slightly.
If there were warnings or errors in the user code,
cgo would print the first error from gcc and then stop,
which is not helpful.
This CL makes cgo ignore errors from user code
in the first pass - they will be shown later.
It also prints errors from user preamble code
with the correct line numbers.
(Also fixed misleading usage message).

R=iant, rsc
CC=golang-dev
https://golang.org/cl/4082047

14 years agosyscall: add network interface constants for darwin/386, darwin/amd64
Mikio Hara [Mon, 31 Jan 2011 17:50:50 +0000 (12:50 -0500)]
syscall: add network interface constants for darwin/386, darwin/amd64

R=rsc
CC=golang-dev
https://golang.org/cl/4079049

14 years agolib9: update to Unicode 6.0.0
Russ Cox [Mon, 31 Jan 2011 17:38:54 +0000 (12:38 -0500)]
lib9: update to Unicode 6.0.0

R=r
CC=golang-dev
https://golang.org/cl/4121042

14 years agounicode: build maketables during build, take 2
Russ Cox [Mon, 31 Jan 2011 16:50:04 +0000 (11:50 -0500)]
unicode: build maketables during build, take 2

The "all:" target is the default for running gomake
by hand, but it is not used during the build.
The build runs make install and make test.

Save the build of maketables for the test phase
so that the packages it needs will have been
installed already.

R=r, r2
CC=golang-dev
https://golang.org/cl/4121043

14 years agoruntime: generate Go defs for C types.
Luuk van Dijk [Mon, 31 Jan 2011 11:27:28 +0000 (12:27 +0100)]
runtime: generate Go defs for C types.

R=rsc, mattn
CC=golang-dev
https://golang.org/cl/4047047

14 years agobufio: make Flush a no-op when the buffer is empty
Andrew Gerrand [Mon, 31 Jan 2011 07:54:25 +0000 (18:54 +1100)]
bufio: make Flush a no-op when the buffer is empty

R=r
CC=golang-dev
https://golang.org/cl/4119048

14 years agorun.bash: disable doc/codelab/wiki test on windows
Alex Brainman [Mon, 31 Jan 2011 04:58:44 +0000 (15:58 +1100)]
run.bash: disable doc/codelab/wiki test on windows

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4119047

14 years agoenable arm peep.
Ken Thompson [Sun, 30 Jan 2011 23:55:08 +0000 (15:55 -0800)]
enable arm peep.
one bug fixed,
probably more will be revealed

R=r
CC=golang-dev
https://golang.org/cl/4126044

14 years agounicode: add maketables to build, fix build
Russ Cox [Sun, 30 Jan 2011 21:09:16 +0000 (16:09 -0500)]
unicode: add maketables to build, fix build

R=r
CC=golang-dev
https://golang.org/cl/4073046

14 years agogc: special case code for single-op blocking and non-blocking selects
Russ Cox [Sun, 30 Jan 2011 21:07:57 +0000 (16:07 -0500)]
gc: special case code for single-op blocking and non-blocking selects

R=ken2
CC=golang-dev
https://golang.org/cl/4004045

14 years agotest: another select test
Russ Cox [Sun, 30 Jan 2011 20:46:02 +0000 (15:46 -0500)]
test: another select test

R=r
CC=golang-dev
https://golang.org/cl/4004044

14 years agosync: a couple of documentation nits.
Rob Pike [Sat, 29 Jan 2011 22:56:15 +0000 (14:56 -0800)]
sync: a couple of documentation nits.

R=golang-dev, agl1
CC=golang-dev
https://golang.org/cl/4079051

14 years ago8l/6l: pe fixes
Alex Brainman [Sat, 29 Jan 2011 12:13:40 +0000 (23:13 +1100)]
8l/6l: pe fixes

- fixed length of amd64 .data pe section
  (don't need to include non-initialised data)

- use correct oh/oh64 variable when updating
  data directory in addexports

- simplify and cleanup

R=vcc, rsc
CC=golang-dev
https://golang.org/cl/4106044

14 years agoruntime/cgo: fix cross-compiling windows packages
Alex Brainman [Sat, 29 Jan 2011 11:57:19 +0000 (22:57 +1100)]
runtime/cgo: fix cross-compiling windows packages

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4073043

14 years agofix windows build
Wei Guangjing [Sat, 29 Jan 2011 04:44:37 +0000 (23:44 -0500)]
fix windows build

R=rsc
CC=golang-dev
https://golang.org/cl/4124041

14 years agotime: Support Solaris zoneinfo directory.
Ian Lance Taylor [Fri, 28 Jan 2011 23:56:14 +0000 (15:56 -0800)]
time: Support Solaris zoneinfo directory.

R=rsc
CC=golang-dev
https://golang.org/cl/4079047

14 years agoruntime: select bug
Russ Cox [Fri, 28 Jan 2011 22:17:38 +0000 (17:17 -0500)]
runtime: select bug

The sanity checking in pass 2 is wrong
when a select is offering to communicate in
either direction on a channel and neither case
is immediately ready.

R=ken2
CC=golang-dev
https://golang.org/cl/3991047

14 years agoruntime: simpler heap map, memory allocation
Russ Cox [Fri, 28 Jan 2011 20:03:26 +0000 (15:03 -0500)]
runtime: simpler heap map, memory allocation

The old heap maps used a multilevel table, but that
was overkill: there are only 1M entries on a 32-bit
machine and we can arrange to use a dense address
range on a 64-bit machine.

The heap map is in bss.  The assumption is that if
we don't touch the pages they won't be mapped in.

Also moved some duplicated memory allocation
code out of the OS-specific files.

R=r
CC=golang-dev
https://golang.org/cl/4118042

14 years agogob: fix build
Rob Pike [Fri, 28 Jan 2011 19:07:12 +0000 (11:07 -0800)]
gob: fix build
delete reference to Debug function.

R=rsc
CC=golang-dev
https://golang.org/cl/4063048

14 years agogob: make nested interfaces work.
Rob Pike [Fri, 28 Jan 2011 18:53:42 +0000 (10:53 -0800)]
gob: make nested interfaces work.
Also clean up the code, make it more regular.

Fixes #1416.

R=rsc
CC=golang-dev
https://golang.org/cl/3985047

14 years agogob: updates to the debugging tool.
Rob Pike [Fri, 28 Jan 2011 18:53:06 +0000 (10:53 -0800)]
gob: updates to the debugging tool.
- complex numbers now supported.
- entirely independent of standard decode code.
- parser has no read-ahead; that is, the scanning works
simply by reading the values as they arrive, not by trying
to count bytes for message boundaries, a proof of concept
for the pending rewrite of the regular decoder.

R=rsc, r2
CC=golang-dev
https://golang.org/cl/4084044

14 years agodoc/codelab/wiki: fixes
Russ Cox [Fri, 28 Jan 2011 14:42:51 +0000 (09:42 -0500)]
doc/codelab/wiki: fixes

make test.sh runnable as a command.
announce only on 127.0.0.1.
rebuild final-test.bin when final-test.go changes.

R=adg, r
CC=golang-dev
https://golang.org/cl/4030044

14 years agogodoc: tiny bug fix - use correct filename when comparing files against the index...
Robert Griesemer [Thu, 27 Jan 2011 22:11:58 +0000 (14:11 -0800)]
godoc: tiny bug fix - use correct filename when comparing files against the index whitelist

This bug prevented files such as READMEs etc. from being included in the index.
For instance, now author names recorded in the AUTHORS file can be found with
a godoc query.

R=rsc, r2
CC=golang-dev
https://golang.org/cl/4005047

14 years agobytes: Add Buffer.ReadBytes, Buffer.ReadString
Evan Shaw [Thu, 27 Jan 2011 22:00:31 +0000 (14:00 -0800)]
bytes: Add Buffer.ReadBytes, Buffer.ReadString

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4000046

14 years agospec: remove non-blocking channel operators
Russ Cox [Thu, 27 Jan 2011 20:34:28 +0000 (15:34 -0500)]
spec: remove non-blocking channel operators

Add intended changes for close + closed, commented out.

R=golang-dev, niemeyer, r, gri1
CC=golang-dev
https://golang.org/cl/4013045

14 years ago6l: Relocate CMOV* instructions
Gustavo Niemeyer [Thu, 27 Jan 2011 19:09:03 +0000 (14:09 -0500)]
6l: Relocate CMOV* instructions

The linker avoids a GOT indirection by turning a MOV into
a LEA, but with x86-64 GCC has started emitting CMOV*
instructions which break the existing logic.

This will generate errors such as:

  unexpected GOT reloc for non-dynamic symbol luaO_nilobject_

The CMOV* instructions may be emitted with normal code like:

  if (o >= L->top) return cast(TValue *, luaO_nilobject);
  else return o;

Which gets compiled into (relocation offset at 1b):

  13: 48 3b 47 10             cmp    0x10(%rdi),%rax
  17: 48 0f 43 05 00 00 00    cmovae 0x0(%rip),%rax
  1e: 00

This change will allow the indirection through the GOT to
avoid the problem in those cases.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4071044

14 years ago8l: add PE dynexport
Wei Guangjing [Thu, 27 Jan 2011 13:26:31 +0000 (08:26 -0500)]
8l: add PE dynexport

R=rsc, brainman, mattn
CC=golang-dev
https://golang.org/cl/4022043

14 years ago8l: fix ldpe sym name length == 8 strdup incorrect.
Wei Guangjing [Thu, 27 Jan 2011 13:26:28 +0000 (08:26 -0500)]
8l: fix ldpe sym name length == 8 strdup incorrect.

R=rsc
CC=golang-dev
https://golang.org/cl/4102043

14 years agodoc/codelab/wiki: tests use available TCP port
Andrew Gerrand [Thu, 27 Jan 2011 13:19:37 +0000 (23:19 +1000)]
doc/codelab/wiki: tests use available TCP port

R=bradfitz, dsymonds, r2, dangabrad, rsc
CC=golang-dev
https://golang.org/cl/4043043

14 years agomisc/vim/syntax: set large value to 'syntax sync'.
Yasuhiro Matsumoto [Thu, 27 Jan 2011 13:03:52 +0000 (23:03 +1000)]
misc/vim/syntax: set large value to 'syntax sync'.

R=golang-dev, dsymonds, adg
CC=golang-dev
https://golang.org/cl/4102044

14 years agogo/scanner: fix build (adjust scanner EOF linecount)
Robert Griesemer [Thu, 27 Jan 2011 06:09:14 +0000 (22:09 -0800)]
go/scanner: fix build (adjust scanner EOF linecount)

R=adg
CC=golang-dev
https://golang.org/cl/3990045