]> Cypherpunks repositories - gostls13.git/log
gostls13.git
14 years agogc: brace nit from last review
Kyle Consalus [Thu, 26 Aug 2010 22:46:56 +0000 (18:46 -0400)]
gc: brace nit from last review

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

14 years agonetchan: Fix race condition in test.
Ian Lance Taylor [Thu, 26 Aug 2010 22:42:18 +0000 (15:42 -0700)]
netchan: Fix race condition in test.

Two tests start a goroutine which runs exportSend, and then
the tests run importReceive.  exportSend creates an export
channel.  importReceive asks to receive values on that
channel.  Because exportSend runs in a separate goroutine,
it's possible for the export client to receive the request for
values on the channel, from importReceive, before the
goroutine actually creates the export channel.  That causes an
error: "export: no such channel: exportedSend".  This patch
avoids the race by creating the export channel before starting
the goroutine.

There does not seem to be a similar race condition in the
tests which send data in the other direction.

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

14 years agocodereview: consistent indent, cut dead code
Russ Cox [Thu, 26 Aug 2010 22:24:14 +0000 (18:24 -0400)]
codereview: consistent indent, cut dead code

End the charade (farce?) that we are using upload.py unaltered.
Cut all the unused stuff.
Indent using tabs to match the rest of the file.

Next: rewrite MercurialVCS to use mercurial package,
to avoid overhead of forking off a new hg command
multiple times for every file.  And parallelize upload.

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

14 years agogo/typechecker: 2nd step towards augmenting AST with full type information.
Robert Griesemer [Thu, 26 Aug 2010 21:36:13 +0000 (14:36 -0700)]
go/typechecker: 2nd step towards augmenting AST with full type information.

- refine/define Scope, Object, and Type structures
  (note: scope.go has the addition of types, the rest is only re-organized
  for better readability)
- implemented top-level of type checker:
  resolve global type declarations (deal with double decls, cycles, etc.)
- temporary hooks for checking of const/var declarations, function/method bodies
- test harness for fine-grained testing (exact error locations)
  with initial set of tests

This is a subset of the code for easier review.

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

14 years agocodereview: fix hang on standard hg commands
Russ Cox [Thu, 26 Aug 2010 21:06:36 +0000 (17:06 -0400)]
codereview: fix hang on standard hg commands

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

14 years agocodereview: print status when hung
Russ Cox [Thu, 26 Aug 2010 20:27:42 +0000 (16:27 -0400)]
codereview: print status when hung

After 30 seconds, start printing status updates,
so that we can see whether hg is making progress.

$ hg upload 1983051
Thu Aug 26 15:06:15 2010 running gofmt
Thu Aug 26 15:06:30 2010 inspecting src/pkg/big/int_test.go
Thu Aug 26 15:06:45 2010 inspecting src/pkg/cmath/conj.go
Thu Aug 26 15:07:00 2010 inspecting src/pkg/expvar/expvar.go
Thu Aug 26 15:07:15 2010 inspecting src/pkg/os/env_unix.go
Thu Aug 26 15:07:30 2010 inspecting src/pkg/os/sys_bsd.go
Thu Aug 26 15:07:45 2010 inspecting src/pkg/rand/rand_test.go
Thu Aug 26 15:08:00 2010 inspecting src/pkg/runtime/sig.go
Thu Aug 26 15:08:15 2010 inspecting src/pkg/time/time_test.go
Thu Aug 26 15:08:30 2010 inspecting src/pkg/websocket/websocket.go
Thu Aug 26 15:08:45 2010 uploading src/pkg/utf8/utf8.go
Thu Aug 26 15:09:00 2010 uploading src/pkg/unicode/letter_test.go
Thu Aug 26 15:09:15 2010 uploading src/pkg/xml/embed_test.go
Thu Aug 26 15:09:30 2010 uploading src/pkg/time/tick.go
Thu Aug 26 15:09:45 2010 uploading src/pkg/big/rat_test.go
Thu Aug 26 15:10:00 2010 uploading src/pkg/time/sleep_test.go
Thu Aug 26 15:10:15 2010 uploading src/pkg/patch/patch_test.go
Thu Aug 26 15:10:30 2010 uploading src/pkg/rand/rand.go
https://golang.org/cl/1983051

