- 31 Aug, 2018 10 commits
-
-
Venil Noronha authored
Change-Id: Ia3dcb3a82e452fdcf0d087e8cd01ac01ca831c84 Reviewed-on: https://go-review.googlesource.com/132597Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com> Reviewed-by: Kevin Burke <kev@inburke.com> Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
-
Than McIntosh authored
In the CPU profile tests for gccgo, check to make sure that the runtime's sigprof handler itself doesn't appear in the profile. Add a "skip if gccgo" guard to one testpoint. Updates #26595 Change-Id: I92a44161d61f17b9305ce09532134edd229745a7 Reviewed-on: https://go-review.googlesource.com/126316 Run-TryBot: Than McIntosh <thanm@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Carlos Eduardo Seo authored
This change adds support for VDSO on ppc64x, making it possible to avoid a syscall in walltime and nanotime. BenchmarkClockVDSOAndFallbackPaths/vDSO-192 20000000 66.0 ns/op BenchmarkClockVDSOAndFallbackPaths/Fallback-192 1000000 1456 ns/op Change-Id: I3373bd804b6f122961de3ae9d034e6ccf35748e6 Reviewed-on: https://go-review.googlesource.com/131135 Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
-
Alex Brainman authored
Some versions of Windows (Windows 10 1803) do not set file position after TransmitFile completes. So just use Seek to set file position before returning from sendfile. Fixes #25722 Change-Id: I7a49be10304b5db19dda707b13ac93d338aeb190 Reviewed-on: https://go-review.googlesource.com/131976Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Yasuhiro MATSUMOTO <mattn.jp@gmail.com> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Giovanni Bajo authored
Fence-post implications of the form "x-1 >= w && x > min ⇒ x > w" were not correctly handling unsigned domain, by always checking signed limits. This bug was uncovered once we taught prove that len(x) is always >= 0 in the signed domain. In the code being miscompiled (s[len(s)-1]), prove checks whether len(s)-1 >= len(s) in the unsigned domain; if it proves that this is always false, it can remove the bound check. Notice that len(s)-1 >= len(s) can be true for len(s) = 0 because of the wrap-around, so this is something prove should not be able to deduce. But because of the bug, the gate condition for the fence-post implication was len(s) > MinInt64 instead of len(s) > 0; that condition would be good in the signed domain but not in the unsigned domain. And since in CL105635 we taught prove that len(s) >= 0, the condition incorrectly triggered (len(s) >= 0 > MinInt64) and things were going downfall. Fixes #27251 Fixes #27289 Change-Id: I3dbcb1955ac5a66a0dcbee500f41e8d219409be5 Reviewed-on: https://go-review.googlesource.com/132495Reviewed-by: Keith Randall <khr@golang.org>
-
Dina Garmash authored
Short variable declarations example passes an fd argument to os.Pipe call. However, os.Pipe() takes no arguments and returns 2 Files and an error: https://golang.org/src/os/pipe_linux.go?s=319:360#L1 Fixes: #27384 Change-Id: I0a709f51e0878c57185d901b899d209f001dfcce Reviewed-on: https://go-review.googlesource.com/132284Reviewed-by: Robert Griesemer <gri@golang.org>
-
Drew Flower authored
Change-Id: I0fcb5e626bf3d6891592c21b912c824743d7eaa0 Reviewed-on: https://go-review.googlesource.com/132280Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Rhys Hiltner authored
The benchstat tool computes statistics about benchmarks, including whether any differences are statistically significant. Recommend its use in commit messages of performance-related changes rather than the simpler benchcmp tool. Change-Id: I4b35c2d892b48e60c3064489b035774792c19c30 Reviewed-on: https://go-review.googlesource.com/132515Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Venil Noronha authored
Change-Id: I0dd843ac06f1b9987aa2fc90ae62074e668d6d4d Reviewed-on: https://go-review.googlesource.com/132438Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Rodolfo Rodriguez authored
Change-Id: Ifd509c0c6a6ea41094b6ae1f4931414325b152fd Reviewed-on: https://go-review.googlesource.com/132475 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 30 Aug, 2018 29 commits
-
-
Robert Griesemer authored
Internal helper functions for type-checking type expressions were renamed to make it clearer when they should be used: typExpr (w/o def) -> typ typExpr (w/ def) -> definedType typ -> indirectType typExprInternal -> typInternal The rename emphasizes that in most cases Checker.typ should be used to compute the types.Type from an ast.Type. If the type is defined, definedType should be used. For composite type elements which are not "inlined" in memory, indirectType should be used. In the process, implicitly changed several uses of indirectType (old: typ) to typ (old: typExpr) by not changing the respective function call source. These implicit changes are ok in those places because either call is fine where we are not concerned about composite type elements. But using typ (old: typExpr) is more efficient than using indirectType (old: typ). Change-Id: I4ad14d5357c5f94b6f1c33173de575c4cd05c703 Reviewed-on: https://go-review.googlesource.com/130595Reviewed-by: Alan Donovan <adonovan@google.com>
-
Robert Griesemer authored
Now that most of the type-checker is using the object-coloring mechanism to detect cycles, remove the explicit path parameter from the functions that don't rely on it anymore. Some of the syntactic-based resolver code (for aliases, interfaces) still use an explicit path; leaving those unchanged for now. The function cycle was moved from typexpr.go (where it is not used anymore) to resolver.go (where it's still used). It has not changed. Fixes #25773. Change-Id: I2100adc8d66d5da9de9277dee94a1f08e5a88487 Reviewed-on: https://go-review.googlesource.com/130476Reviewed-by: Alan Donovan <adonovan@google.com>
-
Robert Griesemer authored
For Go 1.11, cycle tracking of global (package-level) objects was changed to use a Checker-level object path rather than relying on the explicit path parameter that is passed around to some (but not all) type-checker functions. This change now uses the same mechanism for the detection of local type cycles (local non-type objects cannot create cycles by definition of the spec). As a result, local alias cycles are now correctly detected as well (issue #27106). The path parameter that is explicitly passed around to some type-checker methods is still present and will be removed in a follow-up CL. Also: - removed useCycleMarking flag and respective dead code - added a couple more tests - improved documentation Fixes #27106. Updates #25773. Change-Id: I7cbf304bceb43a8d52e6483dcd0fa9ef7e1ea71c Reviewed-on: https://go-review.googlesource.com/130455 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Alan Donovan <adonovan@google.com>
-
Andrew Bonventre authored
Previously, pattern matching was good enough to achieve good performance for the RotateLeft* functions, but the inlining cost for them was much too high. Make RotateLeft* intrinsic on amd64 as a stop-gap for now to reduce inlining costs. This should be done (or at least looked at) for other architectures as well. Updates golang/go#17566 Change-Id: I6a106ff00b6c4e3f490650af3e083ed2be00c819 Reviewed-on: https://go-review.googlesource.com/132435 Run-TryBot: Andrew Bonventre <andybons@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
-
Leigh McCulloch authored
The sentence in the docs for SystemCertPool that states that mutations to a returned pool do not affect any other pool is ambiguous as to who the any other pools are, because pools can be created in multiple ways that have nothing to do with the system certificate pool. Also the use of the word 'the' instead of 'a' early in the sentence implies there is only one shared pool ever returned. Fixes #27385 Change-Id: I43adbfca26fdd66c4adbf06eb85361139a1dea93 GitHub-Last-Rev: 2f1ba09fa403d31d2d543dca15727c6c2f896ec7 GitHub-Pull-Request: golang/go#27388 Reviewed-on: https://go-review.googlesource.com/132378Reviewed-by: Filippo Valsorda <filippo@golang.org>
-
Kevin Burke authored
"someting" is misspelled and the error handling both clobbers the error that occurs and distracts from the point of the example, which is to demonstrate how Printf works. It's better to just panic with the error. Change-Id: I5fb0a4a1a8b4772cbe0302582fa878d95e3a4060 Reviewed-on: https://go-review.googlesource.com/132376Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Agniva De Sarker authored
Instead of calling run synchronously, we pass it through bgrun and immediately wait for it to finish. This pushes all jobs to execute through the bgwork channel and therefore causes them to exit cleanly in case of a compiler error. Fixes #25981 Change-Id: I789a85d23fabf32d144ab85a3c9f53546cb7765a Reviewed-on: https://go-review.googlesource.com/127776 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Rebecca Stambler authored
The type-checker currently crashes when checking code such as: _ = map[string][...]int{"": {1, 2, 3}} In this case, the type checker reports an error for map[string][...]int, then proceeds to type-check the values of the map literal using a hint type of [...]int. When type-checking the inner composite (array) literal, the length of the open array type is computed from the elements, then the array type is recorded, but the literal has no explicit type syntax against which to record the type, so this code causes the type-checker to panic. Add a nil check before calling check.recordTypeAndValue to avoid that. Updates #22467 Change-Id: Ic4453ba485b7b88ede2a89f209365eda9e032abc Reviewed-on: https://go-review.googlesource.com/132355Reviewed-by: Alan Donovan <adonovan@google.com>
-
Andrei Tudor Călin authored
Refactor TestSplice/readerAtEOF to handle cases where we disable splice on older kernels better. If splice is disabled, net.splice and poll.Splice do not get to observe EOF on the reader, because poll.Splice returns immediately with EINVAL. The test fails unexpectedly, because the splice operation is reported as not handled. This change refactors the test to handle the aforementioned case correctly, by not calling net.splice directly, but using a higher level check. Fixes #27355. Change-Id: I0d5606b4775213f2dbbb84ef82ddfc3bab662a31 Reviewed-on: https://go-review.googlesource.com/132096 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Dylan Waits authored
Change-Id: Idc4aa53e443b89eeba496d00f6b409268e29ec21 Reviewed-on: https://go-review.googlesource.com/132241 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
ianzapolsky authored
The errors package has an example for Errorf, but the fmt package does not. Copy the Errorf example from errors to fmt. Move existing Stringer example into separate file, so as not to break the assumption that the entire file will be presented as the example. Change-Id: I8a210a69362017fa08615a8c3feccdeee8427e22 Reviewed-on: https://go-review.googlesource.com/132239Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Venil Noronha authored
Change-Id: I8e55e9397eb6844b5856f8bde9c26185c446a80e Reviewed-on: https://go-review.googlesource.com/132238Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Dmitry Neverov authored
Change-Id: I7ba55e3f6ebbaae41188316a66a40f994c037ad9 Reviewed-on: https://go-review.googlesource.com/132240 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Erin Masatsugu authored
Change-Id: Ide50aba940727a7b32cd33dea5315050f1a34717 Reviewed-on: https://go-review.googlesource.com/132237 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
David Timm authored
Change-Id: Id0e2fb2abad5b776ac0ed76e55e36c6b774b5b7a Reviewed-on: https://go-review.googlesource.com/132278 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Venil Noronha authored
Signed-off-by: Venil Noronha <veniln@vmware.com> Change-Id: Ie5f50bc31db1eee11582b70b0e25c726090d4037 Reviewed-on: https://go-review.googlesource.com/132236 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
G. Hussain Chinoy authored
Change-Id: I65c3bda498562fdf39994ec1cadce7947e2d84b5 Reviewed-on: https://go-review.googlesource.com/132277 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
-
Cherry Zhang authored
runtime.wbBufFlush must not modify its arguments, because the argument slots are also used as spill slots in runtime.gcWriteBarrier. So, GOEXPERIMENT=clobberdead must not clobber them. Updates #27326. Change-Id: Id02bb22a45201eecee748d89e7bdb3df7e4940e4 Reviewed-on: https://go-review.googlesource.com/131957Reviewed-by: Keith Randall <khr@golang.org>
-
Cherry Zhang authored
We now have safepoints at nearly all the instructions. When GOEXPERIMENT=clobberdead is on, it inserts clobbers nearly at every instruction. Currently this doesn't work. (Maybe the stack maps at non-call safepoints are still imprecise. I haven't investigated.) For now, only use call-based safepoints if the experiment is on. Updates #27326. Change-Id: I72cda9b422d9637cc5738e681502035af7a5c02d Reviewed-on: https://go-review.googlesource.com/131956Reviewed-by: Keith Randall <khr@golang.org>
-
Rebecca Stambler authored
The current implementation crashes when someone writes a panic outside of a function, which makes sense since that is broken code. This fix allows one to type-check broken code. Updates #22467 Change-Id: I81b90dbd918162a20c60a821340898eaf02e648d Reviewed-on: https://go-review.googlesource.com/132235Reviewed-by: Alan Donovan <adonovan@google.com>
-
Alex Kohler authored
Change-Id: Icded6c786b7b185d5aff055f34e0cfe9e521826a Reviewed-on: https://go-review.googlesource.com/132176 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Than McIntosh authored
The sym.Symbol 'ElfType' field is used only for symbols corresponding to things in imported shared libraries, hence is not needed in the common case. Relocate it to sym.AuxSymbol so as to shrink the main Symbol struct. Updates #26186 Change-Id: I803efc561c31a0ca1d93eca434fda1c862a7b2c5 Reviewed-on: https://go-review.googlesource.com/125479Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Than McIntosh authored
The sym.Symbol 'Plt' and 'Got' field are used only with cgo and/or external linking and are not needed for most symbols. Relocate them to sym.AuxSymbol so as to shrink the main Symbol struct. Updates #26186 Change-Id: I170d628a760be300a0c1f738f0998970e91ce3d6 Reviewed-on: https://go-review.googlesource.com/125478Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Than McIntosh authored
The sym.Symbol 'Localentry' field is used only with cgo and/or external linking on MachoPPC. Relocate it to sym.AuxSymbol since it is infrequently used, so as to shrink the main Symbol struct. Updates #26186 Change-Id: I5872aa3f059270c2a091016d235a1a732695e411 Reviewed-on: https://go-review.googlesource.com/125477Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Than McIntosh authored
Create a new "AuxSymbol" struct into which 'cold' or 'infrequently set' symbol fields are located. Move the Extname field from the main Symbol struct to AuxSymbol. Updates #26186 Change-Id: I9e795fb0cc48f978e2818475fa073ed9f2db202d Reviewed-on: https://go-review.googlesource.com/125476Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Cherry Zhang authored
The 120->124 change in https://go-review.googlesource.com/c/go/+/61511/21/test/nosplit.go#143 looks accidental. Change back to 120. Change-Id: I1690a8ae2d32756ba05544d2ed1baabfa64e1704 Reviewed-on: https://go-review.googlesource.com/131958 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Ben Shi authored
The system call geteuid can not work properly on android, which causes a test case failed on rooted android/arm. This CL disables the test case on android. Fixes #27364 Change-Id: Ibfd33ef8cc1dfe8822c8be4280eae12ee30929c1 Reviewed-on: https://go-review.googlesource.com/132175 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
-
Joe Cortopassi authored
Fixes issue #27359 Change-Id: I048fbd88a08e8b17fcda3872ee4c78935d5075d8 GitHub-Last-Rev: a0751eca094d68e9bf005abeb6616eb5b0050190 GitHub-Pull-Request: golang/go#27359 Reviewed-on: https://go-review.googlesource.com/132117Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Cherry Zhang authored
Nil check is special in that it has no use but we must keep it. Count it as a use of the auto. Fixes #27278. Change-Id: I857c3d0db2ebdca1bc342b4993c0dac5c01e067f Reviewed-on: https://go-review.googlesource.com/131955 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
- 29 Aug, 2018 1 commit
-
-
Alexey Alexandrov authored
Fixes #26638. Change-Id: I3c18d1298d99af8ea8c00916303efd2b5a5effc7 Reviewed-on: https://go-review.googlesource.com/126336Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com> Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-