- 19 Feb, 2016 20 commits
-
-
Martin Möhrmann authored
Remove floating point comparisons and rely only on the information directly provided by appendFloat. Make restoring the zero padding flag explicit instead of using a defer. Rearrange some case distinctions to remove duplicated code. Add more test cases for zero padded floating point numbers with sign. benchmark old ns/op new ns/op delta BenchmarkSprintfFloat-4 187 180 -3.74% Change-Id: Ifa2ae85257909f40b1b18118c92b516933271729 Reviewed-on: https://go-review.googlesource.com/19721Reviewed-by: Rob Pike <r@golang.org>
-
Matthew Dempsky authored
Combine parser's import_stmt and import_here methods as a single new importdcl method, and cleanup conditional logic slightly to make the code easier to follow. Also, eliminate importfile's unused line parameter, and get rid of all of its duplicate type assertions. Change-Id: Ic37ae8490afedc533f98ead9feef383e3599bc01 Reviewed-on: https://go-review.googlesource.com/19629Reviewed-by: Robert Griesemer <gri@golang.org> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Matthew Dempsky authored
Packages compiled with -A may reference the builtin "any" type, so it needs to be included in the list of predeclared types for binary import/export. Also, when -A is used, mark all symbols as SymExport instead of SymPackage in importsym. This parallels the logic in autoexport and is necessary to prevent a "export/package mismatch" errors in exportsym during dumpexport's verifyExport pass. Change-Id: Iff5ec5fbfe2219525ec9d1a975307fa8936af9b9 Reviewed-on: https://go-review.googlesource.com/19627Reviewed-by: Robert Griesemer <gri@golang.org> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Matthew Dempsky authored
Previously, the builtin runtime export data was reparsed before every Go source file, and the unsafe export data was reparsed for every import of package unsafe. Now, we parse both of them just once ahead of time. This does mean package unsafe's export data will be loaded even when compiling packages that don't import it, but it's tiny anyway. Change-Id: Ic6931bc58f6d62f664348bfa932f92d4ccacc3ef Reviewed-on: https://go-review.googlesource.com/19626 TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
-
David Chase authored
Walking the field name as if it were an expression caused a called to haspointers with a TFIELD, which panics. Trigger was a field at a large offset within a large struct, combined with a struct literal expression mentioning that field. Fixes #14405 Change-Id: I4589badae27cf3d7cf365f3a66c13447512f41f9 Reviewed-on: https://go-review.googlesource.com/19699Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Damien Neil authored
NetBSD's C compiler appears to support -fdebug-prefix-map but not -gno-record-gcc-switches. Remove assumption that support for the former implies the latter. Change-Id: Iecad9e4f497ea4edc1ce440010e6fe19dc3e0566 Reviewed-on: https://go-review.googlesource.com/19686Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Matthew Dempsky authored
The export data format was augmented with a new "unsafe-uintptr" tag in https://golang.org/cl/18584, but builtin.go was not regenerated. While here, add a test to make sure builtin.go stays up to date in the future. Change-Id: I4ae17da29f0855bef6ec0fcc10e7082c8427d39c Reviewed-on: https://go-review.googlesource.com/19681 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
-
Tal Shprecher authored
Fixes #13805 Change-Id: Ica9aae2e054b74f67d28ab27f72c52a3f03eeb59 Reviewed-on: https://go-review.googlesource.com/19489 Run-TryBot: Michael Matloob <matloob@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
-
Ian Lance Taylor authored
Fixes #14387. Change-Id: Icc98be80f549c5e1f55c5e693bfea97b456a6c41 Reviewed-on: https://go-review.googlesource.com/19621 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Mohit Agarwal authored
Change-Id: I14947b64bdafd975bf3915eceb07f98897304a85 Reviewed-on: https://go-review.googlesource.com/19708Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Russ Cox authored
The go/build parser accepts "//+build", with no spaces. Make the cmd/dist bootstrap parser do the same. While in theory we should always use the space form, I copied some code that did not into the standard tree, and I was very confused that 'go test' had had no problem but then make.bash died. (As a reminder, cmd/dist does not use go/build because cmd/dist must build against earlier versions of Go.) Change-Id: I90a18014bd878247b8811487e5c1a7589260cbfc Reviewed-on: https://go-review.googlesource.com/19618Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
Change-Id: I38e59088c37426d914ce2b4dfc79f3d476e06f49 Reviewed-on: https://go-review.googlesource.com/19617Reviewed-by: David Crawshaw <crawshaw@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
We have private reports of compilers that mishandle that. Write to a temporary file instead. Change-Id: I92e3cf4274b1a8048741e07fb52b8900c93b915e Reviewed-on: https://go-review.googlesource.com/19616Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
The Go 1.6 release notes say that Go 1.7 will remove support for the GO15VENDOREXPERIMENT environment variable, making vendoring always on. Do that. Change-Id: Iba8b79532455828869c1a8076a82edce84259468 Reviewed-on: https://go-review.googlesource.com/19615Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
The Go 1.6 release notes say we'll remove the “-X name value” form (in favor of the “-X name=value” form) in Go 1.7. Do that. Also establish the doc/go1.7.txt file. Change-Id: Ie4565a6bc5dbcf155181754d8d92bfbb23c75338 Reviewed-on: https://go-review.googlesource.com/19614Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
These have no accepted input syntax and, as far as I can tell, do not actually exist. Change-Id: Iafdfb71adccad76230191d922eb7ddf78b7d5898 Reviewed-on: https://go-review.googlesource.com/19612Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
3DNotAnymore! These only ever existed on AMD (not Intel) processors, and AMD cancelled support for them in August 2010. Change-Id: Ia362259add9d4f5788fd151fb373f91288677407 Reviewed-on: https://go-review.googlesource.com/19611Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Nathan VanBenschoten authored
Change-Id: Ia613f1c37bfce800ece0533a5326fca91d99a66a Reviewed-on: https://go-review.googlesource.com/18120Reviewed-by: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org>
-
Ian Gudger authored
Fixes #14372 Change-Id: I40d594582639e87ef2574d37ac868e37ffaa17dc Reviewed-on: https://go-review.googlesource.com/19623Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Benoit Sigoure authored
gofmt prints an error to stderr when a file is deleted during its `filepath.Walk()', which can happen in builds that change the tree concurrently with gofmt running. Change-Id: Ia1aa4804f6bc2172baf061c093e16fe56a3ee50c Reviewed-on: https://go-review.googlesource.com/19301Reviewed-by: Robert Griesemer <gri@golang.org>
-
- 18 Feb, 2016 10 commits
-
-
Brad Fitzpatrick authored
I had accidentally disabled a headline feature at the last second. :( Fixes #14391 Change-Id: I1992c9b801072b7538b95c55242be174075ff932 Reviewed-on: https://go-review.googlesource.com/19672Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Rhys Hiltner authored
This call to os.Getwd (or getwd) has been part of the linker since the C implementation in 7d507dc6. It stopped being used in 26438d4d, and survived the conversion to Go in 1f9dbb60. Its return value goes unused (the linker gets the value for AT_comp_dir in dwarf.go), remove it. Change-Id: I3d4594813bb4ee0a6af31a36e19d99ec4b863677 Reviewed-on: https://go-review.googlesource.com/19655Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Matthew Dempsky authored
Changes largely in preparation for eventually switching the builtin export data to use the new binary format. Replace fancy incremental line-by-line scanning with simply reading the entire object file into memory, finding the export data section, and processing it that way. Just use "package runtime" and "package unsafe" in the builtin Go source files so we don't need to rewrite references to "PACKAGE". Stop looking for init_PACKAGE_function; it doesn't exist anyway. Compile package runtime with -u so that its export data marks it as a "safe" package. Eliminate requirement to pass "runtime" and "unsafe" as command-line arguments so that just "go run mkbuiltin.go" works. Only rewrite builtin.go when successful. Change-Id: I4addfde9e0cfb30607c7a83de686bde0ad1f035a Reviewed-on: https://go-review.googlesource.com/19624Reviewed-by: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Matthew Dempsky authored
It was only really necessary for ensuring that package runtime should be treated as safe even without a "safe" marker, but mkbuiltin.go now compiles it with -u. Change-Id: Ifbcc62436ce40ab732ece667141afd82c1d3b64b Reviewed-on: https://go-review.googlesource.com/19625Reviewed-by: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Damien Neil authored
Add the following flags when supported by the compiler: -gno-record-gcc-switches -fdebug-prefix-map=$WORK=/tmp/go-build Add an empty NAME symbol to the ELF .symtab. GNU ld will add a NAME symbol when one is not present; including one of our own prevents it from adding a reference to the link tempdir. Fixes #13247 for compilers that support -fdebug-prefix-map. (gcc, clang in the near future.) Change-Id: I221c71fc59cd23ee8c99bcc038793ff4623c9ffc Reviewed-on: https://go-review.googlesource.com/19363Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Damien Neil <dneil@google.com>
-
Matthew Dempsky authored
Fixes #13930. Change-Id: I124b7d31d1f2be05b7f23dafd1e52d9f3f02f3f0 Reviewed-on: https://go-review.googlesource.com/18623 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Robert Griesemer authored
Fixes #14166. Change-Id: I325b283a1d53e73a6d862611c446820ab94a161c Reviewed-on: https://go-review.googlesource.com/19622Reviewed-by: Damien Neil <dneil@google.com>
-
Matt Bostock authored
Fix `reverences`, which I believe should read as `references`. Change-Id: I450efcbeee0f8861a84b209f2e6636764034232a Reviewed-on: https://go-review.googlesource.com/19469Reviewed-by: Russ Cox <rsc@golang.org>
-
Alberto Donizetti authored
Change-Id: I3071f0e876506c6dc283e97bc15f157bf2ff011e Reviewed-on: https://go-review.googlesource.com/19641Reviewed-by: Robert Griesemer <gri@golang.org>
-
Robert Griesemer authored
Fixes #14357. Change-Id: I91acff0b0cc7be2bcbad68925a19a437dbd4c83d Reviewed-on: https://go-review.googlesource.com/19620Reviewed-by: Alan Donovan <adonovan@google.com>
-
- 17 Feb, 2016 5 commits
-
-
Rahul Chaudhry authored
Change-Id: If15fdcd3cd49394a0c1dffd39fbbeede11081ccb Reviewed-on: https://go-review.googlesource.com/19528Reviewed-by: Chris Broadfoot <cbro@golang.org>
-
Chris Broadfoot authored
Change-Id: I4910105d48ed650289ecb1490d556929db05bc38 Reviewed-on: https://go-review.googlesource.com/19526Reviewed-by: Andrew Gerrand <adg@golang.org> Reviewed-on: https://go-review.googlesource.com/19527
-
Russ Cox authored
Go 1.6 is soon (but not yet). Fixes #14301. Change-Id: I85e329b643adcb5d4fa680c5333fbc1f928d4d9d Reviewed-on: https://go-review.googlesource.com/19550Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Chris Broadfoot <cbro@golang.org>
-
Russ Cox authored
This is the bundle command's new usage and new output header, after CL 19428. Actually running this command would work but would bring in a newer x/net/http2 that we don't want yet. Change-Id: Ic6082ca00102a2df1f7632eebf9aca41fdcdb444 Reviewed-on: https://go-review.googlesource.com/19551Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Chris Broadfoot <cbro@golang.org>
-
Russ Cox authored
Fixes #13651. Change-Id: I1d21b49e2b5bc6c507eb084d6d2553e5a9c607cf Reviewed-on: https://go-review.googlesource.com/19552Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Chris Broadfoot <cbro@golang.org>
-
- 16 Feb, 2016 5 commits
-
-
Ian Lance Taylor authored
Fixes #14337. Change-Id: I58aef7e08d936b0712da577dd1ce5c9ed5d8bfd2 Reviewed-on: https://go-review.googlesource.com/19513Reviewed-by: Russ Cox <rsc@golang.org>
-
Austin Clements authored
TestCrashDumpsAllThreads carefully sets the number of Ps to one greater than the number of non-preemptible loops it starts so that the main goroutine can continue to run (necessary because of #10958). However, if GC starts, it can take over that one spare P and lock up the system while waiting for the non-preemptible loops, causing the test to eventually time out. This deadlock is easily reproducible if you run the runtime test with GOGC=1. Fix this by forcing GOGC=off when running this test. Change-Id: Ifb22da5ce33f9a61700a326ea92fcf4b049721d1 Reviewed-on: https://go-review.googlesource.com/19516 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
-
Russ Cox authored
This bug was introduced in golang.org/cl/18217, while trying to fix #13777. Originally I wanted to just disable inlining for the case being handled incorrectly, but it's fairly difficult to detect and much easier just to fix. Since the case being handled incorrectly was inlined correctly in Go 1.5, not inlining it would also be somewhat of a regression. So just fix it. Test case copied from Ian's CL 19520. The mistake to worry about in this CL would be relaxing the condition too much (we now print the note more often than we did yesterday). To confirm that we'd catch this mistake, I checked that changing (!fmtbody || !t.Funarg) to (true) does cause fixedbugs/issue13777.go to fail. And putting it back to what is written in this CL makes that test pass again as well as the new fixedbugs/issue14331.go. So I believe that the new condition is correct for both constraints. Fixes #14331. Change-Id: I91f75a4d5d07c53af5caea1855c780d9874b8df6 Reviewed-on: https://go-review.googlesource.com/19514 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Alex Brainman authored
TestInterfaceAddrsWithNetsh invokes Windows netsh command passing it a particular interface name. This approach somehow does not work on some computers (see issue for details). Change that to call netsh without specifying any interface name. This provides output for all interfaces available. So we can achieve same goal parsing this output. Also makes test faster because we only need to invoke netsh once. Fixes #14130. Change-Id: I7911692ca64e372af1e1f9d6acb718c67071de67 Reviewed-on: https://go-review.googlesource.com/19441Reviewed-by: Volker Dobler <dr.volker.dobler@gmail.com> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
-
Austin Clements authored
We used to include panic calls in tracebacks; however, when runtime.panic was renamed to runtime.gopanic in the conversion of the runtime to Go, we missed the special case in showframe that includes panic calls even though they're in package runtime. Fix the function name check in showframe (and, while we're here, fix the other check for "runtime.panic" in runtime/pprof). Since the "runtime.gopanic" name doesn't match what users call panic and hence isn't very user-friendly, make traceback rewrite it to just "panic". Updates #5832, #13857. Fixes #14315. Change-Id: I8059621b41ec043e63d5cfb4cbee479f47f64973 Reviewed-on: https://go-review.googlesource.com/19492 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
-