1
0
mirror of https://github.com/golang/go synced 2024-09-24 09:30:13 -06:00
Commit Graph

11008 Commits

Author SHA1 Message Date
Russ Cox
fd1c1b9679 cmd/go: work toward build script
The commands in the standard tree are now named
by the pseudo-import paths cmd/gofmt etc.
This avoids ambiguity between cmd/go's directory
and go/token's parent directory.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5503050
2011-12-20 16:42:44 -05:00
Andrew Gerrand
8720105776 builder: use go-build.appspot.com instead of godashboard by default
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5489097
2011-12-21 08:28:54 +11:00
Russ Cox
82a6a4f39e gc: allow use of unsafe.Pointer in generated code
The functions we generate to implement == on structs
or arrays may need to refer to unsafe.Pointer even in
safe mode, in order to handle unexported fields contained
in other packages' structs.

R=ken2
CC=golang-dev
https://golang.org/cl/5505046
2011-12-20 16:25:57 -05:00
Brad Fitzpatrick
964309e2fd net: DialTimeout
Fixes #240

R=adg, dsymonds, rsc, r, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/5491062
2011-12-20 13:17:39 -08:00
Rob Pike
4869996b92 template: better error message for empty templates
New("x").ParseFiles("y") can result in an empty "x" template.
Make the message clearer that this is the problem. The error
returns from both template packages in this case were
confusing.

I considered making the method use "x" instead of "y" in
this case, but that just made other situations confusing
and harder to explain.

Fixes #2594.

R=golang-dev, rsc, r
CC=golang-dev
https://golang.org/cl/5498048
2011-12-20 12:58:23 -08:00
Christopher Wedgwood
bbdd2070a9 .hgignore: ignore autogenerated files
R=rsc
CC=golang-dev
https://golang.org/cl/5491077
2011-12-20 15:54:39 -05:00
Russ Cox
5d429ad013 runtime/cgo: fix build
Two forgotten renames from last CL.

TBR=r
CC=golang-dev
https://golang.org/cl/5502046
2011-12-20 14:42:58 -05:00
Russ Cox
54fb9940cf go: build runtime/cgo
Also rename -v to -x in the build and install commands,
to match the flag in go test (which we can't change
because -v is taken).  Matches sh -x anyway.

R=r, iant, ality
CC=golang-dev
https://golang.org/cl/5504045
2011-12-20 14:25:23 -05:00
Rob Pike
6b772462e4 panics: use the new facilities of testing.B instead
Lots of panics go away.
Also fix a name error in html/template.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5498045
2011-12-20 10:36:25 -08:00
Robert Griesemer
b9697d4a58 go/ast, parser: remember short variable decls. w/ correspoding ident objects
The ast.Object's Decl field pointed back to the corresponding declaration for
all but short variable declarations. Now remember corresponding assignment
statement in the Decl field.

Also: simplified some code for parsing select statements.

R=golang-dev, r, bradfitz
CC=golang-dev
https://golang.org/cl/5492072
2011-12-20 09:59:09 -08:00
Rob Pike
c50e4f5e2f testing: allow benchmarks to print and fail
Refactors the benchmarks and test code.
Now benchmarks can call Errorf, Fail, etc.,
and the runner will act accordingly.

Because functionality has been folded into an
embedded type, a number of methods' docs
no longer appear in godoc output. A fix is
underway; if it doesn't happen fast enough,
I'll add wrapper methods to restore the
documentation.

R=bradfitz, adg, rsc
CC=golang-dev
https://golang.org/cl/5492060
2011-12-20 09:51:39 -08:00
Maxim Pimenov
7be6229f9f cgo: support export for built-in types
This change doesn't pay attention to structs
so they still cannot be exported, see Issue 2552.

Fixes #2462.

R=dvyukov, rsc, iant
CC=golang-dev
https://golang.org/cl/5487058
2011-12-20 09:28:45 -08:00
Roger Peppe
16bf7d9e82 encoding/binary: add more benchmarks
Also add a byte count to the varint benchmarks - this
isn't accurate, of course, but it allows a rough comparison to
the other benchmarks.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5496070
2011-12-20 09:25:47 -08:00
Robert Hencke
317ad14c6a time: JSON marshaler for Time
R=golang-dev, dsymonds, hectorchu, r, r
CC=golang-dev
https://golang.org/cl/5496064
2011-12-20 09:01:18 -08:00
Russ Cox
a1198fcc03 go: build runtime
R=golang-dev, r, adg
CC=golang-dev
https://golang.org/cl/5495068
2011-12-20 10:28:04 -05:00
Ian Lance Taylor
b49625663e syscall: remove unnecessary semicolon from mksyscall.pl
R=golang-dev, r, rsc
CC=golang-dev
https://golang.org/cl/5495098
2011-12-19 20:57:59 -08:00
Ian Lance Taylor
36397814cc strconv: remove obsolete comment.
R=r, rsc
CC=golang-dev
https://golang.org/cl/5490078
2011-12-19 20:57:32 -08:00
Ian Lance Taylor
21af3d86cd runtime: correct '.' to '·' in comments
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5495097
2011-12-19 20:56:37 -08:00
Andrew Gerrand
634f0edabc dashboard: todo sends full Commit with Kind field
Permits us to implement other Kinds of todo instruction in the future.