$

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

14 years agomisc/emacs: make _ a word symbol
Scott Lawrence [Thu, 26 Aug 2010 17:32:50 +0000 (13:32 -0400)]
misc/emacs: make _ a word symbol

Fixes #655.

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

14 years agonet: add LookupMX
Corey Thomasson [Thu, 26 Aug 2010 17:32:45 +0000 (13:32 -0400)]
net: add LookupMX

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

14 years agoruntime: special case copy, equal for one-word interface values
Kyle Consalus [Thu, 26 Aug 2010 17:32:40 +0000 (13:32 -0400)]
runtime: special case copy, equal for one-word interface values

Based on the observation that a great number of the types that
are copied or compared in interfaces, maps, and channels are
word-sized, this uses specialized copy and equality functions
for them that use a word instead of 4 or 8 bytes. Seems to yield
0-6% improvements in performance in the benchmarks I've run.
For example, with the regexp benchmarks:

Before:
regexp.BenchmarkLiteral   500000       3.26 µs/op
regexp.BenchmarkNotLiteral    100000      13.67 µs/op
regexp.BenchmarkMatchClass    100000      18.72 µs/op
regexp.BenchmarkMatchClass_InRange    100000      20.04 µs/op
regexp.BenchmarkReplaceAll    100000      27.85 µs/op

After:
regexp.BenchmarkLiteral   500000       3.11 µs/op
regexp.BenchmarkNotLiteral    200000      13.29 µs/op
regexp.BenchmarkMatchClass    100000      17.65 µs/op
regexp.BenchmarkMatchClass_InRange    100000      18.49 µs/op
regexp.BenchmarkReplaceAll    100000      26.34 µs/op

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

14 years agocrypto/hmac: make Sum idempotent
Jukka-Pekka Kekkonen [Thu, 26 Aug 2010 17:32:29 +0000 (13:32 -0400)]
crypto/hmac: make Sum idempotent

Fixes #978.

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

14 years agonet/textproto: Handle multi-line responses
Evan Shaw [Thu, 26 Aug 2010 17:32:23 +0000 (13:32 -0400)]
net/textproto: Handle multi-line responses

This is required for FTP and SMTP; maybe others.

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

14 years agohttp: obscure passwords in return value of URL.String
Scott Lawrence [Thu, 26 Aug 2010 17:32:16 +0000 (13:32 -0400)]
http: obscure passwords in return value of URL.String

Fixes #974.

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

14 years agoA+C: Corey Thomasson (individual CLA)
Russ Cox [Thu, 26 Aug 2010 17:21:06 +0000 (13:21 -0400)]
A+C: Corey Thomasson (individual CLA)

R=iant
CC=golang-dev
https://golang.org/cl/1952047

14 years agoruntime: Correct commonType.kind values to match compiler.
Ian Lance Taylor [Thu, 26 Aug 2010 15:08:57 +0000 (08:08 -0700)]
runtime: Correct commonType.kind values to match compiler.

The copy of these values in the reflect package is already
correct.

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

14 years ago.hgignore: ignore src/cmd/cc/y.output
Christian Himpel [Thu, 26 Aug 2010 06:50:17 +0000 (16:50 +1000)]
.hgignore: ignore src/cmd/cc/y.output

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

14 years agodoc/go_learning: add links to more German docs
Andrew Gerrand [Thu, 26 Aug 2010 00:17:14 +0000 (10:17 +1000)]
doc/go_learning: add links to more German docs

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

14 years agogoinstall: use https for Google Code checkouts
Russ Cox [Wed, 25 Aug 2010 22:08:16 +0000 (18:08 -0400)]
goinstall: use https for Google Code checkouts

