]> Cypherpunks.ru repositories - gostls13.git/log
gostls13.git
13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 years agotesting: delete the less useful methods in the testing regexp package
Rob Pike [Thu, 12 Aug 2010 06:47:52 +0000 (16:47 +1000)]
testing: delete the less useful methods in the testing regexp package
We can add them back using the new naming scheme should it become important.

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

13 years agore-tag release.2010-08-11
Andrew Gerrand [Thu, 12 Aug 2010 06:02:12 +0000 (16:02 +1000)]
re-tag release.2010-08-11

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

13 years agotag release.2010-08-11
Andrew Gerrand [Thu, 12 Aug 2010 05:52:54 +0000 (15:52 +1000)]
tag release.2010-08-11

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

13 years agorelease.2010-08-11 weekly.2010-08-11
Andrew Gerrand [Thu, 12 Aug 2010 05:51:11 +0000 (15:51 +1000)]
release.2010-08-11

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

13 years ago6g, 8g: handle slice by sub-word-sized index (uint8, int8, uint16, int16)
Russ Cox [Thu, 12 Aug 2010 05:27:47 +0000 (22:27 -0700)]
6g, 8g: handle slice by sub-word-sized index (uint8, int8, uint16, int16)

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

13 years agoA+C: Mikio Hara (individual CLA)
Russ Cox [Thu, 12 Aug 2010 05:22:36 +0000 (22:22 -0700)]
A+C: Mikio Hara (individual CLA)

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

13 years agogopack: handle long lines in export data
Russ Cox [Thu, 12 Aug 2010 05:17:20 +0000 (22:17 -0700)]
gopack: handle long lines in export data
Also, if the header is bad, exit with a non-zero status.

Other calls to Brdline in the tree, by category:

Reading symbol name from object file:
./cmd/5l/obj.c:486:  name = Brdline(f, '\0');
./cmd/6l/obj.c:535:  name = Brdline(f, '\0');
./cmd/8l/obj.c:564:  name = Brdline(f, '\0');
./libmach/sym.c:292:  cp = Brdline(bp, '\0');

Reading archive header line (fixed, short):
./cmd/gc/lex.c:287:  if((a = Brdline(b, '\n')) == nil)
./cmd/gc/lex.c:303:  if((p = Brdline(b, '\n')) == nil)

Reading object file header line (fixed, short):
./cmd/ld/lib.c:421:  line = Brdline(f, '\n');

