]> Cypherpunks repositories - gostls13.git/log
gostls13.git
15 years agoupdate package unicode to Unicode 5.2
Rob Pike [Wed, 2 Dec 2009 00:22:21 +0000 (16:22 -0800)]
update package unicode to Unicode 5.2

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

15 years agogob: fix build
Russ Cox [Wed, 2 Dec 2009 00:18:27 +0000 (16:18 -0800)]
gob: fix build

TBR=r
https://golang.org/cl/163064

15 years agoIntegrated feedback by Ken.
Robert Griesemer [Wed, 2 Dec 2009 00:15:53 +0000 (16:15 -0800)]
Integrated feedback by Ken.
Easy stuff in this round, more to come.

R=iant, rsc, r, ken2
https://golang.org/cl/163058

15 years agoExplicitly return values where it's shadowing the parameter.
Christopher Wedgwood [Tue, 1 Dec 2009 23:54:49 +0000 (15:54 -0800)]
Explicitly return values where it's shadowing the parameter.

Bad returns noticed by "Devon H. O'Dell" <devon.odell@gmail.com>.

Resolves Issue 360.

R=rsc, dho, agl, agl1
CC=ukai
https://golang.org/cl/163055

15 years ago8g: fix 386 floating point stack bug
Charles L. Dorian [Tue, 1 Dec 2009 23:53:50 +0000 (15:53 -0800)]
8g: fix 386 floating point stack bug

Also fixes issue 310 comment 5 error.
Fixes #310.

R=rsc
https://golang.org/cl/163042

15 years agomore gob bugs
Rob Pike [Tue, 1 Dec 2009 23:31:28 +0000 (15:31 -0800)]
more gob bugs
1) need to send slice and array types (was only sending element types)
2) compatibleType needs to use decoder's type map

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

15 years agomake test.sh work again
Robert Griesemer [Tue, 1 Dec 2009 21:08:36 +0000 (13:08 -0800)]
make test.sh work again

R=rsc
https://golang.org/cl/164059

15 years agoA/C: add Charles L. Dorian
Russ Cox [Tue, 1 Dec 2009 20:45:41 +0000 (12:45 -0800)]
A/C: add Charles L. Dorian

R=r
https://golang.org/cl/164060

15 years agoAdded Sven Almgren to AUTHORS and CONTRIBUTORS
Sven Almgren [Tue, 1 Dec 2009 20:07:43 +0000 (12:07 -0800)]
Added Sven Almgren to AUTHORS and CONTRIBUTORS

R=rsc
https://golang.org/cl/163053

15 years agoa couple of usage fixups in prof
Rob Pike [Tue, 1 Dec 2009 19:35:34 +0000 (11:35 -0800)]
a couple of usage fixups in prof

R=rsc
https://golang.org/cl/161050

15 years agogofmt: use os.Stdin instead of opening /dev/stdin
Fazlul Shahriar [Tue, 1 Dec 2009 17:32:22 +0000 (09:32 -0800)]
gofmt: use os.Stdin instead of opening /dev/stdin

Opening /dev/stdin can sometimes fail. For example, in the acme editor,
executing "Edit ,|gofmt" fails with:

open /dev/stdin: no such device or address

Executing "Edit ,|ls -l /dev/stdin /proc/self/fd/0" gives:

lrwxrwxrwx 1 root root  15 2009-09-07 02:17 /dev/stdin -> /proc/self/fd/0
lrwx------ 1 fhs  users 64 2009-11-26 22:05 /proc/self/fd/0 -> socket:[5528230]