This way, if you later want to check things in,
you can (with appropriate authorization).
Using plain http leads to the cryptic error
abort: HTTP Method Not Allowed.

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

14 years agogotest: allow make test of cgo packages (without make install)
Russ Cox [Wed, 25 Aug 2010 22:00:42 +0000 (18:00 -0400)]
gotest: allow make test of cgo packages (without make install)

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

14 years agobuild: let pkg/Makefile coordinate building of Go commands
Russ Cox [Wed, 25 Aug 2010 21:54:10 +0000 (17:54 -0400)]
build: let pkg/Makefile coordinate building of Go commands

Commands written in Go depend on Go packages, so they
cannot be built by src/cmd/make.bash.  They have been
built by src/make.bash after all the packages are done, but
we want to be able to use cgo (written in Go) during the build
of package net.  To make this possible, build the commands
from src/pkg/Makefile instead of src/make.bash, so that they
are included in the package dependency analysis.

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

14 years agolibcgo: update Makefile to use Make.inc
Russ Cox [Wed, 25 Aug 2010 21:53:24 +0000 (17:53 -0400)]
libcgo: update Makefile to use Make.inc
Fix printf format string.

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

14 years agocodereview: really disable codereview when not available
Russ Cox [Wed, 25 Aug 2010 21:52:25 +0000 (17:52 -0400)]
codereview: really disable codereview when not available

$ hg p
codereview disabled: cannot open /Users/rsc/g/go/src/pkg/goplan9.googlecode.com/hg/lib/codereview/codereview.cfg
$

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

14 years agobuild: delete Make.386 Make.amd64 Make.arm
Russ Cox [Wed, 25 Aug 2010 21:51:48 +0000 (17:51 -0400)]
build: delete Make.386 Make.amd64 Make.arm
obsoleted by Make.inc.

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

14 years agowebsocket: fix missing Sec-WebSocket-Protocol on server response.
Jukka-Pekka Kekkonen [Wed, 25 Aug 2010 16:52:04 +0000 (12:52 -0400)]
websocket: fix missing Sec-WebSocket-Protocol on server response.

Due to header key normalization/typo, the server never responds with
the protocol header in place. This breaks all (draft76) applications
that are using the protocol-header.

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

14 years agoA+C: Jukka-Pekka Kekkonen (individual CLA)
Russ Cox [Wed, 25 Aug 2010 16:51:36 +0000 (12:51 -0400)]
A+C: Jukka-Pekka Kekkonen (individual CLA)

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

14 years agosrc/pkg/Makefile: delete use of QUOTED_GOBIN
Martin Neubauer [Wed, 25 Aug 2010 16:44:13 +0000 (12:44 -0400)]
src/pkg/Makefile: delete use of QUOTED_GOBIN

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

14 years agoA+C: Martin Neubauer
Andrew Gerrand [Wed, 25 Aug 2010 16:34:30 +0000 (12:34 -0400)]
A+C: Martin Neubauer

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

14 years agogo/doc: use correct escaper for URL
Russ Cox [Wed, 25 Aug 2010 15:00:38 +0000 (11:00 -0400)]
go/doc: use correct escaper for URL

Despite the name, URL escaping is for a small subpiece of the URL only.
This particular URL is being emitted in an <a href=""> tag and in that
context it should be HTML escaped, not URL escaped.

In addition to fixing a bug, this change cuts a dependency chain
from go/doc to net, clearing the way for use of cgo
(which imports go/doc) during the compilation of package net.

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

14 years agosyscall: change BUG(brainman) to NOTE(brainman)
Russ Cox [Wed, 25 Aug 2010 05:26:35 +0000 (01:26 -0400)]
syscall: change BUG(brainman) to NOTE(brainman)
Avoids the comment appearing in godoc syscall BUGS section.

R=brainman
CC=golang-dev
https://golang.org/cl/1966048

