- 24 Feb, 2016 6 commits
-
-
Shenghou Ma authored
Like bionic, musl also doesn't provide vsyscall helper in %gs:0x10, and as int $0x80 is as fast as calling %gs:0x10, just use int $0x80 always. Because we're no longer using vsyscall in VDSO, get rid of VDSO code for linux/386 too. Fixes #14476. Change-Id: I00ec8652060700e0a3c9b524bfe3c16a810263f6 Reviewed-on: https://go-review.googlesource.com/19833 Run-TryBot: Minux Ma <minux@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Ian Lance Taylor authored
Bump up the multiplier to 20. Also run the fast version first, so that the slow version is likely to start up faster. Change-Id: Ia0654cc1212ab03a45da1904d3e4b57d6a8d02a0 Reviewed-on: https://go-review.googlesource.com/19835 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Minux Ma <minux@golang.org>
-
Shenghou Ma authored
Change-Id: I02c60f6c767e917a8ed3772c2773fe266f781e44 Reviewed-on: https://go-review.googlesource.com/19834Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Shenghou Ma authored
This reduces the amount of duplication. Now there is only one list of platforms supporting cgo. Update #12270. Change-Id: I5dcd55cb6be7c5bb6ce560383c71d90ab1189dc9 Reviewed-on: https://go-review.googlesource.com/14278 Run-TryBot: Minux Ma <minux@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Matthew Dempsky authored
After golang.org/cl/19652 removed the bizarre lexlineno{++,--} statements for parsing canned imports, this hack for #13267 is no longer necessary: $ echo -n 0 > /tmp/0.go $ go tool compile /tmp/0.go /tmp/0.go:1: syntax error: package statement must be first Apparently setting lexlineno to 2 while parsing the canned imports caused prevlineno and lineno to also be set to 2. After we finished parsing imports and restored lexlineno to 1, since "package" is the first token in a source file, we'll have fixed lineno = 1, but prevlineno was still set to 2. Change-Id: Ibcc49fe3402264819b9abb53505631f7a0ad4a36 Reviewed-on: https://go-review.googlesource.com/19859Reviewed-by: Robert Griesemer <gri@golang.org>
-
Keith Randall authored
When -N, make sure we don't drop every instruction from a block, even ones which would otherwise be empty. Helps keep line numbers around for debugging, particularly for break and continue statements (which often compile down to nothing). Fixes #14379 Change-Id: I33722c4f0dcd502f146fa48af262ba3a477c959a Reviewed-on: https://go-review.googlesource.com/19854 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Minux Ma <minux@golang.org>
-
- 23 Feb, 2016 17 commits
-
-
Prashant Varanasi authored
The existing implementation converts the deadline time to an int64, but does not handle overflow. If the calculated deadline is negative but the user specified deadline is in the future, then we can assume the calculation overflowed, and set the deadline to math.MaxInt64. Fixes #14431 Change-Id: I54dbb4f02bc7ffb9cae8cf62e4e967e9c6541ec6 Reviewed-on: https://go-review.googlesource.com/19758Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
-
Robert Griesemer authored
Fixes #13940. Change-Id: I00fe377c949e5be4cbc035f6ca18e547e326bfba Reviewed-on: https://go-review.googlesource.com/19856Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Robert Griesemer authored
More clearly distinguish between tab-terminated cells which are part of an (aligned) column, and non-tab terminated cells which are not part of a column. Added additional examples. For #14412. Change-Id: If72607385752e221eaa2518238b11f48fbcb8a90 Reviewed-on: https://go-review.googlesource.com/19855Reviewed-by: Alan Donovan <adonovan@google.com>
-
Alberto Donizetti authored
name old time/op new time/op delta DecodeValidASCII-4 94.7ns ± 1% 87.4ns ± 1% -7.71% (p=0.000 n=10+9) DecodeValidJapaneseChars-4 91.0ns ± 2% 84.8ns ± 0% -6.77% (p=0.000 n=9+10) DecodeRune-4 16.5ns ± 0% 16.6ns ± 2% ~ (p=0.108 n=9+10) For #6957 Change-Id: I618c15c2a42ef7ec6a5cd163b7c3f1a65ca4ad01 Reviewed-on: https://go-review.googlesource.com/19826Reviewed-by: Rob Pike <r@golang.org>
-
Matthew Dempsky authored
This reverts commit f28bbb77. Change-Id: I82fb81dcff3ddcaefef72949f1ef3a41bcd22301 Reviewed-on: https://go-review.googlesource.com/19849 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Paul Marks authored
The previous Happy Eyeballs implementation would intentionally leak connections, because dialTCP could not be reliably terminated upon losing the race. Now that dialTCP supports cancelation (plan9 excluded), dialParallel can wait for responses from both the primary and fallback racers, strictly before returning control to the caller. In dial_test.go, we no longer need Sleep to avoid leaks. Also, fix a typo in the Benchmark IPv4 address. Updates #11225 Fixes #14279 Change-Id: Ibf3fe5c7ac2f7a438c1ab2cdb57032beb8bc27b5 Reviewed-on: https://go-review.googlesource.com/19390Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Robert Griesemer authored
The () parentheses grouped wrongly. Removed them completely in favor of separate 2- and 3-index slice alternatives which is clearer. Fixes #14477. Change-Id: I0b7521ac912130d9ea8740b8793b3b88e2609418 Reviewed-on: https://go-review.googlesource.com/19853Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
David Crawshaw authored
Makes godoc 10KB smaller. For #6853. Change-Id: Id54bd8c82cb2a1ba11d2d724e3107f73024b19d9 Reviewed-on: https://go-review.googlesource.com/19696 Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Alberto Donizetti authored
Found running go vet on the package. It barks that regexp/backtrack.go:257: unreachable code regexp/backtrack.go:302: unreachable code For #11041 Change-Id: I0f5ba0d6183108fba3d144991b826273db0ffb09 Reviewed-on: https://go-review.googlesource.com/19824Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Harshavardhana authored
Current code does not print any response headers from httputil.DumpResponse(). PUT /miniocloud/new-file HTTP/1.1 Host: s3.amazonaws.com User-Agent: Go-http-client/1.1 Content-Length: 11 Accept-Encoding: gzip HTTP/1.1 200 OK With this fix we get an appropriate output for httputil.DumpResponse(). PUT /miniocloud/new-file HTTP/1.1 Host: s3.amazonaws.com User-Agent: Go-http-client/1.1 Content-Length: 11 Accept-Encoding: gzip HTTP/1.1 200 OK Content-Length: 0 Date: Thu, 14 Jan 2016 03:04:42 GMT Etag: "3e25960a79dbc69b674cd4ec67a72c62" Server: AmazonS3 X-Amz-Id-2: qnXyH6sknlovV0Myy3emFAXTNtI/sQIcu1ZXNq/6wd17K32tQ7WNGB1qb3nzCpW2DhfeZ/MbWfw= X-Amz-Request-Id: 8422EACB0CC492BD Fixes #13942 Change-Id: Ida063cc3524a96170d8a837893f7c9f49b6cf98e Reviewed-on: https://go-review.googlesource.com/18624Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Shawn Smith authored
Change-Id: I6035941df8b0de6aeaf6c05df7257bcf6e9191fe Reviewed-on: https://go-review.googlesource.com/19320Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Alberto Donizetti authored
For #6957 Change-Id: Ic497c12f33efc933e9fe81f6cd1b2a0a01abbabf Reviewed-on: https://go-review.googlesource.com/19820 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Matthew Dempsky authored
util.go was originally added in golang.org/cl/4851, and later moved to its current location in golang.org/cl/10287. Change-Id: I10b4941d42ae1ff2e78990c497c1347bbbae4e3d Reviewed-on: https://go-review.googlesource.com/19851Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Matthew Dempsky authored
Change-Id: Ib413b0cb16405965455d7764a8c4a22bf431389b Reviewed-on: https://go-review.googlesource.com/19850 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Robert Griesemer authored
Pass lexer around so state is accessible and dependency is explicit. In the process remove EOF -> '\n' conversion that has to be corrected for when reporting errors. Change-Id: If95564b70e7484dedc1f5348e585cd19acbc1243 Reviewed-on: https://go-review.googlesource.com/19819 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Robert Griesemer authored
Fixes #14475. Change-Id: I1b5b0a9793a417572ec55f313185d03ad5ae9d01 Reviewed-on: https://go-review.googlesource.com/19846Reviewed-by: Robert Griesemer <gri@golang.org>
-
Keith Randall authored
They do the same thing, except memequal also has the short-circuit check if the two pointers are equal. A) We might as well always do the short-circuit check, it is only 2 instructions. B) The extra function call (memequal->memeq) is expensive. benchmark old ns/op new ns/op delta BenchmarkArrayEqual-8 8.56 5.31 -37.97% No noticeable affect on the former memeq user (maps). Fixes #14302 Change-Id: I85d1ada59ed11e64dd6c54667f79d32cc5f81948 Reviewed-on: https://go-review.googlesource.com/19843 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 22 Feb, 2016 11 commits
-
-
Brady Sullivan authored
A comment existed referencing RC4 coming before AES because of it's vulnerability to the Lucky 13 attack. This clarifies that the Lucky 13 attack only effects AES-CBC, and not AES-GCM. Fixes #14474 Change-Id: Idcb07b5e0cdb0f9257cf75abea60129ba495b5f5 Reviewed-on: https://go-review.googlesource.com/19845Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Rob Pike authored
The structure of the code meant that an embedded field was never checked for export status. We need to check the name of the type, which is either of type T or type *T, and T might be unexported. Fixes #14356. Change-Id: I56f468e9b8ae67e9ed7509ed0b91d860507baed2 Reviewed-on: https://go-review.googlesource.com/19701Reviewed-by: Robert Griesemer <gri@golang.org>
-
Matthew Dempsky authored
It's not needed on other OSes. Change-Id: Ia6b13510585392a7062374806527d33876beba2a Reviewed-on: https://go-review.googlesource.com/19818 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: David Crawshaw <crawshaw@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Matthew Dempsky authored
Change-Id: I7414d2fab18ae6e7e7c50f8697ec64d38290f409 Reviewed-on: https://go-review.googlesource.com/19817 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Josh Bleecher Snyder authored
Cuts 20k off cmd/go and 32k off golang.org/x/tools/cmd/godoc, approx 0.15% each. For #6853 and #9930 Change-Id: Ic510b76b80a9153b1ede7b3533d2dbc16caa5c63 Reviewed-on: https://go-review.googlesource.com/19768 TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Caio Marcelo de Oliveira Filho authored
When visiting the AST to add counters, there are special cases in which the code calls cuts the walking short by returning nil. In some cases certain nodes are ignored, e.g. Init and Cond inside IfStmt. The fix is to explicitly walk all the children nodes (not only Body and Else) when cutting the current walk. Similar approach was taken with SwitchStmt and TypeSwitchStmt. While the existing test code doesn't handle different counters in the same line, the generated HTML report does it correctly (because it takes column into account). The previous behavior caused lines in function literals to not be tracked when those literals were inside Init or Cond of an IfStmt for example. Fixes #14039. Change-Id: Iad591363330843ad833bd79a0388d709c8d0c8aa Reviewed-on: https://go-review.googlesource.com/19775Reviewed-by: Rob Pike <r@golang.org>
-
Robert Griesemer authored
These files were not added to the repo. They contain conversion routines and corresponding tests not used by the compiler and thus are technically not needed. However, future changes to math/big (and corresponding updates of this vendored version) may require these files to exist. Add them to avoid unnecessary confusion. Change-Id: Ie390fb54f499463b2bba2fdc084967539afbeeb3 Reviewed-on: https://go-review.googlesource.com/19730Reviewed-by: Alan Donovan <adonovan@google.com>
-
Josh Bleecher Snyder authored
Benchmarked using compilebench on a quiet but rather old OS X laptop. Benchmarks from others would be welcome, since the numbers look too good to be true. name old time/op new time/op delta Template 331ms ± 9% 303ms ± 4% -8.25% (p=0.000 n=24+24) GoTypes 946ms ± 4% 888ms ± 3% -6.17% (p=0.000 n=24+25) Compiler 3.20s ± 1% 3.10s ± 2% -3.07% (p=0.000 n=24+25) name old alloc/op new alloc/op delta Template 72.5MB ± 0% 61.8MB ± 0% -14.76% (p=0.000 n=25+24) GoTypes 224MB ± 0% 189MB ± 0% -15.65% (p=0.000 n=25+25) Compiler 695MB ± 0% 561MB ± 0% -19.26% (p=0.000 n=25+25) name old allocs/op new allocs/op delta Template 498k ± 0% 497k ± 0% -0.21% (p=0.000 n=25+23) GoTypes 1.47M ± 0% 1.47M ± 0% -0.25% (p=0.000 n=25+25) Compiler 4.09M ± 0% 4.08M ± 0% -0.18% (p=0.000 n=25+23) Change-Id: I2394bc748128d721863453257fa5756c410f7898 Reviewed-on: https://go-review.googlesource.com/19771Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Matthew Dempsky authored
Also eliminates per-maptype hiter and hmap types, since they're not really needed anyway. Update packages reflect and runtime accordingly. Reduces golang.org/x/tools/cmd/godoc's text segment by ~170kB: text data bss dec hex filename 13085702 140640 151520 13377862 cc2146 godoc.before 12915382 140640 151520 13207542 c987f6 godoc.after Updates #6853. Change-Id: I948b2bc1f22d477c1756204996b4e3e1fb568d81 Reviewed-on: https://go-review.googlesource.com/16610Reviewed-by: Keith Randall <khr@golang.org>
-
Keith Randall authored
These functions are really simple, the overhead of calling them (in both time and code size) is larger than the inlined versions. Reorganize how the nil case in a type switch is handled, as we have to check for nil explicitly now anyway. Saves about 0.8% in the binary size of the go tool. Change-Id: I8501b62d72fde43650b79f52b5f699f1fbd0e7e7 Reviewed-on: https://go-review.googlesource.com/19814 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
-
Matthew Dempsky authored
Previously, given two Nodes n1 and n2 of different non-PAUTO classes (e.g., PPARAM and PPARAMOUT), cmpstackvarlt(n1, n2) and cmpstackvarlt(n2, n1) both returned true, which is nonsense. This doesn't seem to cause any visible miscompilation problems, but notably fixing it does cause toolstash/buildall to fail. Change-Id: I33b2c66e902c5eced875d8fbf18b7cfdc81e8aed Reviewed-on: https://go-review.googlesource.com/19778 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 21 Feb, 2016 6 commits
-
-
Austin Clements authored
Change-Id: Ibbfae20cab48163f22d661604ef730705f2b97ba Reviewed-on: https://go-review.googlesource.com/19661 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Matthew Dempsky authored
Order's "temp" and "free" fields use NodeLists in a rather non-idiomatic way. Instead of using the "list" or "concat" functions, it manipulates them directly and without the normal invariants (e.g., it doesn't maintain the "End" field). Rather than convert it to more typical usage, just replace with a slice, which ends up much simpler anyway. Passes toolstash/buildall. Change-Id: Ibd0f24324bd674c0d5bb1bc40d073b01e7824ad5 Reviewed-on: https://go-review.googlesource.com/19776 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Shenghou Ma authored
Change-Id: I6cb8ac7b59812e82111ab3b0f8303ab8194a5129 Reviewed-on: https://go-review.googlesource.com/19791Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Shenghou Ma authored
Change-Id: I4a75d98a48675e2beb5b4843fb2c6ff5d4c8d2a2 Reviewed-on: https://go-review.googlesource.com/14769Reviewed-by: Robert Griesemer <gri@golang.org>
-
Matthew Dempsky authored
When writing a fake dnsConfig to conf.dnsConfig, set lastChecked to an hour into the future. This causes dnsclient_unix.go's tryUpdate("/etc/resolv.conf") calls to short-circuit and ignore that /etc/resolv.conf's mtime differs from the test's fake resolv.conf file. We only need to zero out lastChecked in teardown. While here, this makes two other tryUpdate(conf.path) test calls pointless, since they'll now short circuit too. Fixes #14437. Change-Id: Ieb520388e319b9826dfa49f134907f4927608a53 Reviewed-on: https://go-review.googlesource.com/19777 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
-
Matthew Dempsky authored
There's no need for 8 different ways to represent that a type is non-comparable. While here, move AMEM out of the runtime-known algorithm values since it's not needed at run-time, and get rid of the unused AUNK constant. Change-Id: Ie23972b692c6f27fc5f1a908561b3e26ef5a50e9 Reviewed-on: https://go-review.googlesource.com/19779 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
-