(This is my first change, and I've signed the individual contributor license agreement.)

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

15 years agosome godoc cleanup:
Robert Griesemer [Tue, 1 Dec 2009 17:15:05 +0000 (09:15 -0800)]
some godoc cleanup:
- simplified dealing with parse errors: no need to intersperse them in the source
- improve visibility of highlighted identifiers by showing them in bold

R=rsc
https://golang.org/cl/163051

15 years agoFix typo in spec
Fazlul Shahriar [Tue, 1 Dec 2009 05:23:58 +0000 (21:23 -0800)]
Fix typo in spec

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

15 years agoSyntax coloring and function navigation for BBEdit/TextWrangler
Anthony Starks [Tue, 1 Dec 2009 03:24:32 +0000 (19:24 -0800)]
Syntax coloring and function navigation for BBEdit/TextWrangler

R=rsc
CC=agl1
https://golang.org/cl/154123

15 years agoAdding to AUTHORS and CONTRIBUTORS as per http://golang.org/doc/contribute.html#copyright
Anthony Starks [Tue, 1 Dec 2009 03:24:11 +0000 (19:24 -0800)]
Adding to AUTHORS and CONTRIBUTORS as per http://golang.org/doc/contribute.html#copyright

R=rsc
https://golang.org/cl/163050

15 years agochange command-line argument to be
Roger Peppe [Mon, 30 Nov 2009 23:16:40 +0000 (15:16 -0800)]
change command-line argument to be
unnamed, not require -n, in line with other
entries.

R=rsc
CC=r
https://golang.org/cl/162061

15 years agoMake tests run on systems missing time utility
Sergey 'SnakE' Gromov [Mon, 30 Nov 2009 23:07:57 +0000 (15:07 -0800)]
Make tests run on systems missing time utility

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

15 years agoAdded my name to the AUTHORS and CONTRIBUTORS files.
Adrian O'Grady [Mon, 30 Nov 2009 22:27:37 +0000 (14:27 -0800)]
Added my name to the AUTHORS and CONTRIBUTORS files.

R=rsc
https://golang.org/cl/157153

15 years agoA first stab at porting the XCB X11 protocol bindings to go.
Tor Andersson [Mon, 30 Nov 2009 22:25:50 +0000 (14:25 -0800)]
A first stab at porting the XCB X11 protocol bindings to go.

The python script needs a checkout of xcb/proto to generate
an xproto.go file, which together with xgb.go provide functions
to access all of the core X11 protocol requests. I have included the
generated file.

Extensions and authentication methods are not implemented.

R=r, rsc, nigeltao_golang
https://golang.org/cl/162053

15 years agojson: Decode into native Go data structures
Sergey 'SnakE' Gromov [Mon, 30 Nov 2009 21:55:09 +0000 (13:55 -0800)]
json: Decode into native Go data structures

This patch adds an ability to convert JSON-encoded data into
a hierarchy of Go's native data types.

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

15 years agoTypo in comment.
Robert Griesemer [Mon, 30 Nov 2009 20:50:02 +0000 (12:50 -0800)]
Typo in comment.
Fixes #358.

R=rsc
CC=r
https://golang.org/cl/164043

15 years agosync.RWMutex: rewritten to add support for concurrent readers.
Péter Szabó [Mon, 30 Nov 2009 20:10:56 +0000 (12:10 -0800)]
sync.RWMutex: rewritten to add support for concurrent readers.

Also made sync.xadd public to help testing sync.RWMutex.

Also added unit tests for sync.RWMutex.

R=rsc
https://golang.org/cl/162044

15 years agoAdded a method on UDPConn so they can actually send broadcast packets.
Jonathan Wills [Mon, 30 Nov 2009 20:03:55 +0000 (12:03 -0800)]
Added a method on UDPConn so they can actually send broadcast packets.

R=rsc
https://golang.org/cl/162046

15 years agoa[b:len(a)] -> a[b:]
Christopher Wedgwood [Mon, 30 Nov 2009 20:03:43 +0000 (12:03 -0800)]
a[b:len(a)] -> a[b:]

R=r, rsc
CC=agl1
https://golang.org/cl/161070

15 years agoHandle \r as a whitespace when parsing JSON string.
Andrew Skiba [Mon, 30 Nov 2009 20:03:26 +0000 (12:03 -0800)]
Handle \r as a whitespace when parsing JSON string.
Fixes #272.

R=rsc
https://golang.org/cl/161061

15 years agoAdd trivial whitespace to CorruptInputError strings.
Christopher Wedgwood [Mon, 30 Nov 2009 20:03:10 +0000 (12:03 -0800)]
Add trivial whitespace to CorruptInputError strings.

R=r, rsc
https://golang.org/cl/161058

15 years agoMinimise bitrot: bytes.Copy -> copy
Christopher Wedgwood [Mon, 30 Nov 2009 19:57:21 +0000 (11:57 -0800)]
Minimise bitrot: bytes.Copy -> copy
(compile tested only)

R=r, rsc
https://golang.org/cl/161069

15 years agoPorts of lib9, libbio and libmach to Windows.
Hector Chu [Mon, 30 Nov 2009 19:53:11 +0000 (11:53 -0800)]
Ports of lib9, libbio and libmach to Windows.

R=rsc
https://golang.org/cl/157159

15 years agoAUTHORS+CONTRIBUTORS: more names; CLA verified
Russ Cox [Mon, 30 Nov 2009 19:38:41 +0000 (11:38 -0800)]
AUTHORS+CONTRIBUTORS: more names; CLA verified

R=gri
CC=r
https://golang.org/cl/163044

15 years agotemplate: two bug fixes / nits
Russ Cox [Mon, 30 Nov 2009 18:29:14 +0000 (10:29 -0800)]
template: two bug fixes / nits
  * diagnose template not created with New
    (current code just crashes)
  * write []byte uninterpreted
    (current code writes fmt format: "[65 65 65 65]")

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

15 years agocodereview: allow editing of local CL description
Russ Cox [Mon, 30 Nov 2009 18:28:48 +0000 (10:28 -0800)]
codereview: allow editing of local CL description
between hg clpatch and hg submit.

R=r
https://golang.org/cl/162059

15 years agoAUTHORS/CONTRIBUTORS: two more names
Russ Cox [Mon, 30 Nov 2009 18:28:31 +0000 (10:28 -0800)]
AUTHORS/CONTRIBUTORS: two more names

R=r, SnakE
CC=fhs, pts
https://golang.org/cl/162054

15 years agoFix example Makefile to avoid $GOROOT in case it has spaces.
Fumitoshi Ukai [Mon, 30 Nov 2009 05:22:05 +0000 (21:22 -0800)]
Fix example Makefile to avoid $GOROOT in case it has spaces.

R=rsc, sergio
https://golang.org/cl/162058

15 years agowebsocket: avoid $GOROOT in case it has spaces
Russ Cox [Mon, 30 Nov 2009 04:30:02 +0000 (20:30 -0800)]
websocket: avoid $GOROOT in case it has spaces

Fixes #115.

R=r, ukai, sergio
https://golang.org/cl/162057

15 years agocrypto/md4, exp/draw/x11: fix makefile to build when GOROOT has whitespaces
Sergio Luis O. B. Correia [Mon, 30 Nov 2009 02:14:49 +0000 (18:14 -0800)]
crypto/md4, exp/draw/x11: fix makefile to build when GOROOT has whitespaces

this is the exact same thing issue #115 is about. fix makefiles to use relative
path to work in the case we have whitespaces as part of GOROOT.

R=rsc
https://golang.org/cl/162055

15 years agocgo: use C type void for opaque types if dwarf.Common().Type returns nothing
Eden Li [Mon, 30 Nov 2009 02:14:39 +0000 (18:14 -0800)]
cgo: use C type void for opaque types if dwarf.Common().Type returns nothing

Ideally, the C name would come from the typedef or pointer that
references the Size<0 type, but we can't easily generate this without
performing a look-ahead to see if any referencing type will become opaque.

Fixes #334.
Fixes #281.

R=rsc
https://golang.org/cl/161056

15 years agoAdd WebSocket server framework hooked into http.
Fumitoshi Ukai [Sun, 29 Nov 2009 22:22:44 +0000 (14:22 -0800)]
Add WebSocket server framework hooked into http.

R=r, rsc
https://golang.org/cl/156071

15 years agoMake comment-start/-end changes buffer-local instead of global.
Austin Clements [Sun, 29 Nov 2009 22:22:07 +0000 (14:22 -0800)]
Make comment-start/-end changes buffer-local instead of global.

Fixes #290.

R=rsc
https://golang.org/cl/160070

15 years agoAdd myself to CONTRIBUTORS
Fumitoshi Ukai [Sun, 29 Nov 2009 22:18:04 +0000 (14:18 -0800)]
Add myself to CONTRIBUTORS

R=r, rsc
https://golang.org/cl/156070

15 years agoCorrect expression level for argument lists.
Robert Griesemer [Sun, 29 Nov 2009 22:11:52 +0000 (14:11 -0800)]
Correct expression level for argument lists.
Fixes #352.

R=rsc
https://golang.org/cl/161073

15 years agoa few utf8 benchmarks. on my mac:
Rob Pike [Wed, 25 Nov 2009 21:30:30 +0000 (13:30 -0800)]
a few utf8 benchmarks. on my mac:

utf8_test.BenchmarkRuneCountTenASCIIChars 20000000        108 ns/op
utf8_test.BenchmarkRuneCountTenJapaneseChars 10000000        199 ns/op
utf8_test.BenchmarkEncodeASCIIRune 500000000          6 ns/op
utf8_test.BenchmarkEncodeJapaneseRune 100000000         10 ns/op
utf8_test.BenchmarkDecodeASCIIRune 100000000         13 ns/op
utf8_test.BenchmarkDecodeJapaneseRune 100000000         21 ns/op

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

15 years agorewrite RuneCountInString to use range.
Rob Pike [Wed, 25 Nov 2009 19:39:34 +0000 (11:39 -0800)]
rewrite RuneCountInString to use range.

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

15 years agoInitial exp/draw/x11 implementation.
Nigel Tao [Wed, 25 Nov 2009 07:31:34 +0000 (18:31 +1100)]
Initial exp/draw/x11 implementation.

This provides an experimental X11 backend for the exp/draw interface.
It does not aim to provide a complete implementation of the X11 client protocol.

This works for me (Ubuntu Hardy 8.04, GOARCH=386). Your mileage my vary.

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

15 years agofix weird all.bash failures by running deps.bash before make clean runs in pkg directory.
Rob Pike [Wed, 25 Nov 2009 05:07:05 +0000 (21:07 -0800)]
fix weird all.bash failures by running deps.bash before make clean runs in pkg directory.
before this change, if pkg/Make.deps is missing or broken, clean.bash fails and the build dies
but not until much later.

add freebsd to error message about valid values of $GOOS

TODO: would be nice if this process exited when an error occurred. subshells make it hard

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

15 years agoHandle presence of illegal semicolon after package clause better.
Robert Griesemer [Wed, 25 Nov 2009 01:34:08 +0000 (17:34 -0800)]
Handle presence of illegal semicolon after package clause better.

R=r, r1
https://golang.org/cl/157167

15 years agoReplace sort.Sort call with heapify algorithm in Init.
Robert Griesemer [Wed, 25 Nov 2009 01:20:13 +0000 (17:20 -0800)]
Replace sort.Sort call with heapify algorithm in Init.
Fixed package comment.
Renamed some variables for symmetry, added more internal comments and more tests.
Fixes #304.

R=rsc
https://golang.org/cl/157166

15 years agogc: correct type check for x, ok map assignment
Russ Cox [Wed, 25 Nov 2009 00:11:48 +0000 (16:11 -0800)]
gc: correct type check for x, ok map assignment

Fixes #288.

R=ken2
https://golang.org/cl/157162

15 years agomake.bash: clear CDPATH to avoid output from cd
Russ Cox [Wed, 25 Nov 2009 00:01:35 +0000 (16:01 -0800)]
make.bash: clear CDPATH to avoid output from cd

Fixes #306.

R=r, r1
https://golang.org/cl/160060

15 years agoadd freebsd to the list of os'es.
Rob Pike [Wed, 25 Nov 2009 00:00:19 +0000 (16:00 -0800)]
add freebsd to the list of os'es.
make the GOOS/GOARCH pair a table to avoid the confusion caused when it was of the form linux/386.

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

15 years agotest case for large angles in trig functions
Ken Thompson [Tue, 24 Nov 2009 23:42:46 +0000 (15:42 -0800)]
test case for large angles in trig functions

R=rsc
https://golang.org/cl/157160

15 years agobad sin/cos for large angles.
Ken Thompson [Tue, 24 Nov 2009 23:01:44 +0000 (15:01 -0800)]
bad sin/cos for large angles.
fixes #326.

R=rsc
https://golang.org/cl/160059

15 years agotiming log update for new version of chameneos
Rob Pike [Tue, 24 Nov 2009 22:19:43 +0000 (14:19 -0800)]
timing log update for new version of chameneos

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

15 years agofix for broken build (built-in new was invisible due to a parameter called 'new')
Robert Griesemer [Tue, 24 Nov 2009 22:11:53 +0000 (14:11 -0800)]
fix for broken build (built-in new was invisible due to a parameter called 'new')

R=iant
https://golang.org/cl/160057

15 years agochange the rules for maintaining AUTHORS and CONTRIBUTORS files.
Rob Pike [Tue, 24 Nov 2009 22:04:43 +0000 (14:04 -0800)]
change the rules for maintaining AUTHORS and CONTRIBUTORS files.
the current system is too painful, so instead let's just have the coders tell us the details.
we can update the files ourselves.

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

15 years agoChange to container/vector interface:
Robert Griesemer [Tue, 24 Nov 2009 21:43:18 +0000 (13:43 -0800)]
Change to container/vector interface:
- removed New(len int) in favor of new(Vector).Resize(len, cap)
- removed Init(len int) in favor of Resize(len, cap)
- runs all.bash

Fixes #294.

R=rsc, r, r1
https://golang.org/cl/157143

15 years agoMention golang-dev as a default code review destination.
Ian Lance Taylor [Tue, 24 Nov 2009 21:36:54 +0000 (13:36 -0800)]
Mention golang-dev as a default code review destination.

R=rsc
CC=r
https://golang.org/cl/160056

15 years agogodoc: plug file descriptor leak
Russ Cox [Tue, 24 Nov 2009 21:21:14 +0000 (13:21 -0800)]
godoc: plug file descriptor leak

R=gri
CC=r
https://golang.org/cl/157149

15 years agoA quick fix to ensure that json.Marshal returns errors correctly, as well as some...
Michael Hoisie [Tue, 24 Nov 2009 21:18:44 +0000 (13:18 -0800)]
A quick fix to ensure that json.Marshal returns errors correctly, as well as some error-related tests

R=rsc
https://golang.org/cl/157151

15 years agohttp: redirect to correct URL
Russ Cox [Tue, 24 Nov 2009 19:47:53 +0000 (11:47 -0800)]
http: redirect to correct URL

R=r, r1
https://golang.org/cl/157154

15 years agochameneosredux test modified, bug fixed, faster
Roger Peppe [Tue, 24 Nov 2009 19:45:30 +0000 (11:45 -0800)]
chameneosredux test modified, bug fixed, faster
based on suggestion from arvindht@gmail.com

R=r, rsc, r1
https://golang.org/cl/157091

15 years agoadd Roger Peppe to AUTHORS/CONTRIBUTORS
Russ Cox [Tue, 24 Nov 2009 19:33:43 +0000 (11:33 -0800)]
add Roger Peppe to AUTHORS/CONTRIBUTORS

R=r
https://golang.org/cl/157157

15 years agoadd Take, TakeWhile, Drop, DropWhile to exp/iterable
Michael Elkins [Tue, 24 Nov 2009 19:31:11 +0000 (11:31 -0800)]
add Take, TakeWhile, Drop, DropWhile to exp/iterable

R=dsymonds1, rsc
https://golang.org/cl/156079

15 years agoAdding myself to AUTHORS/CONTRIBUTORS as a result of https://golang.org/cl/156079
Michael Elkins [Tue, 24 Nov 2009 19:29:51 +0000 (11:29 -0800)]
Adding myself to AUTHORS/CONTRIBUTORS as a result of https://golang.org/cl/156079

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

15 years agoprint error's string when panicking.
Rob Pike [Tue, 24 Nov 2009 18:55:50 +0000 (10:55 -0800)]
print error's string when panicking.

R=rsc
https://golang.org/cl/157156

15 years agoAdd benchmarks for commonly used routines.
Trevor Strohman [Tue, 24 Nov 2009 08:21:50 +0000 (00:21 -0800)]
Add benchmarks for commonly used routines.

R=rsc, r, r1
https://golang.org/cl/160046

15 years ago cgo translates empty function arguments into void instead of dying with 'unexpected...
Eden Li [Tue, 24 Nov 2009 06:02:12 +0000 (22:02 -0800)]
cgo translates empty function arguments into void instead of dying with 'unexpected type: ...'.
  Fixes #162.

R=rsc
https://golang.org/cl/157147

15 years agojson: expose map in generic representation
Russ Cox [Tue, 24 Nov 2009 02:11:00 +0000 (18:11 -0800)]
json: expose map in generic representation

R=r, r1
https://golang.org/cl/157146

15 years agoProvides implementation of MD4 hashing algorithm.
Chris Lennert [Tue, 24 Nov 2009 01:44:44 +0000 (17:44 -0800)]
Provides implementation of MD4 hashing algorithm.

See IETF RFC 1320, http://tools.ietf.org/html/rfc1320.
Fixes #279.

R=rsc
https://golang.org/cl/159051

15 years agoAdded my name to the AUTHORS and CONTRIBUTORS lists.
Chris Lennert [Tue, 24 Nov 2009 01:44:38 +0000 (17:44 -0800)]
Added my name to the AUTHORS and CONTRIBUTORS lists.

R=rsc
https://golang.org/cl/160047

15 years agoadd an FAQ entry about the logo and mascot
Rob Pike [Tue, 24 Nov 2009 01:34:23 +0000 (17:34 -0800)]
add an FAQ entry about the logo and mascot

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

15 years agogo: makes it build for the case $GOROOT has whitespaces
Sergio Luis O. B. Correia [Tue, 24 Nov 2009 01:32:51 +0000 (17:32 -0800)]
go: makes it build for the case $GOROOT has whitespaces

the bash scripts and makefiles for building go didn't take into account
the fact $GOROOT / $GOBIN could both be directories containing whitespaces,
and was not possible to build it in such a situation.

this commit adjusts the various makefiles/scripts to make it aware of that
possibility, and now it builds successfully when using a path with whitespaces
as well.

Fixes #115.

R=rsc, dsymonds1
https://golang.org/cl/157067

15 years agocmd/cc: change getquoted() to accept whitespaces.
Sergio Luis O. B. Correia [Tue, 24 Nov 2009 00:00:26 +0000 (16:00 -0800)]
cmd/cc: change getquoted() to accept whitespaces.

getquoted() currently checks for whitespaces and returns nil
if it finds one. this prevents us from having go in a path
containing whitespaces, as the #pragma dynld directives are
processed through the said function.

this commit makes getquoted() accept whitespaces, and this is
also needed for solving issue #115.

R=rsc
https://golang.org/cl/157066

15 years agogofmt -r: documentation and minor fixes
Russ Cox [Mon, 23 Nov 2009 23:44:27 +0000 (15:44 -0800)]
gofmt -r: documentation and minor fixes
fix a few paren insertion bugs in the printer too.

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

15 years ago Fix crash in xml.Unmarshal. Occasionally while running a scrape of some xml with...
Vish Subramanian [Mon, 23 Nov 2009 22:26:30 +0000 (14:26 -0800)]
Fix crash in xml.Unmarshal. Occasionally while running a scrape of some xml with many goroutines
I see a crash with the following stack trace:

SIGSEGV: segmentation violation
Faulting address: 0x44
PC=0x44e510

runtime·mapaccess2+0x18 /home/vish/go/src/pkg/runtime/hashmap.c:790
         runtime·mapaccess2(0x0, 0x0)
xml·*Parser·text+0x922 /home/vish/go/src/pkg/xml/xml.go:765
         xml·*Parser·text(0xe44c9870, 0x7fa3, 0xffffffff, 0x7f00, 0x44b5c4, ...)
xml·*Parser·RawToken+0x174 /home/vish/go/src/pkg/xml/xml.go:405
         xml·*Parser·RawToken(0xe44c9870, 0x7fa3, 0x0, 0x0)
xml·*Parser·Token+0x625 /home/vish/go/src/pkg/xml/xml.go:205
         xml·*Parser·Token(0xe44c9870, 0x7fa3, 0x0, 0x0, 0x0, ...)
xml·*Parser·Skip+0x27 /home/vish/go/src/pkg/xml/read.go:371
         xml·*Parser·Skip(0xe44c9870, 0x7fa3, 0x8, 0x0)
xml·*Parser·unmarshal+0xae6 /home/vish/go/src/pkg/xml/read.go:328
         xml·*Parser·unmarshal(0xe44c9870, 0x7fa3, 0xe8127120, 0x7fa3, 0xdc94bc40, ...)
xml·Unmarshal+0xda /home/vish/go/src/pkg/xml/read.go:121
         xml·Unmarshal(0xe65724b0, 0x7fa3, 0xdc94bc00, 0x7fa3, 0x4bcfc0, ...)
scraper·DoSearch+0x3d1 /home/vish/my-go-src/google3/experimental/users/vish/go_http/scraper.go:95
         scraper·DoSearch(0xe7dc28c0, 0x7fa3, 0x33, 0x3, 0x6d2510, ...)
main·scrapeQueries+0x202 /home/vish/my-go-src/google3/experimental/users/vish/go_http/scrape.go:251
         main·scrapeQueries(0xe7da2600, 0x7fa3, 0x64, 0x1db0, 0xe7e10000, ...)
goexit /home/vish/go/src/pkg/runtime/proc.c:135
         goexit()
0x7fa3e7da2600 unknown pc

Clearly xml.Parser is accessing an uninitialized map. Add a check for a nil map before accessing it.

R=r, rsc
https://golang.org/cl/159050

15 years agotwo more if(h<0) that gcc 4.3 -O2 miscompiles
Russ Cox [Mon, 23 Nov 2009 22:23:14 +0000 (14:23 -0800)]
two more if(h<0) that gcc 4.3 -O2 miscompiles

R=r
https://golang.org/cl/160044

15 years agoio.ReadWriter: fix doc comment (ReadWrite -> ReadWriter)
Russ Cox [Mon, 23 Nov 2009 22:22:56 +0000 (14:22 -0800)]
io.ReadWriter: fix doc comment (ReadWrite -> ReadWriter)

R=r
CC=eds
https://golang.org/cl/160045

15 years agofix bug in prefix code: must stop one character before any potential match of an...
Rob Pike [Mon, 23 Nov 2009 22:06:21 +0000 (14:06 -0800)]
fix bug in prefix code: must stop one character before any potential match of an empty string

Fixes #308.

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

15 years agoFix doc striing for NewReadLogger.
Rob Pike [Mon, 23 Nov 2009 21:51:10 +0000 (13:51 -0800)]
Fix doc striing for NewReadLogger.

Fixes #315.

R=rsc
https://golang.org/cl/157140

15 years ago8g: call throwindex for array out of bounds
Russ Cox [Mon, 23 Nov 2009 20:58:28 +0000 (12:58 -0800)]
8g: call throwindex for array out of bounds

R=ken2
https://golang.org/cl/160043

15 years agocrypto/tls: add initial client implementation.
Adam Langley [Sat, 21 Nov 2009 23:53:03 +0000 (15:53 -0800)]
crypto/tls: add initial client implementation.

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

15 years agomention arrays of arrays and slices of slices
Rob Pike [Fri, 20 Nov 2009 23:47:15 +0000 (15:47 -0800)]
mention arrays of arrays and slices of slices

Fixes #113.

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

15 years agogofmt: add -r flag to rewrite source code according to pattern
Russ Cox [Fri, 20 Nov 2009 23:09:54 +0000 (15:09 -0800)]
gofmt: add -r flag to rewrite source code according to pattern
a little slow, but usable (speed unchanged when not using -r)

tweak go/printer to handle nodes without line numbers
more gracefully in a couple cases.

R=gri
https://golang.org/cl/156103

15 years agoMissed a reference to sc instead of mc in 157065.
William Josephson [Fri, 20 Nov 2009 21:46:47 +0000 (13:46 -0800)]
Missed a reference to sc instead of mc in 157065.

R=rsc, dho
https://golang.org/cl/157116

15 years agogofmt -r 'α[β:len(α)] -> α[β:]' -w test/bench
Russ Cox [Fri, 20 Nov 2009 21:11:42 +0000 (13:11 -0800)]
gofmt -r 'α[β:len(α)] -> α[β:]' -w test/bench
except chameneosredux which i know is being edited

require gofmt for test/bench

R=r
https://golang.org/cl/157110

15 years agoFreeBSD's mcontext isn't exactly the same as sigcontext, so
Devon H. O'Dell [Fri, 20 Nov 2009 21:08:16 +0000 (13:08 -0800)]
FreeBSD's mcontext isn't exactly the same as sigcontext, so
we can't use them interchangably.

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

15 years agoSupport for basic try-catch style exception handling.
Robert Griesemer [Fri, 20 Nov 2009 19:50:11 +0000 (11:50 -0800)]
Support for basic try-catch style exception handling.
Meant as illustration of the Go pattern that is using
goroutines and channels to handle exceptional situations.

Note: There is no need for "Finally" since the
"try block" (the function f supplied to Try)
cannot do a Smalltalk-style non-local return
and terminate the function surrounding Try.

Replaces CL 157083.

R=r, rsc
https://golang.org/cl/157087

15 years agogofmt -r 'α[β:len(α)] -> α[β:]' -w src/cmd src/pkg
Russ Cox [Fri, 20 Nov 2009 19:45:05 +0000 (11:45 -0800)]
gofmt -r 'α[β:len(α)] -> α[β:]' -w src/cmd src/pkg

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

15 years agox[y:] for strings
Russ Cox [Fri, 20 Nov 2009 19:42:28 +0000 (11:42 -0800)]
x[y:] for strings

R=ken2
https://golang.org/cl/157114

15 years agofix build
Rob Pike [Fri, 20 Nov 2009 19:26:40 +0000 (11:26 -0800)]
fix build

R=rsc
https://golang.org/cl/159044

15 years agocodereview: handle UTF-8 in message descriptions
Russ Cox [Fri, 20 Nov 2009 19:19:16 +0000 (11:19 -0800)]
codereview: handle UTF-8 in message descriptions

what a terrible way to implement strings

R=r
https://golang.org/cl/156116

15 years agoslight simplification made possible by the code now processing match states
Rob Pike [Fri, 20 Nov 2009 19:16:57 +0000 (11:16 -0800)]
slight simplification made possible by the code now processing match states
in order of discovery.

R=rsc
https://golang.org/cl/157112

15 years agoadd unimplemented %+ and % (space) flags to floating-point print.
Rob Pike [Fri, 20 Nov 2009 19:04:51 +0000 (11:04 -0800)]
add unimplemented %+ and %  (space) flags to floating-point print.
fix %E: was same as %e.
add tests.

Fixes #278.

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

15 years agox[lo:] - gc and runtime.
Russ Cox [Fri, 20 Nov 2009 17:11:46 +0000 (09:11 -0800)]
x[lo:] - gc and runtime.
  * add runtime sliceslice1 for x[lo:]
  * remove runtime arraytoslice, rewriting &arr into arr[0:len(arr)].
  * port cgen_inline into 8g, 5g.
  * use native memmove in maps

R=ken2
https://golang.org/cl/157106

15 years agotest/bench revisions;
Russ Cox [Fri, 20 Nov 2009 16:59:11 +0000 (08:59 -0800)]
test/bench revisions;
  * reverse-complement: port C algorithm to Go
saves 30% on my MacBook Pro and makes it a fairer comparison.
  * test reverse-complement with and without GC (another 15%)
  * revise timing.sh to work on more systems
  * avoid two glibcisms in fasta.c

R=r
https://golang.org/cl/156110

15 years agocgo: allow .so in subdirectories
Russ Cox [Fri, 20 Nov 2009 08:31:03 +0000 (00:31 -0800)]
cgo: allow .so in subdirectories

R=r
https://golang.org/cl/157103

15 years agocodereview: make hg sync work with Mercurial 1.4
Russ Cox [Fri, 20 Nov 2009 08:30:38 +0000 (00:30 -0800)]
codereview: make hg sync work with Mercurial 1.4

R=r
https://golang.org/cl/157102

15 years agoadd a match arena to regexp to avoid generating garbage.
Rob Pike [Fri, 20 Nov 2009 07:12:01 +0000 (23:12 -0800)]
add a match arena to regexp to avoid generating garbage.
simple regexps run 20x faster.
the regex-dna benchmark goes 3x faster.

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

15 years agocgo now renders types with unknown size as [0]byte instead of raising a
Eden Li [Fri, 20 Nov 2009 06:09:01 +0000 (22:09 -0800)]
cgo now renders types with unknown size as [0]byte instead of raising a
fatal error.
Fixes #126.

R=rsc
https://golang.org/cl/157101

15 years agoreflect fixes
Russ Cox [Fri, 20 Nov 2009 06:06:32 +0000 (22:06 -0800)]
reflect fixes

R=r
https://golang.org/cl/156104

15 years agofix arm build.
Russ Cox [Fri, 20 Nov 2009 05:16:26 +0000 (21:16 -0800)]
fix arm build.
once more with feeling.

TBR=kaib
https://golang.org/cl/157100