- 14 Jun, 2018 14 commits
-
-
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 26 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>
-
Sabin Mihai Rapan authored
The current implementation does not support calling C variadic functions (as discussed in #975). Document that. Fixes #23537 Change-Id: If4c684a3d135f3c2782a720374dc4c07ea66dcbb Reviewed-on: https://go-review.googlesource.com/90415Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Andrii Soldatenko authored
Change-Id: I9154df128b349c102854bb0f21e4c313685dd0e6 Reviewed-on: https://go-review.googlesource.com/118659Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Tim Cooper authored
Fixes #25876 Change-Id: I149dbb2afef13cc13fb5722d930377ed918d7e3c Reviewed-on: https://go-review.googlesource.com/118717Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Brad Fitzpatrick authored
Updates #25849 Change-Id: I09ee928b462ab538a9d38c4e317eaeb8856919f2 Reviewed-on: https://go-review.googlesource.com/118335Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
-
Ian Lance Taylor authored
Fixes #25472 Change-Id: Idb72ed06a3dc43c49ab984a80f8885352b036465 Reviewed-on: https://go-review.googlesource.com/118695Reviewed-by: Rob Pike <r@golang.org>
-
Robert Griesemer authored
The function parseInitData appears to be unused. Deleted. Change-Id: I7d4efed9d2519cfbd0ba03d89b45add8b314ea84 Reviewed-on: https://go-review.googlesource.com/118556 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Yury Smolsky authored
Display just a few columns in ssa.html, other columns can be expanded by clicking on collapsed column. Use sans serif font for the text, slightly smaller font size for non program text. Fixes #25286 Change-Id: I1094695135401602d90b97b69e42f6dda05871a2 Reviewed-on: https://go-review.googlesource.com/117275 Run-TryBot: Yury Smolsky <yury@smolsky.by> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Tobias Klauser authored
As mentioned in #25845, port CL 46474 from golang.org/x/sys/unix to the syscall package. Currently Linux' fchmodat(2) syscall implementation doesn't support the flags parameter (though it might in future versions [1]). Fchmodat in the syscall package takes the parameter and (wrongly) passes it on to the syscall which will ignore it. According to the POSIX.1-2008 manual page [2], AT_SYMLINK_NOFOLLOW is the only valid value for the flags parameter and EOPNOTSUPP should be returned in case changing the mode of a symbolic link is not supported by the underlying system. EINVAL should be returned for any other value of the flags parameter. [1] https://patchwork.kernel.org/patch/9596301/ [2] http://pubs.opengroup.org/onlinepubs/9699919799/functions/chmod.html Updates #20130 Updates #25845 Change-Id: I1021dd0e6a4f4cb3557cb1c1b34dd618c378cda6 Reviewed-on: https://go-review.googlesource.com/118658Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Ian Lance Taylor authored
The Darwin kqueue implementation doesn't report any event when the last writer for a fifo is closed. Fixes #24164 Change-Id: Ic2c47018ef1284bf2e26379f8dd7646edaad4d05 Reviewed-on: https://go-review.googlesource.com/118566Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Elias Naur authored
Change-Id: Ie97c9c9163f5af7b4768c34faac726e21627aa79 Reviewed-on: https://go-review.googlesource.com/118660 Run-TryBot: Elias Naur <elias.naur@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Keith Randall authored
kqueue, kevent, closeonexec, setitimer, with sysctl and fcntl helpers. TODO:arm,arm64 Change-Id: I9386f377186d6ac7cb99064c524a67e0c8282eba Reviewed-on: https://go-review.googlesource.com/118561Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org>
-
Hana Kim authored
The test requires cgo Change-Id: I1bffee5f187afcf4b7e27516451c56ddfc263a26 Reviewed-on: https://go-review.googlesource.com/118638Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Alberto Donizetti <alb.donizetti@gmail.com> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Austin Clements authored
This reverts commit bd837745. Reason for revert: This broke ELF layout on arm, arm64, mips*, mips64*, ppc64*, and s390x. Change-Id: I56a27b76e6f4b22ce39a99790af9116f8687eee9 Reviewed-on: https://go-review.googlesource.com/118675Reviewed-by: Heschi Kreinick <heschi@google.com> Run-TryBot: Heschi Kreinick <heschi@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Brad Fitzpatrick authored
Fixes #25852 Change-Id: I35c630367c8f1934dcffc0b0e08891d55a903518 Reviewed-on: https://go-review.googlesource.com/118560 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Andrew Bonventre <andybons@golang.org>
-
Tobias Klauser authored
Like on other architectures, use rawSyscallNoError for Linux syscalls that don't return an error and convert all applicable occurences of RawSyscall to use it instead. This was missed in CL 84485 because mkall.sh doesn't support mipsx/mips64x, so add the corresponding entries as well. Updates #22924 Change-Id: I762cbee0827140b9890c4a10830e0b4cd33de92f Reviewed-on: https://go-review.googlesource.com/118655 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Richard Musiol authored
This commit changes wasm_exec.js to not depend on the existence of performance.timeOrigin. The field is not yet supported on all browsers, e.g. it is unavailable on Safari. Change-Id: I6cd3834376c1c55424c29166fde1219f0d4d338f Reviewed-on: https://go-review.googlesource.com/118617Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Hana Kim authored
The pprof tool utilizes attributes of mapping entries such as HasFunctions to determine whether the profile includes necessary symbol information. If none of the attributes is set, pprof tool tries to read the corresponding binary to use for local symbolization. If the binary doesn't exist, it prints out error messages. Go runtime generated profiles without any of the attributes set so the pprof tool always printed out the error messages. The error messages became more obvious with the new terminal support that uses red color for error messages. Go runtime can symbolize all Go symbols and generate self-contained profile for pure Go program. Thus, there is no reason for the pprof tool to look for the copy of the binary. So, this CL sets one of the attributes (HasFunctions) true if all PCs in samples look fully symbolized. For non-pure Go program, however, it's possible that symbolization of non-Go PCs is incomplete. In this case, we need to leave the attributes all false so pprof can attempt to symbolize using the local copy of the binary if available. It's hard to determine whether a mapping includes non-Go code. Instead, this CL checks PCs from collected samples. If unsuccessful symbolization is observed, it skips setting the HasFunctions attribute. Fixes #25743 Change-Id: I5108be45bbc37ab486d145fa03e7ce37d88fad50 Reviewed-on: https://go-review.googlesource.com/118275 Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Tobias Klauser authored
This is needed in addition to CL 110066 in order to be able to generate Go type definitions for linux/riscv64 in the golang.org/x/sys/unix package. Change-Id: I4a27e6424aaea63283b55bd4f73b958b41f29d72 Reviewed-on: https://go-review.googlesource.com/118618 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
CL 108156 added -cgo and -export, but in the usage line it added -cgo and -list. CL 117015 correctly added -export to the usage line. All that remains is to remove -list. Change-Id: I8cc5cfc78bc6b52080ae1b861f92620a8f18b53f Reviewed-on: https://go-review.googlesource.com/118375 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Suriyaa Sundararuban authored
Change-Id: I9d2d25df067ca573589db5ff18296a5ec33866be Reviewed-on: https://go-review.googlesource.com/118595Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Ian Lance Taylor authored
Change-Id: I3ac25cf1770b5ac0d36690c37615b3badd27463d Reviewed-on: https://go-review.googlesource.com/118455Reviewed-by: Rob Pike <r@golang.org>
-
Dave Russell authored
Change-Id: Iea5c705dd58f9b83fbeb0500defcc08c34716169 GitHub-Last-Rev: 35702c784e2329fe3e44947430d246f8cdb04645 GitHub-Pull-Request: golang/go#25858 Reviewed-on: https://go-review.googlesource.com/118536Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Robert Griesemer authored
Separated out panic handling for bimporter and importer so that the handler can consider the current version and report a better error. Added new export data test for export data version 999 (created by changing the compiler temporarily) and verifying expected error message. Fixes #25856. Change-Id: Iaafec07b79499154ef7c007341783fa07c57f24d Reviewed-on: https://go-review.googlesource.com/118496 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-