]> Cypherpunks repositories - gostls13.git/log
gostls13.git
15 years agobig: cleanup and removal of redundant functionality
Robert Griesemer [Sat, 1 May 2010 22:11:27 +0000 (15:11 -0700)]
big: cleanup and removal of redundant functionality

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

15 years agogc: be pickier about slice, chan, array, and map sizes
Russ Cox [Sat, 1 May 2010 20:15:42 +0000 (13:15 -0700)]
gc: be pickier about slice, chan, array, and map sizes

Fixes #589.

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

15 years agogmp: fix bug in SetString
Russ Cox [Sat, 1 May 2010 20:10:01 +0000 (13:10 -0700)]
gmp: fix bug in SetString

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

15 years agovector: use correct capacity in call to make
Russ Cox [Sat, 1 May 2010 20:00:01 +0000 (13:00 -0700)]
vector: use correct capacity in call to make

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

15 years agobig: use fast shift routines
Robert Griesemer [Sat, 1 May 2010 04:25:48 +0000 (21:25 -0700)]
big: use fast shift routines

- fixed a couple of bugs in the process
  (shift right was incorrect for negative numbers)
- added more tests and made some tests more robust
- changed pidigits back to using shifts to multiply
  by 2 instead of add

  This improves pidigit -s -n 10000 by approx. 5%:

  user 0m6.496s (old)
  user 0m6.156s (new)

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

15 years agobig/arith: assembly routines for 386 long shifts (2nd round)
Robert Griesemer [Fri, 30 Apr 2010 21:41:04 +0000 (14:41 -0700)]
big/arith: assembly routines for 386 long shifts (2nd round)

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

15 years ago8g: bug272
Russ Cox [Fri, 30 Apr 2010 21:04:34 +0000 (14:04 -0700)]
8g: bug272

Fixes #589.

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

15 years agogc: bug271
Russ Cox [Fri, 30 Apr 2010 20:27:08 +0000 (13:27 -0700)]
gc: bug271

Fixes #662.

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

15 years agogc: bug270
Russ Cox [Fri, 30 Apr 2010 20:04:16 +0000 (13:04 -0700)]
gc: bug270

Fixes #746.

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

15 years ago8l: fix absolute path detection on Windows
Russ Cox [Fri, 30 Apr 2010 19:48:03 +0000 (12:48 -0700)]
8l: fix absolute path detection on Windows

Fixes #755.

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

15 years agosyscall: handle EOF on pipe - special case on Windows
Alex Brainman [Fri, 30 Apr 2010 19:46:46 +0000 (12:46 -0700)]
syscall: handle EOF on pipe - special case on Windows

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

15 years agofix build
Robert Griesemer [Fri, 30 Apr 2010 19:01:15 +0000 (12:01 -0700)]
fix build

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

15 years agobig: improved computation of "karatsuba length" for faster multiplies
Robert Griesemer [Fri, 30 Apr 2010 18:54:27 +0000 (11:54 -0700)]
big: improved computation of "karatsuba length" for faster multiplies

This results in an improvement of > 35% for the existing Mul benchmark
using the same karatsuba threshold, and an improvement of > 50% with
a slightly higher threshold (32 instead of 30):

big.BenchmarkMul           500    6731846 ns/op (old alg.)
big.BenchmarkMul    500    4351122 ns/op (new alg.)
big.BenchmarkMul           500    3133782 ns/op (new alg., new theshold)

Also:
- tweaked calibrate.go, use same benchmark as for Mul benchmark

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

15 years agobig: assembly routines for 386 long shifts
Robert Griesemer [Fri, 30 Apr 2010 18:53:37 +0000 (11:53 -0700)]
big: assembly routines for 386 long shifts

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

15 years agobig: implemented core shift routines in arith.go and
Robert Griesemer [Fri, 30 Apr 2010 16:29:11 +0000 (09:29 -0700)]
big: implemented core shift routines in arith.go and
     provide assembly versions (for x86-64 for now)

(Not yet used - waiting for previous CL to clear)

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

15 years agoAdd EWOULDBLOCK to sycall_nacl.go.
Nigel Tao [Fri, 30 Apr 2010 08:45:04 +0000 (18:45 +1000)]
Add EWOULDBLOCK to sycall_nacl.go.

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

15 years agorename GOOS=mingw to GOOS=windows
Alex Brainman [Fri, 30 Apr 2010 06:45:14 +0000 (23:45 -0700)]
rename GOOS=mingw to GOOS=windows