14 years agotag release.2010-08-25
Andrew Gerrand [Wed, 25 Aug 2010 05:01:43 +0000 (15:01 +1000)]
tag release.2010-08-25

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

14 years agorelease.2010-08-25 weekly.2010-08-25
Andrew Gerrand [Wed, 25 Aug 2010 04:58:29 +0000 (14:58 +1000)]
release.2010-08-25

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

14 years agoscanner: change package comment to be clearer about its functionality.
Rob Pike [Wed, 25 Aug 2010 03:07:08 +0000 (13:07 +1000)]
scanner: change package comment to be clearer about its functionality.
No semantic changes.

R=gri, rsc1
CC=golang-dev
https://golang.org/cl/1998045

14 years agogotest: remove lingering references to $GOBIN
Russ Cox [Wed, 25 Aug 2010 01:56:32 +0000 (21:56 -0400)]
gotest: remove lingering references to $GOBIN

(Assumed to be in $PATH.  all.bash ensures that
during the main build and the user must ensure it
when running commands like gotest or gomake
by hand.  This belonged in the earlier CL but I missed it.)

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

14 years agobuild: fix build again - not sure where the " went. sigh.
Russ Cox [Wed, 25 Aug 2010 00:43:31 +0000 (20:43 -0400)]
build: fix build again - not sure where the " went.  sigh.

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

14 years agotime: Remove unused zoneinfo.go (replaced by zoneinfo_unix.go).
Ian Lance Taylor [Wed, 25 Aug 2010 00:24:40 +0000 (17:24 -0700)]
time: Remove unused zoneinfo.go (replaced by zoneinfo_unix.go).

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

14 years agobuild: fix build - last CL missed Make.clib
Russ Cox [Wed, 25 Aug 2010 00:15:52 +0000 (20:15 -0400)]
build: fix build - last CL missed Make.clib

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

14 years agobuild: update, streamline documentation for new $GOBIN
Russ Cox [Wed, 25 Aug 2010 00:00:50 +0000 (20:00 -0400)]
build: update, streamline documentation for new $GOBIN

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

14 years agobuild: $GOBIN defaults to $GOROOT/bin
Russ Cox [Wed, 25 Aug 2010 00:00:33 +0000 (20:00 -0400)]
build: $GOBIN defaults to $GOROOT/bin

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

14 years agotime.Parse should not require minutes for time zone
Jan H. Hosang [Tue, 24 Aug 2010 21:41:26 +0000 (07:41 +1000)]
time.Parse should not require minutes for time zone
Fixes #1026.

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

14 years agotest: Add testcase which crashes gccgo.
Ian Lance Taylor [Tue, 24 Aug 2010 20:08:05 +0000 (13:08 -0700)]
test: Add testcase which crashes gccgo.

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

14 years agoruntime: fix freebsd/386 mmap
Russ Cox [Tue, 24 Aug 2010 17:04:02 +0000 (13:04 -0400)]
runtime: fix freebsd/386 mmap

The runtime only passes 32 bits of file offset,
but the kernel wants 64 bits, so have to add
zeros explicitly in a copy of the arguments.

R=adg, Martin Neubauer
CC=golang-dev
https://golang.org/cl/1933044

14 years agogc: fix parenthesization check
Russ Cox [Tue, 24 Aug 2010 03:10:25 +0000 (23:10 -0400)]
gc: fix parenthesization check

Cannot use paren field in Node because all
instances of a given symbol name use the same Node.

Fixes #1022.

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

14 years agoeffective go: fix errors caught by HaWe
Rob Pike [Tue, 24 Aug 2010 02:37:51 +0000 (12:37 +1000)]
effective go: fix errors caught by HaWe

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

14 years agodoc: Update gccgo information for recent changes.
Ian Lance Taylor [Tue, 24 Aug 2010 00:50:30 +0000 (17:50 -0700)]
doc: Update gccgo information for recent changes.

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