Reading undefined symbol list (unused code):
./cmd/ld/lib.c:773:  while((l = Brdline(b, '\n')) != nil){

Implementing Brdstr:
./libbio/brdstr.c:36:  p = Brdline(bp, delim);

The symbol names ones will cause a problem loudly if they
fail: they'll error out with symbol name too long.  This means
that you can't define an enormous struct without giving the
type a name and then stick it in an interface, because the
type's symbol name will be too long for the object file.
Since this will be a loud failure instead of a silent one,
I'm willing to wait until it comes up in practice.

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

13 years ago5g, 8g: dead code (already removed from 6g)
Russ Cox [Thu, 12 Aug 2010 04:58:29 +0000 (21:58 -0700)]
5g, 8g: dead code (already removed from 6g)

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

13 years agoregexp: new regularized methods for matching.
Rob Pike [Thu, 12 Aug 2010 04:41:52 +0000 (14:41 +1000)]
regexp: new regularized methods for matching.
The previous set was spotty, incomplete, and confusing.
This CL proposes a regular, clean set with clearer names.
It's also complete.  Many existing methods will be deprecated,
but not in this CL.  Ditto for the tests.

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

13 years agogofmt: if a semicolon is found unexpectedly, report detailed cause
Robert Griesemer [Thu, 12 Aug 2010 04:25:52 +0000 (21:25 -0700)]
gofmt: if a semicolon is found unexpectedly, report detailed cause

go/scanner: return information on semicolon (real or inserted) when
    found in source
go/parser:  better error message when a semicolon is found unexpectedly

For instance, if an unexpected semicolon is found that was automatically
inserted, the parser error message is now:

    "expected '}', found newline"

Fixes #1006.

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

13 years agosync.once: document that Do cannot be invoked recursively.
Rob Pike [Thu, 12 Aug 2010 02:59:37 +0000 (12:59 +1000)]
sync.once: document that Do cannot be invoked recursively.
documentation change only.

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

13 years agoSmall performance improvements to the HTML tokenizer based on your 'TODO's.
Kyle Consalus [Wed, 11 Aug 2010 23:45:34 +0000 (09:45 +1000)]
Small performance improvements to the HTML tokenizer based on your 'TODO's.

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

13 years agotemplate: added ParseFile method for template.Template
Scott Lawrence [Wed, 11 Aug 2010 04:04:03 +0000 (14:04 +1000)]
template: added ParseFile method for template.Template
Fixes #971.

Parse/ParseFile methods of Template now match template.Parse and .ParseFile methods.
Also made tests being run on Parse and ParseFile be run on Template.ParseFile as well.

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

13 years agogc: bug302
Russ Cox [Wed, 11 Aug 2010 00:39:38 +0000 (17:39 -0700)]
gc: bug302

Fixed by http://code.google.com/p/go/source/detail?r=d1f41e20a90e
This just adds a test and checks the return value of Bprint.

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

13 years agolibbio: fix Bprint bug
Russ Cox [Wed, 11 Aug 2010 00:38:28 +0000 (17:38 -0700)]
libbio: fix Bprint bug

Make Bprint work even when the amount of output
exceeds the available buffer space.

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

13 years agoexp/draw: fix drawRGBA when x0 > x1 and we have to draw right-to-left.
Nigel Tao [Wed, 11 Aug 2010 00:10:17 +0000 (10:10 +1000)]
exp/draw: fix drawRGBA when x0 > x1 and we have to draw right-to-left.

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

13 years agorpc: catch errors from ReadResponseBody.
Rob Pike [Tue, 10 Aug 2010 23:55:02 +0000 (16:55 -0700)]
rpc: catch errors from ReadResponseBody.
Fixes #1014.

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

13 years agofix build: update exp/draw/draw_test.go
Robert Griesemer [Tue, 10 Aug 2010 17:11:28 +0000 (10:11 -0700)]
fix build: update exp/draw/draw_test.go

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

13 years agogodoc: report Status 404 if a pkg or file is not found
Robert Griesemer [Tue, 10 Aug 2010 16:52:02 +0000 (09:52 -0700)]
godoc: report Status 404 if a pkg or file is not found

Fixes #1005.

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

13 years agoasn1: remove superfluous if's, unused function
Robert Griesemer [Tue, 10 Aug 2010 16:50:21 +0000 (09:50 -0700)]
asn1: remove superfluous if's, unused function

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

13 years agoexp/draw: remove the Color, Point and Rectangle types.
Nigel Tao [Tue, 10 Aug 2010 12:05:11 +0000 (22:05 +1000)]
exp/draw: remove the Color, Point and Rectangle types.
image: introduce Transparent and Opaque.

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

13 years agogopack documentation: fixed typo
Scott Lawrence [Tue, 10 Aug 2010 08:01:00 +0000 (18:01 +1000)]
gopack documentation: fixed typo
(Removed extraneous "program".)

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

13 years agoimage: fix comment typo.
Nigel Tao [Tue, 10 Aug 2010 07:56:57 +0000 (17:56 +1000)]
image: fix comment typo.

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

13 years agoimage: change image representation from slice-of-slices to linear buffer,
Nigel Tao [Tue, 10 Aug 2010 06:34:57 +0000 (16:34 +1000)]
image: change image representation from slice-of-slices to linear buffer,
stride and rect.

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

13 years agoFirst cut of an HTML tokenizer (and eventually a parser).
Nigel Tao [Tue, 10 Aug 2010 06:08:21 +0000 (16:08 +1000)]
First cut of an HTML tokenizer (and eventually a parser).

R=r, rsc, gri, rsc1
CC=golang-dev
https://golang.org/cl/1814044

13 years agoexp/draw/x11: temporarily workaround compiler bug 1011.
Nigel Tao [Tue, 10 Aug 2010 05:53:19 +0000 (15:53 +1000)]
exp/draw/x11: temporarily workaround compiler bug 1011.

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

13 years agopng: grayscale support.
Mathieu Lonjaret [Tue, 10 Aug 2010 02:25:08 +0000 (12:25 +1000)]
png: grayscale support.

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

13 years agoimage: replace Width and Height by Bounds, and introduce the Point and
Nigel Tao [Tue, 10 Aug 2010 02:08:52 +0000 (12:08 +1000)]
image: replace Width and Height by Bounds, and introduce the Point and
Rect types.

The actual image representation is unchanged. A future change will
replace the {[][]color} with {[]color, stride int, r Rectangle} and
possibly a clip region.

The draw.Color, draw.Point and draw.Rect types will be removed in a
future change. Trying to do it in this one polluted the diff with
trivia.

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

13 years agoregexp: document that backslashes are the escape character.
Rob Pike [Mon, 9 Aug 2010 22:11:02 +0000 (15:11 -0700)]
regexp: document that backslashes are the escape character.
Fixes #1013.

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