R=rsc, Joe Poirier
CC=golang-dev
https://golang.org/cl/1015043

15 years agosyscall: force O_LARGEFILE in Linux open system call
Russ Cox [Fri, 30 Apr 2010 06:34:06 +0000 (23:34 -0700)]
syscall: force O_LARGEFILE in Linux open system call

Fixes #717.

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

15 years agosyscall: mingw Sleep
Joe Poirier [Fri, 30 Apr 2010 06:08:22 +0000 (23:08 -0700)]
syscall: mingw Sleep

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

15 years agogc: never include ( ) on singleton func return type
Russ Cox [Thu, 29 Apr 2010 23:07:14 +0000 (16:07 -0700)]
gc: never include ( ) on singleton func return type

Fixes #749.

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

15 years agogc: bug268
Russ Cox [Thu, 29 Apr 2010 22:52:27 +0000 (15:52 -0700)]
gc: bug268

Fixes #745.

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

15 years agonet: use short variable declaration
Christopher Wedgwood [Thu, 29 Apr 2010 18:02:10 +0000 (11:02 -0700)]
net: use short variable declaration

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

15 years agonet: parser should handle EOF without newline properly.
Christopher Wedgwood [Thu, 29 Apr 2010 18:01:21 +0000 (11:01 -0700)]
net: parser should handle EOF without newline properly.

Fixes #686.

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

15 years agogo spec: fix iota description
Robert Griesemer [Thu, 29 Apr 2010 17:57:27 +0000 (10:57 -0700)]
go spec: fix iota description

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

15 years agocodelab/index.html: a few typos.
Andrey Mirtchovski [Thu, 29 Apr 2010 04:33:19 +0000 (14:33 +1000)]
codelab/index.html: a few typos.

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

15 years agocodelab/index.html "os" needs to be imported because os.Error is used almost immediately
Andrey Mirtchovski [Thu, 29 Apr 2010 04:06:27 +0000 (14:06 +1000)]
codelab/index.html "os" needs to be imported because os.Error is used almost immediately

Also, calling fmt, ioutil and os "builtin" is probably confusing.

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

15 years agodarwin: bsdthread_create can fail; print good error
Russ Cox [Thu, 29 Apr 2010 02:36:42 +0000 (19:36 -0700)]
darwin: bsdthread_create can fail; print good error

Fixes #549.

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

15 years agonet: do not require newline at end of resolv.conf
Russ Cox [Thu, 29 Apr 2010 02:36:04 +0000 (19:36 -0700)]
net: do not require newline at end of resolv.conf

Fixes #686.

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

15 years agoxml: allow text segments to end at EOF
Russ Cox [Thu, 29 Apr 2010 02:29:20 +0000 (19:29 -0700)]
xml: allow text segments to end at EOF

Fixes #674.

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

15 years agospec: clarify "continue" with label. the text was obvious in intent but
Rob Pike [Wed, 28 Apr 2010 20:18:40 +0000 (13:18 -0700)]
spec: clarify "continue" with label. the text was obvious in intent but
inaccurate in meaning.

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

15 years agofmt: %T print <nil> for nil
Christopher Wedgwood [Wed, 28 Apr 2010 20:07:19 +0000 (13:07 -0700)]
fmt: %T print <nil> for nil

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

15 years agoRemove destination of symlink test in case it got left behind
Ian Lance Taylor [Wed, 28 Apr 2010 18:08:07 +0000 (11:08 -0700)]
Remove destination of symlink test in case it got left behind
earlier.

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

15 years ago5l, 6l, 8l, runtime: make -s binaries work
Russ Cox [Wed, 28 Apr 2010 05:40:26 +0000 (22:40 -0700)]
5l, 6l, 8l, runtime: make -s binaries work
5l, 6l, 8l: change ELF header so that strip doesn't destroy binary

Fixes #261.

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

15 years agorelease.2010-04-27 tags
Andrew Gerrand [Wed, 28 Apr 2010 04:06:25 +0000 (14:06 +1000)]
release.2010-04-27 tags

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

15 years agorelease.2010-04-27 weekly.2010-04-27
Andrew Gerrand [Wed, 28 Apr 2010 04:05:01 +0000 (14:05 +1000)]
release.2010-04-27

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

15 years agowiki codelab: typo fix
Andrew Gerrand [Wed, 28 Apr 2010 02:39:17 +0000 (12:39 +1000)]
wiki codelab: typo fix