14 years agoos: make return type of FileInfo.Permission() consistent with related functions
Scott Lawrence [Tue, 24 Aug 2010 00:38:52 +0000 (10:38 +1000)]
os: make return type of FileInfo.Permission() consistent with related functions
(uint32 rather than int)

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

14 years agohttp: doc nit
Russ Cox [Mon, 23 Aug 2010 22:06:28 +0000 (18:06 -0400)]
http: doc nit

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

14 years agobetter job on 2007043
Ken Thompson [Mon, 23 Aug 2010 19:38:15 +0000 (12:38 -0700)]
better job on 2007043
better registerization

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

14 years agoarm: fix build, regenerate syscall files
Kai Backman [Mon, 23 Aug 2010 10:25:14 +0000 (13:25 +0300)]
arm: fix build, regenerate syscall files

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

14 years agoio: prevent ReadAtLeast spinloop if min > len(buf)
Andrew Gerrand [Mon, 23 Aug 2010 02:04:15 +0000 (12:04 +1000)]
io: prevent ReadAtLeast spinloop if min > len(buf)

R=r, heresy.mc
CC=golang-dev
https://golang.org/cl/2017042

14 years agonet/ipsock.go: fix error checking bug
Scott Lawrence [Sun, 22 Aug 2010 12:12:56 +0000 (22:12 +1000)]
net/ipsock.go: fix error checking bug
Check oserr, not err for non-nil (err is never changed)

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

14 years agohttp: fix typo in http.Request documentation
Scott Lawrence [Sun, 22 Aug 2010 04:44:00 +0000 (14:44 +1000)]
http: fix typo in http.Request documentation

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

14 years agolibmach: implement register fetch for 32-bit x86 kernel
Russ Cox [Sat, 21 Aug 2010 00:49:47 +0000 (20:49 -0400)]
libmach: implement register fetch for 32-bit x86 kernel
Also use memmove to silence some gcc warnings.

Fixes #1036.

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

14 years agofix build
Robert Griesemer [Fri, 20 Aug 2010 18:20:12 +0000 (11:20 -0700)]
fix build

Also: Copyright notices only need the year the file was created.

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

14 years agosyscall: regenerate syscall/z* files for linux/386, linux/amd64
Ivan Krasin [Fri, 20 Aug 2010 13:12:21 +0000 (09:12 -0400)]
syscall: regenerate syscall/z* files for linux/386, linux/amd64
DISTRIB_DESCRIPTION="Ubuntu 10.04 LTS"

Use <sys/user.h> instead of <linux/user.h>
See http://gcc.gnu.org/ml/gcc-patches/2009-11/msg00834.html for more details.

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

14 years agoattempt to gete better registeration
Ken Thompson [Fri, 20 Aug 2010 01:18:51 +0000 (18:18 -0700)]
attempt to gete better registeration
from the builtin structures (strings,
slices, interfaces)

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

14 years agogo/ast Fprint: handle cycles in AST
Robert Griesemer [Thu, 19 Aug 2010 23:03:02 +0000 (16:03 -0700)]
go/ast Fprint: handle cycles in AST

Augmented ASTs may contain cycles. Keep
track of already printed objects and refer
to them with a line number instead of
printing them again.

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

14 years agomime: delete unnecessary constant conversions.
Rob Pike [Thu, 19 Aug 2010 21:42:02 +0000 (07:42 +1000)]
mime: delete unnecessary constant conversions.

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

14 years agocrypto/ocsp: add missing Makefile
Adam Langley [Thu, 19 Aug 2010 20:33:58 +0000 (16:33 -0400)]
crypto/ocsp: add missing Makefile

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

14 years agogo/ast, gofmt: facility for printing AST nodes
Robert Griesemer [Thu, 19 Aug 2010 16:39:35 +0000 (09:39 -0700)]
go/ast, gofmt: facility for printing AST nodes

go/ast: implement Fprint and print functions to
print AST nodes

gofmt: print AST nodes by setting -ast flag

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

