- 18 Jun, 2018 1 commit
-
-
Rob Pike authored
Drive-by after previous CL. Change-Id: I87db65b65745a0d76500cce06ac276b0d7928404 Reviewed-on: https://go-review.googlesource.com/119395Reviewed-by: Ralph Corderoy <ralph@inputplus.co.uk> Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 17 Jun, 2018 3 commits
-
-
Mostyn Bramley-Moore authored
Related to #25477. Change-Id: I11261c6055b446ceca1b3acc538ab00fec4b47ca Reviewed-on: https://go-review.googlesource.com/119321Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Brad Fitzpatrick authored
Fixes #25913 Change-Id: I4701ec94fa4b07211a8beed85c02ee5aa4fe3eb3 Reviewed-on: https://go-review.googlesource.com/119377 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Richard Musiol <neelance@gmail.com>
-
Brad Fitzpatrick authored
If SpecialCase contains an explicit CaseRange with zero deltas, respect those and don't fall back to the default behavior. Fixes #25636 Change-Id: Ic554c6b3dd462b1b39c75194eec469b6ff4aa55b Reviewed-on: https://go-review.googlesource.com/117155 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
-
- 16 Jun, 2018 3 commits
-
-
Yury Smolsky authored
It is possible to highlight up to 12 SSA values and outlinte up to 11 SSA blocks. Change-Id: Ifefb813ba07ee8856681552b77199f409e03d74d Reviewed-on: https://go-review.googlesource.com/119318 Run-TryBot: Yury Smolsky <yury@smolsky.by> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
-
Elias Naur authored
Change-Id: I1c7a12497c47dd166cc41230d6e5e005edcbc848 Reviewed-on: https://go-review.googlesource.com/118819 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Keith Randall authored
This CL removes the last of the direct system calls in the runtime package. This is the last CL for 1.11. Use libcCall instead of asmcgocall in a few places I accidentally used the wrong one. For 1.12, we need to think about whether/how the syscall package should be moved over to libc. Update #17490 Change-Id: I4f0bd9cd6023f662f2e29588266fdfae5233898f Reviewed-on: https://go-review.googlesource.com/118736 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 15 Jun, 2018 15 commits
-
-
Brad Fitzpatrick authored
Second try. The previous version (CL 115039 in git rev 39888635) wasn't accurate. Fixes #22347 Change-Id: I473165f308c730f50b14ba787cb215f7cb9ea364 Reviewed-on: https://go-review.googlesource.com/119235Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Brad Fitzpatrick authored
Fixes #23993 Change-Id: I112415c894e8c680bfc17d53772275430e46794b Reviewed-on: https://go-review.googlesource.com/115116Reviewed-by: Tim Cooper <tim.cooper@layeh.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Heschi Kreinick authored
Forked from CL 111895. The trickiest part of this is that the binary layout code (blk, elfshbits, and various other things) assumes a constant offset between symbols' and sections' file locations and their virtual addresses. Compression, of course, breaks this constant offset. But we need to assign virtual addresses to everything before compression in order to resolve relocations before compression. As a result, compression needs to re-compute the "address" of the DWARF sections and symbols based on their compressed size. Luckily, these are at the end of the file, so this doesn't perturb any other sections or symbols. (And there is, of course, a surprising amount of code that assumes the DWARF segment comes last, so what's one more place?) Relevant benchmarks: name old time/op new time/op delta StdCmd 10.3s ± 2% 10.8s ± 1% +5.43% (p=0.000 n=30+30) name old text-bytes new text-bytes delta HelloSize 746kB ± 0% 746kB ± 0% ~ (all equal) CmdGoSize 8.41MB ± 0% 8.41MB ± 0% ~ (all equal) [Geo mean] 2.50MB 2.50MB +0.00% name old data-bytes new data-bytes delta HelloSize 10.6kB ± 0% 10.6kB ± 0% ~ (all equal) CmdGoSize 252kB ± 0% 252kB ± 0% ~ (all equal) [Geo mean] 51.5kB 51.5kB +0.00% name old bss-bytes new bss-bytes delta HelloSize 125kB ± 0% 125kB ± 0% ~ (all equal) CmdGoSize 145kB ± 0% 145kB ± 0% ~ (all equal) [Geo mean] 135kB 135kB +0.00% name old exe-bytes new exe-bytes delta HelloSize 1.60MB ± 0% 1.05MB ± 0% -34.39% (p=0.000 n=30+30) CmdGoSize 16.5MB ± 0% 11.3MB ± 0% -31.76% (p=0.000 n=30+30) [Geo mean] 5.14MB 3.44MB -33.08% Fixes #11799. Updates #6853. Change-Id: I64197afe4c01a237523a943088051ee056331c6f Reviewed-on: https://go-review.googlesource.com/118276 Run-TryBot: Heschi Kreinick <heschi@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Heschi Kreinick authored
Forked from CL 111895. For #11799. Change-Id: Ie1346ac2c9122de494823b9058df3a0971e9dfe1 Reviewed-on: https://go-review.googlesource.com/118277 Run-TryBot: Heschi Kreinick <heschi@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Austin Clements <austin@google.com>
-
Brad Fitzpatrick authored
Add Go buildids into a custom wasm section ("go.buildid", arbitrarily) early in the wasm module, right after the magic & version. Fixes #25910 Change-Id: If3f7cb267bf8c7beb6fa8d8b7a4829419720bbd8 Reviewed-on: https://go-review.googlesource.com/119175 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
-
Russ Cox authored
This CL corresponds to golang.org/cl/118096 (7fbc8df48a7) in the vgo repo. It copies the bulk of the code from vgo back into the main repo, but completely disabled - vgo.Init is a no-op and vgo.Enabled returns false unconditionally. The point of this CL is to make the two trees easier to diff and to make future syncs smaller. Change-Id: Ic34fd5ddd8272a70c5a3b3437b5169e967d0ed03 Reviewed-on: https://go-review.googlesource.com/118095Reviewed-by: Bryan C. Mills <bcmills@google.com>
-
Misty De Meo authored
The ld/macho code currently understands a subset of the mach-o load commands. I've encountered one of these in the wild in a Go-produced binary, which tripped up the Go linker because its switch statement expects its list of load commands to be exhaustive; the rest I've added for the sake of completion. The ruby-macho library is a good non-Darwin header resource for these: https://github.com/homebrew/ruby-macho Fixes #25908 Change-Id: Ib54c065d27e87d8726a9870df05a2bae24828b98 GitHub-Last-Rev: 655e3f488a4c1a89896a40edb0e1f715a5d3f734 GitHub-Pull-Request: golang/go#25906 Reviewed-on: https://go-review.googlesource.com/119115Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Yasuhiro Matsumoto authored
Change-Id: I9d9189ae7882164246abcc4b22d49c26d4a3f201 Reviewed-on: https://go-review.googlesource.com/118937Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Fangming.Fang authored
With latest gcc (7.3.0), misc/cgo/testsanitizer test will fail with reporting sigmentation fault when running tsan test. On arm64, tsan is not supported currently and only msan test can be run. So skip tsan test on arm64. What needs to be pointed out is that msan test can be really run when setting clang as c/c++ complier. Fixes #25601 Change-Id: I6ab1a8d9edd243e2ee00ee40bc0abd6a0e6a125c Reviewed-on: https://go-review.googlesource.com/114857Reviewed-by: Bryan C. Mills <bcmills@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Richard Musiol authored
Chrome and Node.js were not showing the names of WebAssembly functions any more. This was due to the name section containing names also for import functions, which is redundant. Change-Id: I2f2b2d0b5bd7a59b34f108d2fd7b6ba2eb26f9c9 Reviewed-on: https://go-review.googlesource.com/118976Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Richard Musiol authored
1. Make import functions not use the js.Value type directly, but only the ref field. This gives more flexibility on the Go side for the js.Value type, which is a preparation for adding garbage collection of js.Value. 2. Turn import functions which are methods of js.Value into package-level functions. This is necessary to make vet happy. Change-Id: I69959bf1fbea0a0b99a552a1112ffcd0c024e9b8 Reviewed-on: https://go-review.googlesource.com/118656 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Brad Fitzpatrick authored
Fixes #24803 Change-Id: I8b1e7c5a74018a0c333f8c38a7ec5f5827ab1606 Reviewed-on: https://go-review.googlesource.com/106715Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
-
Austin Clements authored
Currently these two forms of layout are done in a single pass. This makes it difficult to compress DWARF sections because that must be done after relocations are applied, which must happen after virtual address layout, but we can't layout the file until we've compressed the DWARF sections. Fix this by separating the two layout steps. In the process, we can also unify the copy-pasted code in Link.address to compute file offsets, which currently has some unnecessary variation. Unlike the current file offset computation, which depends on virtual addresses, the new computation only uses file offsets and sizes. This will let us compress the file representation of a segment and create the file layout based on its on-disk size rather than its original in-memory size. Tested by comparing the test binary for the "strings" package on all supported GOOS/GOARCH combinations. All binaries are identical (except, of course, their build IDs). This is a second attempt at CL 111682. For #11799. Fixes #25863. Change-Id: If09f28771bb4d78dd392fd58b8d7c9d5f22b0b9e Reviewed-on: https://go-review.googlesource.com/118716 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Heschi Kreinick <heschi@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Richard Musiol authored
This commit enables vet/all for the js/wasm architecture. It got skipped initially because the codebase did not fully compile yet for js/wasm, which made vet/all fail. startTimer and stopTimer are not needed in the syscall package. Removed their assembly code since their Go stubs were already gone. Change-Id: Icaeb6d903876e51ceb1edff7631f715a98c28696 Reviewed-on: https://go-review.googlesource.com/118657Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Richard Musiol authored
This stub is necessary so the time package can fail to load the timezone files in a nice way. It transitively makes the log package work in browsers. Change-Id: I4d360df82989d9b40cd31bb4508a6d057534443e Reviewed-on: https://go-review.googlesource.com/118977Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 14 Jun, 2018 15 commits
-
-
Brian Kessler authored
For modular exponentiation, negative exponents can be handled using the following relation. for y < 0: x**y mod m == (x**(-1))**|y| mod m First compute ModInverse(x, m) and then compute the exponentiation with the absolute value of the exponent. Non-modular exponentiation with a negative exponent still returns 1. Fixes #25865 Change-Id: I2a35986a24794b48e549c8de935ac662d217d8a0 Reviewed-on: https://go-review.googlesource.com/118562 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
-
Richard Musiol authored
This commit adds support for JavaScript callbacks back into WebAssembly. This is experimental API, just like the rest of the syscall/js package. The time package now also uses this mechanism to properly support timers without resorting to a busy loop. JavaScript code can call into the same entry point multiple times. The new RUN register is used to keep track of the program's run state. Possible values are: starting, running, paused and exited. If no goroutine is ready any more, the scheduler can put the program into the "paused" state and the WebAssembly code will stop running. When a callback occurs, the JavaScript code puts the callback data into a queue and then calls into WebAssembly to allow the Go code to continue running. Updates #18892 Updates #25506 Change-Id: Ib8701cfa0536d10d69bd541c85b0e2a754eb54fb Reviewed-on: https://go-review.googlesource.com/114197Reviewed-by: Austin Clements <austin@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Rob Pike authored
It's non-portable, and the test isn't hard to write without diff. It still produces helpful output in case of trouble: --- FAIL: TestCoverHTML (0.75s) cover_test.go:325: line 4 differs: got: case <-ch:<span class="cov0" title="0"></span> want: case <-ch:<span class="cov0" xitle="0"></span> This makes the test operating-system independent. Change-Id: Iff35f00cb76ba89bc1b93db01c6f994e74341f4a Reviewed-on: https://go-review.googlesource.com/118795Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Daniel Martí authored
Instead of first looking for values of unnamed signature type, first treat the types and builtins. All the remaining cases will be what we're after. Change-Id: I328e22ae0be1cccaeb45ed4ddaa360233d447e7e Reviewed-on: https://go-review.googlesource.com/117835 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> Reviewed-by: Robert Griesemer <gri@golang.org>
-
Brian Kessler authored
Handling of sign bit as defined by IEEE 754-2008, section 6.3: When the sum of two operands with opposite signs (or the difference of two operands with like signs) is exactly zero, the sign of that sum (or difference) shall be +0 in all rounding-direction attributes except roundTowardNegative; under that attribute, the sign of an exact zero sum (or difference) shall be −0. However, x+x = x−(−x) retains the same sign as x even when x is zero. This change handles the special case of Add/Sub resulting in exactly zero when the rounding mode is ToNegativeInf setting the sign bit accordingly. Fixes #25798 Change-Id: I4d0715fa3c3e4a3d8a4d7861dc1d6423c8b1c68c Reviewed-on: https://go-review.googlesource.com/117495 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
-
David Chase authored
Inlining of switch statements into a RETURNed expression can sometimes lead to the switch being walked twice, which results in a miscompiled switch statement. The bug depends on: 1) multiple results 2) named results 3) a return statement whose expression includes a call to a function containing a switch statement that is inlined. It may also be significant that the default case of that switch is a panic(), though that's not proven. Rearranged the walk case for ORETURN so that double walks are not possible. Added a test, because this is so fiddly. Added a check against double walks, verified that it fires w/o other fix. Fixes #25776. Change-Id: I2d594351fa082632512ef989af67eb887059729b Reviewed-on: https://go-review.googlesource.com/118318 Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
Constantin Konstantinidis authored
NewReader cannot return an error. This behaviour is kept. NextPart returns EOF when boundary is empty. RFC 2046 does not allow it. The fix is to return an error on the call of NextPart. Fixes #23170 Change-Id: I775afd3f93e8b56e6cb274bc5c9de362a18bcc3c Reviewed-on: https://go-review.googlesource.com/118822Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
-
Tobias Klauser authored
Follow the convertion (https://golang.org/s/generatedcode) for generated code in alldocs.go Change-Id: I03985de20363ba8e09a5a624a931090ec8d196e6 Reviewed-on: https://go-review.googlesource.com/118816 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Alberto Donizetti authored
The TestMapping test invokes the go tool in an exec.Command by directly hard-coding a "go" string for the command. This can cause test failures on systems where the "go" command points to an old toolchain where the test is not supposed to work. Use testenv.GoToolPath instead. Also call 'go run' directly on the mappingtest/main.go file instead of go-running the directory. Change-Id: Ib91877c021209cbf4da50a561737d7a9d42c6adc Reviewed-on: https://go-review.googlesource.com/118662 Run-TryBot: Alberto Donizetti <alb.donizetti@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Tobias Klauser authored
TestFifoEOF fails on android because the mkfifo syscall is not allowed: --- FAIL: TestFifoEOF (0.00s) fifo_test.go:39: permission denied Change-Id: I007ff359831525add39cec34de4b3d3cd3adb047 Reviewed-on: https://go-review.googlesource.com/118815 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Tobias Klauser authored
Follow the convertion (https://golang.org/s/generatedcode) for generated code. Change-Id: I4ac8b99ac45f25dd2399d048ea831489e5394984 Reviewed-on: https://go-review.googlesource.com/118821 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Alex Brainman <alex.brainman@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Alex Brainman authored
Current SendFile implementation assumes that TransmitFile starts from the current file position. But that appears not true for Windows 10 Version 1803. TransmitFile documentation https://msdn.microsoft.com/en-us/library/windows/desktop/ms740565(v=vs.85).aspx suggests, "You can use the lpOverlapped parameter to specify a 64-bit offset within the file at which to start the file data transfer by setting the Offset and OffsetHigh member of the OVERLAPPED structure." Do as it advises. Fixes #25722 Change-Id: I241d3bf76d0d5590d4df27c6f922d637068232fb Reviewed-on: https://go-review.googlesource.com/117816 Run-TryBot: Alex Brainman <alex.brainman@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Dominik Honnef authored
Godoc expects text after a header, not code. Change-Id: I99f412ad15e10bf9cea0dbd19019ed6ce477736c Reviewed-on: https://go-review.googlesource.com/117595Reviewed-by: Rob Pike <r@golang.org>
-
Akhil Indurti authored
This change updates the go tool's documentation under the section "Generate Go files by processing source" to mention the convention that generated source files should have a line of text that matches the following regular expression: ^// Code generated .* DO NOT EDIT\.$ Previously, the canonical documentation for this convention (https://golang.org/s/generatedcode) referenced Rob Pike's comment at https://golang.org/issue/13560#issuecomment-288457920. This change merely moves that information to a more visible place. Updates #25433. Change-Id: I804d95d307d1dc68cb28da3750ebe9090178c474 Reviewed-on: https://go-review.googlesource.com/118756Reviewed-by: Rob Pike <r@golang.org>
-
Brad Fitzpatrick authored
It was apparently waiting on CL 36942, which was submitted. Fixes #21416 Change-Id: I8f4ccc5a3176070abf0df019c82700c5761b5f53 Reviewed-on: https://go-review.googlesource.com/117055 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 13 Jun, 2018 3 commits
-
-
Ian Lance Taylor authored
This avoids name conflicts when two identical packages use cgo. This can happen in practice when the same package is vendored multiple times in a single build. Fixes #23555 Change-Id: I9f0ec6db9165dcf9cdf3d314c668fee8ada18f9c Reviewed-on: https://go-review.googlesource.com/118739 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Emmanuel T Odeke authored
Ensure that compiler error suggestions after case insensitive field lookups don't mistakenly reported unexported fields if those fields aren't in the local package being processed. Fixes #25727 Change-Id: Icae84388c2a82c8cb539f3d43ad348f50a644caa Reviewed-on: https://go-review.googlesource.com/117755 Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com> Reviewed-by: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Ian Lance Taylor authored
Fixes #23720 Change-Id: I28e0c16503bc043f793e0dab19668f7a66313312 Reviewed-on: https://go-review.googlesource.com/118737 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-