R=rsc
CC=golang-dev
https://golang.org/cl/5495087
2011-12-20 15:30:11 +11:00
Andrew Gerrand
7bffdc7247 encoding/binary: add Write and Read examples
R=golang-dev, r, adg
CC=golang-dev
https://golang.org/cl/5495095
2011-12-20 13:16:36 +11:00
Joel Sing
5842f7e46a 5l/6l/8l: add support for netbsd signature note section
R=m4dh4tt3r, jsing, rsc
CC=golang-dev
https://golang.org/cl/5493068
2011-12-20 12:25:06 +11:00
Alex Brainman
b7e9d22528 net/http: test should not leave tmp files behind on windows
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5496067
2011-12-20 11:53:24 +11:00
Alex Brainman
796a2c19ea os: make sure Remove returns correct error on windows
R=golang-dev, bsiegert, rsc
CC=golang-dev
https://golang.org/cl/5493078
2011-12-20 11:52:20 +11:00
Alex Brainman
448d89d67a old/template: close file in TestAll before deleting it
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5491073
2011-12-20 11:51:31 +11:00
Andrew Gerrand
7c94dc04a7 dashboard: display correct package build state
Includes some boring whitespace tweaks.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5492067
2011-12-20 11:30:48 +11:00
Andrew Balholm
a0bd46e70f html: ignore <caption>, <col>, <tbody> etc. when parsing table fragments
Pass tests6.dat, test 36:
<caption><col><colgroup><tbody><tfoot><thead><tr>

| <tr>

Pass tests through test 44:
<body></body></html>

R=nigeltao
CC=golang-dev
https://golang.org/cl/5494055
2011-12-20 10:57:06 +11:00
Brad Fitzpatrick
315b361f89 zip: fix data race in test
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5492073
2011-12-19 15:40:10 -08:00
Mikio Hara
d2933e9902 syscall: regenerate z-files for linux/arm
R=golang-dev, dave, rsc
CC=golang-dev
https://golang.org/cl/5496062
2011-12-20 07:42:00 +09:00
Ian Lance Taylor
355ed5da82 exec: disable new test to fix build
TBR=bradfitz
CC=golang-dev
https://golang.org/cl/5494075
2011-12-19 14:09:12 -08:00
Rémy Oudompheng
2368b003e0 strconv: implement faster parsing of decimal numbers.
The algorithm is the same as in the double-conversion library
which also implements Florian Loitsch's fast printing algorithm.
It uses extended floats with a 64-bit mantissa, but cannot give
an answer for all cases.

                           old ns/op  new ns/op  speedup
BenchmarkAtof64Decimal         332        322      1.0x
BenchmarkAtof64Float           385        373      1.0x
BenchmarkAtof64FloatExp       9777        419     23.3x
BenchmarkAtof64Big            3934        691      5.7x
BenchmarkAtof64RandomBits    34060        899     37.9x
BenchmarkAtof64RandomFloats   1329        680      2.0x

See F. Loitsch, ``Printing Floating-Point Numbers Quickly and
Accurately with Integers'', Proceedings of the ACM, 2010.

R=ality, rsc
CC=golang-dev, remy
https://golang.org/cl/5494068
2011-12-19 16:45:51 -05:00
Rob Pike
c99f4f5bf6 doc: delete go course notes
They're out of date, a pain to maintain, and most of the material
is better served by the Go Tour.

Fixes #2101.

R=golang-dev, rsc, r, adg
CC=golang-dev
https://golang.org/cl/5489053
2011-12-19 13:23:27 -08:00
Ian Lance Taylor
384329592a net, syscall, os: set CLOEXEC flag on epoll/kqueue descriptor
Enable new test in os.

R=dave, iant, rsc
CC=golang-dev
https://golang.org/cl/5494061
2011-12-19 12:57:49 -08:00
Russ Cox
1d0f93b4be gc: avoid unsafe in defn of package runtime
Keeps -u tracking simple.

R=ken2
CC=golang-dev
https://golang.org/cl/5495094
2011-12-19 15:52:15 -05:00
Russ Cox
55889409f8 runtime: separate out auto-generated files, take 2
This is like the ill-fated CL 5493063 except that
I have written a shell script (autogen.sh) instead of
thinking I could possibly write a correct Makefile.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5496075
2011-12-19 15:51:13 -05:00
Rémy Oudompheng
4a4c39e7d4 encoding/json: cleanup leftover variables in array decoding.
An old update for API changes in reflect package left several
helper variables that do not have a meaning anymore, and
the type checking of arrays vs slices was broken.
Fixes #2513.