14 years agoclean.bash: fix standalone runs
Christopher Wedgwood [Thu, 19 Aug 2010 04:09:11 +0000 (00:09 -0400)]
clean.bash: fix standalone runs

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

14 years agoA+C: Eric Clark (individual CLA)
Russ Cox [Thu, 19 Aug 2010 04:07:55 +0000 (00:07 -0400)]
A+C: Eric Clark (individual CLA)

R=ec
CC=golang-dev
https://golang.org/cl/1982045

14 years agocgo: add C.GoStringN
Eric Clark [Thu, 19 Aug 2010 02:29:05 +0000 (22:29 -0400)]
cgo: add C.GoStringN

Function to create a GoString with a known length so it can contain NUL
bytes anywhere in the string. Some C libraries have strings like this.

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

14 years agofmt: add sentence about return values to docs for Printf etc.
Rob Pike [Thu, 19 Aug 2010 02:07:24 +0000 (12:07 +1000)]
fmt: add sentence about return values to docs for Printf etc.

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

14 years agodoc: add missing paren (pointed out by nbjoerg)
Christopher Wedgwood [Thu, 19 Aug 2010 00:03:58 +0000 (10:03 +1000)]
doc: add missing paren (pointed out by nbjoerg)

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

14 years agoDwarf output for 6l.
Luuk van Dijk [Wed, 18 Aug 2010 14:53:22 +0000 (16:53 +0200)]
Dwarf output for 6l.
Part 1, general scaffolding and pc/lc sections.

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

14 years agorun.bash: fix freebsd build (i hope)
Russ Cox [Wed, 18 Aug 2010 14:22:57 +0000 (10:22 -0400)]
run.bash: fix freebsd build (i hope)

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

14 years agobuild: no required environment variables
Russ Cox [Wed, 18 Aug 2010 14:08:49 +0000 (10:08 -0400)]
build: no required environment variables

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

14 years agocgo: fix build: use $GCC, not $CC
Russ Cox [Wed, 18 Aug 2010 14:03:01 +0000 (10:03 -0400)]
cgo: fix build: use $GCC, not $CC

I'm not sure there's a better way.
Cgo is juggling two different C compilers.

Fixes #1008.

R=iant
CC=golang-dev
https://golang.org/cl/1972044

14 years agohttp: parse query string always, not just in GET
Russ Cox [Wed, 18 Aug 2010 00:01:50 +0000 (20:01 -0400)]
http: parse query string always, not just in GET

Fixes #985.

R=dsymonds, dsymonds1
CC=golang-dev
https://golang.org/cl/1963044

14 years agojsonrpc: use `error: null` for success, not `error: ""`
Russ Cox [Tue, 17 Aug 2010 22:55:42 +0000 (18:55 -0400)]
jsonrpc: use `error: null` for success, not `error: ""`
handle missing id in server.

Fixes #1017.
Fixes #1018.

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

14 years agoruntime: correct line numbers for .goc files.
Luuk van Dijk [Tue, 17 Aug 2010 22:16:05 +0000 (00:16 +0200)]
runtime: correct line numbers for .goc files.
Linenumbers start at 1.
Also call goc2c with an absolute pathi to preserve debug info.

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

14 years agoreflect: allow PtrValue.PointTo(nil)
Robert Griesemer [Tue, 17 Aug 2010 22:12:28 +0000 (15:12 -0700)]
reflect: allow PtrValue.PointTo(nil)

(Argument: For any *PtrValue p, it should
always be possible to do: p.PointTo(p.Elem()),
even if p.Elem() is nil.)

Fixes #1028.

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

14 years agoCONTRIBUTORS: add Luuk van Dijk (Google CLA)
Russ Cox [Tue, 17 Aug 2010 21:36:15 +0000 (17:36 -0400)]
CONTRIBUTORS: add Luuk van Dijk (Google CLA)

R=lvd
CC=golang-dev
https://golang.org/cl/1956046