noticed this as I was submitting the previous CL :(

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

15 years agoWiki codelab, complete with tests.
Andrew Gerrand [Wed, 28 Apr 2010 02:36:39 +0000 (12:36 +1000)]
Wiki codelab, complete with tests.

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

15 years agobig: implemented Karatsuba multiplication
Robert Griesemer [Wed, 28 Apr 2010 02:16:08 +0000 (19:16 -0700)]
big: implemented Karatsuba multiplication

Plus:
- calibration "test" - include in tests with gotest -calibrate
- basic Mul benchmark
- extra multiplication tests
- various cleanups

This change improves multiplication speed of numbers >= 30 words
in length (current threshold; found empirically with calibrate):

The multiplication benchmark (multiplication of a variety of long numbers)
improves by ~35%, individual multiplies can be significantly faster.

gotest -benchmarks=Mul
big.BenchmarkMul      500    6829290 ns/op (w/ Karatsuba)
big.BenchmarkMul      100   10600760 ns/op

There's no impact on pidigits for -n=10000 or -n=20000
because the operands are are too small.

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

15 years agonet: drop non-RHEL-4.6 ports from test
Russ Cox [Wed, 28 Apr 2010 02:04:22 +0000 (19:04 -0700)]
net: drop non-RHEL-4.6 ports from test

Fixes #610.

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

15 years agoiterable: expose iterFunc as iterable.Func
Russ Cox [Wed, 28 Apr 2010 01:48:29 +0000 (18:48 -0700)]
iterable: expose iterFunc as iterable.Func

Fixes #483.

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

15 years agonet: fix bug in internetSocket introduced by error cleanup.
Russ Cox [Wed, 28 Apr 2010 01:48:11 +0000 (18:48 -0700)]
net: fix bug in internetSocket introduced by error cleanup.

Fixes #750.

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

15 years agogo spec: fix wrong comment
Robert Griesemer [Wed, 28 Apr 2010 00:52:44 +0000 (17:52 -0700)]
go spec: fix wrong comment

Fixes #743.

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

15 years agogo_tutorial: removed outdated use of semicolons
Andrew Gerrand [Wed, 28 Apr 2010 00:50:44 +0000 (10:50 +1000)]
go_tutorial: removed outdated use of semicolons

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

15 years agogc: better windows detection
Russ Cox [Wed, 28 Apr 2010 00:19:15 +0000 (17:19 -0700)]
gc: better windows detection

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

15 years agotemplate: remove reference to json-template
Andrew Gerrand [Wed, 28 Apr 2010 00:14:58 +0000 (10:14 +1000)]
template: remove reference to json-template

Rather than confuse people by linking to a spec we
don't fully support, let them just use the package docs.

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

15 years agopidigits: ~10% performance win by using adds instead of shifts
Robert Griesemer [Tue, 27 Apr 2010 21:06:53 +0000 (14:06 -0700)]
pidigits: ~10% performance win by using adds instead of shifts

user time for pidigits -s -n=10000:
6.466s w/ adds
7.138s w/ shifts

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

15 years agofix build
Robert Griesemer [Tue, 27 Apr 2010 21:05:53 +0000 (14:05 -0700)]
fix build

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

15 years agogc: fix islocalname on windows
Russ Cox [Tue, 27 Apr 2010 20:52:43 +0000 (13:52 -0700)]
gc: fix islocalname on windows

Fixes #732.

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

15 years agorpc/jsonrpc: support for jsonrpc wire encoding
Russ Cox [Tue, 27 Apr 2010 20:51:58 +0000 (13:51 -0700)]
rpc/jsonrpc: support for jsonrpc wire encoding

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

15 years agojson: delete obsolete code
Russ Cox [Tue, 27 Apr 2010 20:51:38 +0000 (13:51 -0700)]
json: delete obsolete code

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

15 years agorpc: abstract client and server encodings
Russ Cox [Tue, 27 Apr 2010 20:51:25 +0000 (13:51 -0700)]
rpc: abstract client and server encodings

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

15 years agogofmt: fine-tune stripping of parentheses
Robert Griesemer [Tue, 27 Apr 2010 20:27:48 +0000 (13:27 -0700)]
gofmt: fine-tune stripping of parentheses
       (composite literals in control clauses only need
       parentheses if the literals start with a type name)

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

15 years ago6g bug: no need for parens around array index expression
Robert Griesemer [Tue, 27 Apr 2010 20:09:32 +0000 (13:09 -0700)]
6g bug: no need for parens around array index expression
where index is a composite literal

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

15 years agogo/parser: don't require parens around composite literals inside a composite literal
Robert Griesemer [Tue, 27 Apr 2010 18:57:17 +0000 (11:57 -0700)]
go/parser: don't require parens around composite literals inside a composite literal
   within an if, for, or switch control clause

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

15 years agogofmt: don't strip mandatory ()'s around composite literals in control clauses
Robert Griesemer [Tue, 27 Apr 2010 17:59:33 +0000 (10:59 -0700)]
gofmt: don't strip mandatory ()'s around composite literals in control clauses

Fixes #748.

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

15 years agojson: streaming
Russ Cox [Tue, 27 Apr 2010 17:46:37 +0000 (10:46 -0700)]
json: streaming

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

15 years agogodoc: use int64 for timestamps
Christopher Wedgwood [Tue, 27 Apr 2010 17:45:33 +0000 (10:45 -0700)]
godoc: use int64 for timestamps

This fixes a crash seen when viewing a directory list.

Fixes #747.

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

15 years agojson: preserve field name case by default
Russ Cox [Tue, 27 Apr 2010 17:24:00 +0000 (10:24 -0700)]
json: preserve field name case by default

This matches the old JSON package behavior.
All lowercase names are not as standard as I believed,
and it seems less surprising to need to write

type T struct { Field string "field" }

to get lower case (behavior after this CL) than it does to need
to write

type T struct { Field string "Field" }

to preserve the case (behavior before this CL).

Also test and  fix unmarshal into non-nil interface
value or pointer.

Fixes #744.

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

15 years agopipe: implementation #3; this time for sure!
Russ Cox [Tue, 27 Apr 2010 17:17:17 +0000 (10:17 -0700)]
pipe: implementation #3; this time for sure!
Added goroutine; got simpler.

Fixes deadlock when doing Read+Close
or Write+Close on same end.

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

15 years agohomepage: removed animation, use custom js instead of gdynamicfeeds
Andrew Gerrand [Tue, 27 Apr 2010 09:27:32 +0000 (19:27 +1000)]
homepage: removed animation, use custom js instead of gdynamicfeeds

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

15 years agotime: remove incorrect time.ISO8601 and add time.RFC3339
Micah Stetson [Tue, 27 Apr 2010 07:05:24 +0000 (00:05 -0700)]
time: remove incorrect time.ISO8601 and add time.RFC3339

Fixes #734.

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

15 years agosyscall: fix mingw build
Alex Brainman [Tue, 27 Apr 2010 06:47:53 +0000 (23:47 -0700)]
syscall: fix mingw build

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

15 years agoos, syscall: more mingw
Alex Brainman [Tue, 27 Apr 2010 06:17:14 +0000 (23:17 -0700)]
os, syscall: more mingw

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

15 years agoos: create sys_bsd.go
Giles Lean [Tue, 27 Apr 2010 06:01:31 +0000 (23:01 -0700)]
os: create sys_bsd.go

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

15 years agoos: Fix build for MinGW
Evan Shaw [Tue, 27 Apr 2010 05:50:47 +0000 (22:50 -0700)]
os: Fix build for MinGW

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

15 years agorename cgo2c to goc2c in ignored list
Alex Brainman [Tue, 27 Apr 2010 05:49:14 +0000 (22:49 -0700)]
rename cgo2c to goc2c in ignored list

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

15 years agoAdded fannkuch-parallel.go
Kyle Consalus [Tue, 27 Apr 2010 05:44:44 +0000 (22:44 -0700)]
Added fannkuch-parallel.go

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

15 years agomath: more special cases for signed zero
Charles L. Dorian [Tue, 27 Apr 2010 05:44:39 +0000 (22:44 -0700)]
math: more special cases for signed zero

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

15 years agogc: more specific error for statements at top level
Russ Cox [Tue, 27 Apr 2010 05:35:27 +0000 (22:35 -0700)]
gc: more specific error for statements at top level

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

15 years agogodoc: add codewalk support
Russ Cox [Tue, 27 Apr 2010 05:35:12 +0000 (22:35 -0700)]
godoc: add codewalk support

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

15 years agocrypto/tls: simpler implementation of record layer
Russ Cox [Tue, 27 Apr 2010 05:19:04 +0000 (22:19 -0700)]
crypto/tls: simpler implementation of record layer

Depends on CL 957045, 980043, 1004043.
Fixes #715.

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

15 years agonet: introduce net.Error interface
Russ Cox [Tue, 27 Apr 2010 05:15:25 +0000 (22:15 -0700)]
net: introduce net.Error interface

Adds two more methods, Timeout and Temporary.
Implemented by os.Errno too.  The intent is to make
the checks for os.EAGAIN a little less clunky.
It should also let us clean up a bug that Mike Solomon
pointed out: if a network server gets an "out of file descriptors"
error from Accept, the listener should not stop.
It will be able to check this because that error would
have Temporary() == true.

Also clean up some underscore names.

Fixes #442.

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

15 years agodoc/root.html: remove key from jsapi src
Andrew Gerrand [Tue, 27 Apr 2010 00:24:17 +0000 (10:24 +1000)]
doc/root.html: remove key from jsapi src

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

15 years agonet: add Pipe
Russ Cox [Mon, 26 Apr 2010 17:36:05 +0000 (10:36 -0700)]
net: add Pipe

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

15 years agobytes: add Next method to Buffer, simplify Read.
Russ Cox [Mon, 26 Apr 2010 17:02:01 +0000 (10:02 -0700)]
bytes: add Next method to Buffer, simplify Read.

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

15 years agoxml: fix innerxml handling of & escapes
Russ Cox [Mon, 26 Apr 2010 17:01:33 +0000 (10:01 -0700)]
xml: fix innerxml handling of & escapes

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

15 years agotemplate: fix handling of pointer inside interface
Russ Cox [Mon, 26 Apr 2010 17:01:13 +0000 (10:01 -0700)]
template: fix handling of pointer inside interface

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

15 years agoregexp: allow escaping of any punctuation
Russ Cox [Mon, 26 Apr 2010 17:00:18 +0000 (10:00 -0700)]
regexp: allow escaping of any punctuation

More in line with other regexp packages
and egrep; accommodates overzealous escapers.

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

15 years agolibmach: disassemble MOVLQZX correctly
Russ Cox [Mon, 26 Apr 2010 08:09:19 +0000 (01:09 -0700)]
libmach: disassemble MOVLQZX correctly

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

15 years agoruntime: closures, defer bug fix for Native Client
Russ Cox [Fri, 23 Apr 2010 00:52:22 +0000 (17:52 -0700)]
runtime: closures, defer bug fix for Native Client

Enable package tests for Native Client build.

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

15 years agoos/stat_freebsd.go: maybe fix build for freebsd
Rob Pike [Fri, 23 Apr 2010 00:04:28 +0000 (17:04 -0700)]
os/stat_freebsd.go: maybe fix build for freebsd

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

15 years agogo_faq: typo fix
Andrew Gerrand [Fri, 23 Apr 2010 00:02:10 +0000 (10:02 +1000)]
go_faq: typo fix

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

15 years agobig: Create type nat
Evan Shaw [Thu, 22 Apr 2010 23:57:29 +0000 (16:57 -0700)]
big: Create type nat

Changed most of the functions in nat.go to methods on nat.

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

15 years agoFileInfo: regularize the types of some fields.
Rob Pike [Thu, 22 Apr 2010 21:01:33 +0000 (14:01 -0700)]
FileInfo: regularize the types of some fields.
Uid, Gid become int.
File size info becomes int64.
Times become int64.

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

15 years agospec: Fix run-time panic header id
Evan Shaw [Thu, 22 Apr 2010 17:14:53 +0000 (10:14 -0700)]
spec: Fix run-time panic header id

Everything was linking to "Run_time_panics", but the id was "Run_time_errors".

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

15 years agovector: Don't always regenerate {int,string}vector.go
Evan Shaw [Thu, 22 Apr 2010 14:43:59 +0000 (00:43 +1000)]
vector: Don't always regenerate {int,string}vector.go

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

15 years agobig: Add some tests
Evan Shaw [Thu, 22 Apr 2010 00:12:36 +0000 (17:12 -0700)]
big: Add some tests

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

15 years agojson: Marshal, Unmarshal using new scanner
Russ Cox [Wed, 21 Apr 2010 23:40:53 +0000 (16:40 -0700)]
json: Marshal, Unmarshal using new scanner

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

15 years agoruntime: switch state back to Grunning after recovery
Russ Cox [Wed, 21 Apr 2010 23:27:41 +0000 (16:27 -0700)]
runtime: switch state back to Grunning after recovery

Fixes #733.

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

15 years agoxml: new "innerxml" tag to collect inner XML
Russ Cox [Wed, 21 Apr 2010 23:27:31 +0000 (16:27 -0700)]
xml: new "innerxml" tag to collect inner XML

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

15 years agoutf16: add DecodeRune, EncodeRune
Russ Cox [Wed, 21 Apr 2010 23:27:18 +0000 (16:27 -0700)]
utf16: add DecodeRune, EncodeRune

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

15 years agofaq: more up-to-date info about the Windows port
Andrew Gerrand [Wed, 21 Apr 2010 23:15:35 +0000 (09:15 +1000)]
faq: more up-to-date info about the Windows port

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

15 years agotest/bench: reenable chameneosredux for gccgo.
Rob Pike [Wed, 21 Apr 2010 21:54:19 +0000 (14:54 -0700)]
test/bench: reenable chameneosredux for gccgo.
run reverse-complement only once. (garbage is no longer an issue)

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

15 years agobig: fix build - start with zero in scanN
Russ Cox [Wed, 21 Apr 2010 05:51:48 +0000 (22:51 -0700)]
big: fix build - start with zero in scanN

R=gri, eds
CC=golang-dev
https://golang.org/cl/947042

15 years agostrings: add ReadRune to Reader
Kyle Consalus [Wed, 21 Apr 2010 05:18:26 +0000 (22:18 -0700)]
strings: add ReadRune to Reader

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

15 years agobig: eliminate redundant array lookups
Evan Shaw [Wed, 21 Apr 2010 04:41:58 +0000 (21:41 -0700)]
big: eliminate redundant array lookups

This gives about a 6% performance improvement to pidigits.
Thanks to Russ for the suggestion.

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

15 years agobig: reduce the number of allocations
Evan Shaw [Wed, 21 Apr 2010 04:24:07 +0000 (21:24 -0700)]
big: reduce the number of allocations

There was a bug in makeN that caused lots of unnecessary
allocations.  Fixing this exposed a few bugs in other
functions which worked when makeN allocated a new slice, but
failed when it simply resized an existing slice.  The result
is a pretty big performance improvement.  When running
pidigits, here were the numbers I got on amd64:

Before this change:
pidigits 10000
        gcc -O2 pidigits.c -lgmp        2.09u 0.02s 2.11r
        gc pidigits     12.68u 0.04s 12.72r
        gc_B pidigits   12.71u 0.03s 12.75r

After:
pidigits 10000
        gcc -O2 pidigits.c -lgmp        2.09u 0.00s 2.10r
        gc pidigits     6.82u 0.00s 6.85r
        gc_B pidigits   6.55u 0.01s 6.59r

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

15 years agogo_faq: add question: Why does Go perform badly on benchmark X?
Andrew Gerrand [Wed, 21 Apr 2010 04:00:56 +0000 (14:00 +1000)]
go_faq: add question: Why does Go perform badly on benchmark X?

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

15 years ago6l, 8l: include ELF header in PT_LOAD mapping for text segment
Russ Cox [Wed, 21 Apr 2010 03:39:55 +0000 (20:39 -0700)]
6l, 8l: include ELF header in PT_LOAD mapping for text segment

Due to page boundary rounding, the header would have
been loaded as part of the text segment already, but this
change placates the "paxctl" tool on so-called hardened
Linux distributions (as if normal distributions weren't already
hard enough to use).

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

15 years agobig: Add Lsh and Value; convert pidigits to use big
Evan Shaw [Wed, 21 Apr 2010 03:39:36 +0000 (20:39 -0700)]
big: Add Lsh and Value; convert pidigits to use big

This yields a pretty significant performance boost to pidigits and there are still some improvements to be made. Here are my numbers:

amd64 w/ bignum:
pidigits 10000
        gcc -O2 pidigits.c -lgmp        2.10u 0.00s 2.10r
        gc pidigits     22.92u 0.02s 22.97r
        gc_B pidigits   22.62u 0.00s 22.65r

amd64 w/ big:
pidigits 10000
        gcc -O2 pidigits.c -lgmp        2.09u 0.02s 2.11r
        gc pidigits     12.68u 0.04s 12.72r
        gc_B pidigits   12.71u 0.03s 12.75r

386 w/ bignum:
pidigits 10000
        gcc -O2 pidigits.c -lgmp        2.09u 0.00s 2.09r
        gc pidigits     44.30u 0.01s 44.35r
        gc_B pidigits   44.29u 0.03s 44.35r

386 w/ big:
pidigits 10000
        gcc -O2 pidigits.c -lgmp        2.10u 0.00s 2.10r
        gc pidigits     22.70u 0.06s 22.79r
        gc_B pidigits   22.80u 0.09s 22.91r

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