R=ultrotter, rsc
CC=golang-dev, remy
https://golang.org/cl/5488094
2011-12-19 15:32:06 -05:00
Rémy Oudompheng
3a2dec0246 strconv: reduce buffer size for multi-precision decimals.
The longest numbers we have to represent are the smallest denormals.
Their decimal mantissa is not longer than 5^1100. Taking into
account some extra size for in-place operations, 800 digits are
enough. This saves time used for zero intiialization of extra
bytes.

                                        old ns/op  new ns/op    delta
strconv_test.BenchmarkAtof64Decimal           521        334   -35.9%
strconv_test.BenchmarkAtof64Float             572        391   -31.6%
strconv_test.BenchmarkAtof64FloatExp        10242      10036    -2.0%
strconv_test.BenchmarkAtof64Big              4229       4029    -4.7%
strconv_test.BenchmarkFormatFloatDecimal     1396        934   -33.1%
strconv_test.BenchmarkFormatFloat            4295       3341   -22.2%
strconv_test.BenchmarkFormatFloatExp        12035      11181    -7.1%
strconv_test.BenchmarkFormatFloatBig         4213       3229   -23.4%
strconv_test.BenchmarkAppendFloatDecimal     1031        600   -41.8%
strconv_test.BenchmarkAppendFloat            3971       3044   -23.3%
strconv_test.BenchmarkAppendFloatExp        11699      11003    -5.9%
strconv_test.BenchmarkAppendFloatBig         3836       2915   -24.0%

R=golang-dev, bradfitz, rsc
CC=golang-dev, remy
https://golang.org/cl/5491064
2011-12-19 15:03:53 -05:00
Brad Fitzpatrick
178be83e0e exec: add test to verify net package's epoll fd doesn't go to child
R=rsc
CC=golang-dev
https://golang.org/cl/5490075
2011-12-19 09:23:07 -08:00
Christopher Nielsen
5425db8f99 syscall: Changes to the syscall package to support NetBSD.
Not all syscalls are implemented, but many are. On the suggestion
of Joel Sing <jsing@google.com>, the generated files were added
with hg add instead of hg cp, since they are generated on an OS
dependant basis.

R=golang-dev, jsing, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/5491050
2011-12-20 03:57:58 +11:00
Adam Langley
2ca4a61658 crypto/tls: don't assume an RSA private key in the API.
We still very much assume it in the code, but with this change in
place we can implement other things later without changing and users
of the package.

Fixes #2319.

R=golang-dev, bradfitz, r
CC=golang-dev
https://golang.org/cl/5489073
2011-12-19 10:39:30 -05:00
Alex Brainman
10e43384f3 net/http: test both texta and textb values, not texta twice
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5489082
2011-12-19 17:31:20 +11:00
Alex Brainman
c4227f5bb0 io/ioutil: close file in TestWriteFile before deleting it
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5495086
2011-12-19 17:30:14 +11:00
Andrew Gerrand
35755b9cdb dashboard: improve formatting of build status page
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5493077
2011-12-19 16:57:25 +11:00
Andrew Gerrand
9b3799aa89 builder: send commit time to dashboard
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5489084
2011-12-19 16:57:03 +11:00
Andrew Gerrand
0b28de9a05 archive/zip: add SetModTime method to FileHeader
Fixes #2574.

R=golang-dev, bradfitz, adg, bradfitz
CC=golang-dev
https://golang.org/cl/5494072
2011-12-19 14:59:41 +11:00
Andrew Gerrand
3f216c1b5d dashboard: hide build status column (package builder is out of action)
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5489080
2011-12-19 12:37:39 +11:00
Nigel Tao
18e8441476 html: handle text nodes in foreign content.
Passes tests10.dat, test 6:
<!DOCTYPE html><body><table><svg><g>foo</g></svg></table>

| <!DOCTYPE html>
| <html>
|   <head>
|   <body>
|     <svg svg>
|       <svg g>
|         "foo"
|     <table>

Also pass tests through test 12:
<!DOCTYPE html><body><table><caption><svg><g>foo</g><g>bar</g></svg><p>baz</caption></table>

R=andybalholm
CC=golang-dev
https://golang.org/cl/5495061
2011-12-19 12:20:00 +11:00
Andrew Gerrand
5ede9df5a0 encoding/json: examples for Marshal and Unmarshal
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5493075
2011-12-19 11:16:55 +11:00
Gustavo Niemeyer
12f473f807 text/template: fix handing of nil arguments to functions
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5494070
2011-12-18 22:14:11 -02:00
Paul Sbarra
41f4ba3ae5 vim: fix go filetype detection
The filetype needs to be set during BufRead in order for the did_filetype() check to prevent the file being detected as a conf file.  One example where this can occur is if a cgo file has a #include at the top of the file.  The # is detected in vim's generic configuration (conf file) toward the bottom of filetype.vim

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5496066
2011-12-19 10:42:32 +11:00
Andrew Gerrand
31cc66bc52 doc: suggest code.google.com/p/go instead of go.googlecode.com/hg
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5491069
2011-12-19 10:17:44 +11:00