14 years agoMake.common: add .PHONY rule
Scott Lawrence [Tue, 17 Aug 2010 21:35:48 +0000 (17:35 -0400)]
Make.common: add .PHONY rule
to prevent files named 'clean', 'bench', etc... preventing proper build

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

14 years agoFix template package so that data items
Roger Peppe [Tue, 17 Aug 2010 13:13:07 +0000 (23:13 +1000)]
Fix template package so that data items
preceded by white space parse correctly.

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

14 years agoRemove relic "once" import from time/zoneinfo.go
Roger Peppe [Tue, 17 Aug 2010 13:08:19 +0000 (23:08 +1000)]
Remove relic "once" import from time/zoneinfo.go

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

14 years agogofmt: do not modify multi-line string literals
Robert Griesemer [Tue, 17 Aug 2010 04:37:10 +0000 (21:37 -0700)]
gofmt: do not modify multi-line string literals

tabwriter: Introduce a new flag StripEscape to control
if tabwriter.Escape chars should be stripped or passed
through unchanged.

go/printer: Don't modify tabwriter.Escape'd text. This
involved a new implementation of the internal trimmer
object.

Does not affect formatting of any existing code under
$GOROOT/src and $GOROOT/misc.

Fixes #1030.

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

14 years agoos: preserve "=C:" like env variables in env block on windows and bug fix in Clearenv()
Alex Brainman [Tue, 17 Aug 2010 01:38:26 +0000 (11:38 +1000)]
os: preserve "=C:" like env variables in env block on windows and bug fix in Clearenv()

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

14 years agotemplate: retain leading space if the line is not an action.
Rob Pike [Mon, 16 Aug 2010 23:44:16 +0000 (09:44 +1000)]
template: retain leading space if the line is not an action.

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

14 years agofmt/print: remove a TODO regarding printing renamed byte slices.
Rob Pike [Mon, 16 Aug 2010 22:34:40 +0000 (08:34 +1000)]
fmt/print: remove a TODO regarding printing renamed byte slices.
the solution must work around a weakness in the reflection library:
there is no way to do type-safe conversions under reflection.

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

14 years agoregexp: grow slices dynamically in the 'All' routines.
Rob Pike [Mon, 16 Aug 2010 22:17:34 +0000 (15:17 -0700)]
regexp: grow slices dynamically in the 'All' routines.

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

14 years agotest/garbage: do not try to parse package bignum, which is gone.
Russ Cox [Mon, 16 Aug 2010 20:31:31 +0000 (13:31 -0700)]
test/garbage: do not try to parse package bignum, which is gone.

Fixes #1023.

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

14 years agocrypto/tls: client certificate support.
Mikkel Krautz [Mon, 16 Aug 2010 15:22:22 +0000 (11:22 -0400)]
crypto/tls: client certificate support.

This changeset implements client certificate support in crypto/tls
for both handshake_server.go and handshake_client.go

The updated server implementation sends an empty CertificateAuthorities
field in the CertificateRequest, thus allowing clients to send any
certificates they wish. Likewise, the client code will only respond
with its certificate when the server requests a certificate with this
field empty.

R=agl, rsc, agl1
CC=golang-dev
https://golang.org/cl/1975042

14 years agoA+C: Mikkel Krautz (individual CLA)
Russ Cox [Mon, 16 Aug 2010 15:21:33 +0000 (11:21 -0400)]
A+C: Mikkel Krautz (individual CLA)

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

14 years agoimage/png: support 16-bit color.
Nigel Tao [Mon, 16 Aug 2010 13:33:20 +0000 (23:33 +1000)]
image/png: support 16-bit color.

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

14 years agospec: delete erroneous word 'pointer' in specification of select.
Rob Pike [Sun, 15 Aug 2010 20:42:41 +0000 (06:42 +1000)]
spec: delete erroneous word 'pointer' in specification of select.

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

