OS X 10.6 doesn't do O_CLOEXEC.
OS X 10.7 does.
For now, always fall back to using syscall.CloseOnExec on darwin.
This can removed when 10.6 is old news, or if we find a
way to cheaply & reliably detect 10.6 vs 10.7 at runtime.
Fixes#2587
R=golang-dev, rsc, iant
CC=golang-dev
https://golang.org/cl/5500053
Also recognize that, in the latest version of the HTML5 spec,
foreign content is not an insertion mode, but a separate concern.
Pass tests10.dat, test 13:
<!DOCTYPE html><body><table><caption><svg><g>foo</g><g>bar</g><p>baz</table><p>quux
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| <table>
| <caption>
| <svg svg>
| <svg g>
| "foo"
| <svg g>
| "bar"
| <p>
| "baz"
| <p>
| "quux"
Also pass tests through test 15:
<!DOCTYPE html><body><table><colgroup><svg><g>foo</g><g>bar</g><p>baz</table><p>quux
R=andybalholm
CC=golang-dev
https://golang.org/cl/5494078
If something goes wrong, it should suffice to set
USE_GO_TOOL=false in env.bash to fall back to the
makefiles. I will delete the makefiles in January.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5502047
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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