14 years agocode optimization on slices
Ken Thompson [Sat, 14 Aug 2010 02:39:36 +0000 (19:39 -0700)]
code optimization on slices

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

14 years agospec: trivial syntax fix
Stephen Ma [Sat, 14 Aug 2010 00:27:24 +0000 (10:27 +1000)]
spec: trivial syntax fix

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

14 years agofmt/print: give %p priority, analogous to %T
Rob Pike [Fri, 13 Aug 2010 21:37:03 +0000 (07:37 +1000)]
fmt/print: give %p priority, analogous to %T
Fixes #1024.

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

14 years agofix bounds check in error recovery
Ken Thompson [Fri, 13 Aug 2010 21:30:18 +0000 (14:30 -0700)]
fix bounds check in error recovery
(thanks to avp@mit.edu)

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

14 years agogo AST: First step towards augmenting AST with full type information.
Robert Griesemer [Fri, 13 Aug 2010 17:42:18 +0000 (10:42 -0700)]
go AST: First step towards augmenting AST with full type information.

- change ast.Ident back to contain the name and adjust all dependent code
- identifier object information will be added again through an optional
  typechecker phase (in the works).
- remove tracking of scopes in parser - it's easier to do this in a separate
  phase (in the works)
- in godoc, generate popup info table directly instead of through a formatter
  for simpler data flow (at the expense of a little bit more code)

Runs all tests.

As a result of this change, the currently shown popup information
(const, var, type, func, followed by identifier name) will not be
shown anymore temporarily.

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

14 years agofmt/print: honor Formatter in Print, Println.
Rob Pike [Fri, 13 Aug 2010 07:26:32 +0000 (17:26 +1000)]
fmt/print: honor Formatter in Print, Println.
Rearrange code to clarify handling of %T, Formatter, GoStringer, and Stringer.

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

14 years agoruntime: fix another stack split bug
Russ Cox [Fri, 13 Aug 2010 06:26:54 +0000 (23:26 -0700)]
runtime: fix another stack split bug

Makes godoc --http=:1234 not crash on linux/amd64.

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

14 years agoos: implement env using native windows api.
Alex Brainman [Fri, 13 Aug 2010 04:29:23 +0000 (14:29 +1000)]
os: implement env using native windows api.
Fixes #864.

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

14 years agodelete pkg/once
Rob Pike [Fri, 13 Aug 2010 02:53:27 +0000 (12:53 +1000)]
delete pkg/once

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

14 years agocodereview: do not send "Abanoned" mail if this CL has
Russ Cox [Thu, 12 Aug 2010 21:58:38 +0000 (14:58 -0700)]
codereview: do not send "Abanoned" mail if this CL has
not been mailed out for review.

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

14 years agopartial correction for CL 1983043: fix various godoc-related regexp calls
Robert Griesemer [Thu, 12 Aug 2010 18:28:50 +0000 (11:28 -0700)]
partial correction for CL 1983043: fix various godoc-related regexp calls

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

14 years agoregexp: delete the deprecated methods and tests.
Rob Pike [Thu, 12 Aug 2010 07:16:37 +0000 (17:16 +1000)]
regexp: delete the deprecated methods and tests.

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

14 years agocodereview.py: Fix issues with leading tabulation in the Files: section of CL descrip...
Ivan Krasin [Thu, 12 Aug 2010 07:04:17 +0000 (00:04 -0700)]
codereview.py: Fix issues with leading tabulation in the Files: section of CL description.

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

14 years agonet: make IPv6 String method standards compliant
Mikio Hara [Thu, 12 Aug 2010 07:03:01 +0000 (00:03 -0700)]
net: make IPv6 String method standards compliant

draft-ietf-6man-text-addr-representation-07 will introduce
a canonical textual representation format for IPv6 address.

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

14 years agoupdate the tree to use the new regexp methods
Rob Pike [Thu, 12 Aug 2010 06:48:41 +0000 (16:48 +1000)]
update the tree to use the new regexp methods

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