- 18 Sep, 2019 11 commits
-
-
Jeremy Faller authored
RELNOTE=This change adds an underscore to all Go symbols in darwin, and the behavior might be confusing to users of tools like "nm", etc. Fixes #33808 Change-Id: I1849e6618c81215cb9bfa62b678f6f389cd009d5 Reviewed-on: https://go-review.googlesource.com/c/go/+/196217 Run-TryBot: Jeremy Faller <jeremy@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
Than McIntosh authored
Use a different recipe for capturing debug modinfo if we're compiling with the gccgo toolchain, to avoid applying a go:linkname directive to a variable (not supported by gccgo). Fixes #30344. Change-Id: I9ce3d42c3bbb809fd68b140f56f9bbe3406c351b Reviewed-on: https://go-review.googlesource.com/c/go/+/171768Reviewed-by: Bryan C. Mills <bcmills@google.com> Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Lynn Boger authored
This cleans up the isel code generation in ssa for ppc64x. Current there is no isel op and the isel code is only generated from pseudo ops in ppc64/ssa.go, and only using operands with values 0 or 1. When the isel is generated, there is always a load of 1 into the temp register before it. This change implements the isel op so it can be used in PPC64.rules, and can recognize operand values other than 0 or 1. This also eliminates the forced load of 1, so it will be loaded only if needed. This will make the isel code generation consistent with other ops, and allow future rule changes that can take advantage of having a more general purpose isel rule. Change-Id: I363e1dbd3f7f5dfecb53187ad51cce409a8d1f8d Reviewed-on: https://go-review.googlesource.com/c/go/+/195057 Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>
-
Bryan C. Mills authored
Fixes #32162 Change-Id: I164665108fa8ae299229054bded82cb3b027bccb Reviewed-on: https://go-review.googlesource.com/c/go/+/196023 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Tobias Klauser authored
Fixes #34015 Change-Id: I29798fb9c72b6f4bee8aecea96ab13b4cba2e80d Reviewed-on: https://go-review.googlesource.com/c/go/+/195738 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Matthew Dempsky authored
When compiling expression switches, we try to optimize runs of constants into binary searches. The ordering used isn't visible to the application, so it's unimportant as long as we're consistent between sorting and searching. For strings, it's much cheaper to compare string lengths than strings themselves, so instead of ordering strings by "si <= sj", we currently order them by "len(si) < len(sj) || len(si) == len(sj) && si <= sj" (i.e., the lexicographical ordering on the 2-tuple (len(s), s)). However, it's also somewhat cheaper to compare strings for equality (i.e., ==) than for ordering (i.e., <=). And if there were two or three string constants of the same length in a switch statement, we might unnecessarily emit ordering comparisons. For example, given: switch s { case "", "1", "2", "3": // ordered by length then content goto L } we currently compile this as: if len(s) < 1 || len(s) == 1 && s <= "1" { if s == "" { goto L } else if s == "1" { goto L } } else { if s == "2" { goto L } else if s == "3" { goto L } } This CL switches to using a 2-level binary search---first on len(s), then on s itself---so that string ordering comparisons are only needed when there are 4 or more strings of the same length. (4 being the cut-off for when using binary search is actually worthwhile.) So the above switch instead now compiles to: if len(s) == 0 { if s == "" { goto L } } else if len(s) == 1 { if s == "1" { goto L } else if s == "2" { goto L } else if s == "3" { goto L } } which is better optimized by walk and SSA. (Notably, because there are only two distinct lengths and no more than three strings of any particular length, this example ends up falling back to simply using linear search.) Test case by khr@ from CL 195138. Fixes #33934. Change-Id: I8eeebcaf7e26343223be5f443d6a97a0daf84f07 Reviewed-on: https://go-review.googlesource.com/c/go/+/195340 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Robert Griesemer authored
Fixes #34343. Change-Id: I74240c8f431f6596338633a86a7a5ee1fce70a65 Reviewed-on: https://go-review.googlesource.com/c/go/+/196057 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Robert Griesemer authored
Remove redundant code and improve documentation in the process. Fixes #34211. Change-Id: I9a6d1467f1a2c98a163f41f9df147fc6500c6fad Reviewed-on: https://go-review.googlesource.com/c/go/+/196077Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Matthew Dempsky authored
Change-Id: Ic33dfccf06681470bec19f66653fda67d9901095 Reviewed-on: https://go-review.googlesource.com/c/go/+/196118Reviewed-by: Keith Randall <khr@golang.org>
-
Matthew Dempsky authored
We used to use OXCASE to represent general, possibly multi-valued cases, and then desugar these during walk into single-value cases represented by OCASE. In CL 194660, we switched to eliminated the desugaring step and instead handle the multi-valued cases directly, which eliminates the need for an OCASE Op. Instead, we can simply remove OCASE, and rename OXCASE to just OCASE. Passes toolstash-check. Change-Id: I3cc184340f9081d37453927cca1c059267fdbc12 Reviewed-on: https://go-review.googlesource.com/c/go/+/196117Reviewed-by: Keith Randall <khr@golang.org>
-
Matthew Dempsky authored
When emitting base cases, previously we would emit: if c1 { s1 } if c2 { s2 } if c3 { s3 } With this CL, we instead emit: if c1 { s1 } else if c2 { s2 } else if c3 { s3 } Most of the time, this doesn't make a difference, because s1/s2/s3 are typically "goto" statements. But for type switches, we currently emit: if hash == 271 { if _, ok := iface.(T1); ok { goto t1case } } if hash == 314 { if _, ok := iface.(T2); ok { goto t2case } } That is, the if bodies can fallthrough, even though it's impossible for them to match any of the subsequent cases. Change-Id: I453d424d0b5e40060a703738bbb374523f1c403c Reviewed-on: https://go-review.googlesource.com/c/go/+/195339 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
- 17 Sep, 2019 12 commits
-
-
Robert Griesemer authored
Complete interfaces before comparing them with Checker.identical. This requires passing through a *Checker to various functions that didn't need this before. Verified that none of the exported API entry points for interfaces that rely on completed interfaces are used internally except for Interface.Empty. Verified that interfaces are complete before calling Empty on them, and added a dynamic check in the exported functions. Unfortunately, this fix exposed another problem with an esoteric test case (#33656) which we need to reopen. Fixes #34151. Updates #33656. Change-Id: I4e14bae3df74a2c21b565c24fdd07135f22e11c0 Reviewed-on: https://go-review.googlesource.com/c/go/+/195837 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Javier authored
Change-Id: I95921a8a55b243600aaec24ddca74b7040107dca Reviewed-on: https://go-review.googlesource.com/c/go/+/195203Reviewed-by: Robert Griesemer <gri@golang.org>
-
Jeremy Faller authored
This reverts commit 06e5529e. Reason for revert: darwin_386 is unhappy. (Almost as unhappy as I am.) https://build.golang.org/log/292c90a4ef1c93597b865ab8513b66a95d93d022 Change-Id: I690566ce1d8212317fc3dc349ad0d4d5a2bb58eb Reviewed-on: https://go-review.googlesource.com/c/go/+/196033Reviewed-by: Cherry Zhang <cherryyz@google.com> Run-TryBot: Cherry Zhang <cherryyz@google.com>
-
Pantelis Sampaziotis authored
This change adds testable examples for the new Microseconds and Milliseconds methods that were introduced in Go 1.13. Fixes #34354 Change-Id: Ibdbfd770ca2192f9086f756918325f7327ce0482 GitHub-Last-Rev: 4575f48f5feb8e49742304d17776e28302647931 GitHub-Pull-Request: golang/go#34355 Reviewed-on: https://go-review.googlesource.com/c/go/+/195979Reviewed-by: Alexander Rakoczy <alex@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Alexander Rakoczy <alex@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Jeremy Faller authored
RELNOTE=This change adds an underscore to all Go symbols in darwin, and the behavior might be confusing to users of tools like "nm", etc. Fixes #33808 Change-Id: I19ad626026ccae1e87b3bb97b6bb9fd55e95e121 Reviewed-on: https://go-review.googlesource.com/c/go/+/195619 Run-TryBot: Jeremy Faller <jeremy@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
Than McIntosh authored
The elf reader's method for reading in DWARF section data has support for applying selected relocations when the debug/dwarf readers are being used on relocatable objects. This patch extends the set of relocations applied slightly. In particlar, prior to this for some architectures we were only applying relocations whose target symbol was a section symbol; now we also include some relocations that target other symbols. This is needed to get meaningful values for compilation unit DIE low_pc attributes, which typically target a specific function symbol in text. Fixes #31363. Change-Id: I34b02e7904cd7f2dea74197f73fa648141d15212 Reviewed-on: https://go-review.googlesource.com/c/go/+/195679Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Daniel Martí authored
As correctly pointed out by Giovanni Bajo, doing a single regexp pass should be much faster than doing hundreds per architecture. We can then use a map to keep track of what ops are handled in each file. And the amount of saved work is evident: name old time/op new time/op delta Rulegen 2.48s ± 1% 2.02s ± 1% -18.44% (p=0.008 n=5+5) name old user-time/op new user-time/op delta Rulegen 10.9s ± 1% 8.9s ± 0% -18.27% (p=0.008 n=5+5) name old sys-time/op new sys-time/op delta Rulegen 209ms ±28% 236ms ±18% ~ (p=0.310 n=5+5) name old peak-RSS-bytes new peak-RSS-bytes delta Rulegen 178MB ± 3% 176MB ± 3% ~ (p=0.548 n=5+5) The speed-up is so large that we don't need to parallelize it anymore; the numbers above are with the removed goroutines. Adding them back in doesn't improve performance noticeably at all: name old time/op new time/op delta Rulegen 2.02s ± 1% 2.01s ± 1% ~ (p=0.421 n=5+5) name old user-time/op new user-time/op delta Rulegen 8.90s ± 0% 8.96s ± 1% ~ (p=0.095 n=5+5) While at it, remove an unused method. Change-Id: I328b56e63b64a9ab48147e67e7d5a385c795ec54 Reviewed-on: https://go-review.googlesource.com/c/go/+/195739 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
LE Manh Cuong authored
golang.org/cl/109517 optimized the compiler to avoid the allocation for make in append(x, make([]T, y)...). This was only implemented for the case that y has type int. This change extends the optimization to trigger for all integer types where the value is known at compile time to fit into an int. name old time/op new time/op delta ExtendInt-12 106ns ± 4% 106ns ± 0% ~ (p=0.351 n=10+6) ExtendUint64-12 1.03µs ± 5% 0.10µs ± 4% -90.01% (p=0.000 n=9+10) name old alloc/op new alloc/op delta ExtendInt-12 0.00B 0.00B ~ (all equal) ExtendUint64-12 13.6kB ± 0% 0.0kB -100.00% (p=0.000 n=10+10) name old allocs/op new allocs/op delta ExtendInt-12 0.00 0.00 ~ (all equal) ExtendUint64-12 1.00 ± 0% 0.00 -100.00% (p=0.000 n=10+10) Updates #29785 Change-Id: Ief7760097c285abd591712da98c5b02bc3961fcd Reviewed-on: https://go-review.googlesource.com/c/go/+/182559 Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Keith Randall authored
Now that mid-stack inlining reports backtraces correctly, we no longer need to protect against inlining in a few critical areas. Update #19348 Update #28640 Update #34276 Change-Id: Ie68487e6482c3a9509ecf7ecbbd40fe43cee8381 Reviewed-on: https://go-review.googlesource.com/c/go/+/195818Reviewed-by: David Chase <drchase@google.com>
-
Tamir Duberstein authored
This slightly simplified the code. I stumbled upon this when support was being added to Fuchsia (and this pattern was initially cargo-culted). Change-Id: Ica090a118a0056c5c1b51697691bc7308f0d424a Reviewed-on: https://go-review.googlesource.com/c/go/+/177878Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Joel Sing authored
Add support for assembling integer computational instructions. Based on the riscv-go port. Updates #27532 Change-Id: Ibf02649eebd65ce96002a9ca0624266d96def2cd Reviewed-on: https://go-review.googlesource.com/c/go/+/195079 Run-TryBot: Joel Sing <joel@sing.id.au> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
Robert Griesemer authored
This eliminates an old TODO. Change-Id: I36d666905f43252f5d338b11ef9c1ed8b5f22b1f Reviewed-on: https://go-review.googlesource.com/c/go/+/195817 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 16 Sep, 2019 16 commits
-
-
Matthew Dempsky authored
There are a lot of complexities to handling switches efficiently: 1. Order matters for expression switches with non-constant cases and for type expressions with interface types. We have to respect side-effects, and we also can't allow later cases to accidentally take precedence over earlier cases. 2. For runs of integers, floats, and string constants in expression switches or runs of concrete types in type switches, we want to emit efficient binary searches. 3. For runs of consecutive integers in expression switches, we want to collapse them into range comparisons. 4. For binary searches of strings, we want to compare by length first, because that's more efficient and we don't need to respect any particular ordering. 5. For "switch true { ... }" and "switch false { ... }", we want to optimize "case x:" as simply "if x" or "if !x", respectively, unless x is interface-typed. The current swt.go code reflects how these constraints have been incrementally added over time, with each of them being handled ad hocly in different parts of the code. Also, the existing code tries very hard to reuse logic between expression and type switches, even though the similarities are very superficial. This CL rewrites switch handling to better abstract away the logic involved in constructing the binary searches. In particular, it's intended to make further optimizations to switch dispatch much easier. It also eliminates the need for both OXCASE and OCASE ops, and a subsequent CL can collapse the two. Passes toolstash-check. Change-Id: Ifcd1e56f81f858117a412971d82e98abe7c4481f Reviewed-on: https://go-review.googlesource.com/c/go/+/194660 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Matthew Dempsky authored
This CL expands the test for #29612 to check that type switches also work correctly when type hashes collide. Change-Id: Ia153743e6ea0736c1a33191acfe4d8ba890be527 Reviewed-on: https://go-review.googlesource.com/c/go/+/195782 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Lucas Bremgartner authored
Unmarshaling a string into a json.Number should first check that the string is a valid Number. If not, we should fail without decoding it. Fixes #14702 Change-Id: I286178e93df74ad63c0a852c3f3489577072cf47 GitHub-Last-Rev: fe69bb68eed06d056639f440d2daf4bb7c99013b GitHub-Pull-Request: golang/go#34272 Reviewed-on: https://go-review.googlesource.com/c/go/+/195045Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Daniel Martí authored
We use go/format on the final output, so don't bother with the added tabwriter work to align comments when using go/printer. name old time/op new time/op delta Rulegen 2.53s ± 2% 2.48s ± 1% -2.20% (p=0.032 n=5+5) name old user-time/op new user-time/op delta Rulegen 11.2s ± 1% 10.8s ± 0% -3.72% (p=0.008 n=5+5) name old sys-time/op new sys-time/op delta Rulegen 218ms ±17% 207ms ±19% ~ (p=0.548 n=5+5) name old peak-RSS-bytes new peak-RSS-bytes delta Rulegen 184MB ± 3% 175MB ± 4% ~ (p=0.056 n=5+5) Change-Id: I53bad2ab15cace67415f2171fffcd13ed596e62b Reviewed-on: https://go-review.googlesource.com/c/go/+/195219 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Daniel Martí authored
rulegen has a sanity check that ensures all the arch-specific opcodes are handled by each of the gen files. This is an expensive chunk of work, particularly since there are a lot of opcodes in total, and each one of them compiles and runs a regular expression. Parallelize that for each architecture, which greatly speeds up 'go run *.go' on my laptop with four real CPU cores. name old time/op new time/op delta Rulegen 3.39s ± 1% 2.53s ± 2% -25.34% (p=0.008 n=5+5) name old user-time/op new user-time/op delta Rulegen 10.6s ± 1% 11.2s ± 1% +6.09% (p=0.008 n=5+5) name old sys-time/op new sys-time/op delta Rulegen 201ms ± 7% 218ms ±17% ~ (p=0.548 n=5+5) name old peak-RSS-bytes new peak-RSS-bytes delta Rulegen 182MB ± 3% 184MB ± 3% ~ (p=0.690 n=5+5) Change-Id: Iec538ed0fa7eb867eeeeaab3da1e2615ce32cbb9 Reviewed-on: https://go-review.googlesource.com/c/go/+/195218 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Jay Conrod authored
Fixes #34321 Change-Id: Ia6253038c525089e20a1da64a2c5c9dcc57edd74 Reviewed-on: https://go-review.googlesource.com/c/go/+/195677 Run-TryBot: Jay Conrod <jayconrod@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
-
Matthew Dempsky authored
Support for overlapping interfaces is a new (proposed) Go language feature to be supported in Go 1.14, so it shouldn't be supported under -lang=go1.13 or earlier. Fixes #34329. Change-Id: I5fea5716b7d135476980bc40b4f6e8c611b67735 Reviewed-on: https://go-review.googlesource.com/c/go/+/195678 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
-
Alberto Donizetti authored
This reverts CL 192101. Reason for revert: The same paragraph was added 2 weeks ago (look a few lines above) Change-Id: I05efb2631d7b4966f66493f178f2a649c715a3cc Reviewed-on: https://go-review.googlesource.com/c/go/+/195637Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
Jay Conrod authored
The '-trimpath' flag tells 'go build' to trim any paths from the output files that are tied to the current workspace or toolchain. When this flag is set, we do not need to include the package directory in the text hashed to construct the action ID for each package. Fixes #33772 Change-Id: I20b902d2f58019709b15864ca79aa0d9255ae707 Reviewed-on: https://go-review.googlesource.com/c/go/+/195318 Run-TryBot: Jay Conrod <jayconrod@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
-
Matthew Dempsky authored
This information is redundant with the position information already provided. Also, no other -m diagnostics print out function name. While here, report parameter leak diagnostics against the parameter declaration position rather than the function, and use Warnl for "moved to heap" messages. Test cases updated programmatically by removing the first word from every "no match for" error emitted by run.go: go run run.go |& \ sed -E -n 's/^(.*):(.*): no match for `([^ ]* (.*))` in:$/\1!\2!\3!\4/p' | \ while IFS='!' read -r fn line before after; do before=$(echo "$before" | sed 's/[.[\*^$()+?{|]/\\&/g') after=$(echo "$after" | sed -E 's/(\&|\\)/\\&/g') fn=$(find . -name "${fn}" | head -1) sed -i -E -e "${line}s/\"${before}\"/\"${after}\"/" "${fn}" done Passes toolstash-check. Change-Id: I6e02486b1409e4a8dbb2b9b816d22095835426b5 Reviewed-on: https://go-review.googlesource.com/c/go/+/195040 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
Ian Lance Taylor authored
Try to deflake TestNohup. The kernel will deliver a signal as a thread returns from a syscall. If the only active thread is sleeping, and the system is busy, the kernel may not get around to waking up a thread to catch the signal. Try splitting up the sleep, to give the kernel another change to deliver. I don't know if this will help, but it seems worth a try. Fixes #33174 Change-Id: I34b3240af706501ab8538cb25c4846d1d30d7691 Reviewed-on: https://go-review.googlesource.com/c/go/+/194879Reviewed-by: Bryan C. Mills <bcmills@google.com>
-
Maya Rashish authored
Zeroing unused registers is not required. Removing it makes the code very slightly smaller and very slightly faster. Change-Id: I1ec17b497db971ca8a3641e3e94c063571419f27 GitHub-Last-Rev: f721bb263637717e8ff9fd2c34148b5b2762e8c4 GitHub-Pull-Request: golang/go#31596 Reviewed-on: https://go-review.googlesource.com/c/go/+/173160Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Lynn Boger authored
Update the section in asm.html related to PPC64. Remove the line that says it is in an experimental state, add a link to the new doc.go file that has all the detail for the Go assembler for PPC64. Change-Id: I45d9891669e01d94e2721be576d572e02cd9d2db Reviewed-on: https://go-review.googlesource.com/c/go/+/183840 Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com> Reviewed-by: Carlos Eduardo Seo <cseo@linux.vnet.ibm.com> Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Reviewed-by: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Lucas Bremgartner authored
Add quotes when marshaling a json.Number with the string option set via a struct tag. This ensures that the resulting json can be unmarshaled into the source struct without error. Fixes #34268 Change-Id: Ide167d9dec77019554870b5957b37dc258119d81 GitHub-Last-Rev: dde81b71208be01c253bb87dbb6f81ac6e0785be GitHub-Pull-Request: golang/go#34269 Reviewed-on: https://go-review.googlesource.com/c/go/+/195043Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Cherry Zhang authored
It is useful to know about the -all_codegen option for running codegen tests for all platforms. I was puzzling that some codegen test was not failing on my local machine or on trybot, until I found this option. Change-Id: I062cf4d73f6a6c9ebc2258195779d2dab21bc36d Reviewed-on: https://go-review.googlesource.com/c/go/+/192101Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Cuong Manh Le authored
Passes toolstash-check. Change-Id: Ieaef20b7649787727b69469f93ffc942022bc079 Reviewed-on: https://go-review.googlesource.com/c/go/+/195198 Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
- 15 Sep, 2019 1 commit
-
-
Austin Clements authored
The wasm_exec.js wrapper tries to set up the argv and envp following the UNIX conventions, but doesn't get it quite right, which can cause runtime.goenv to crash if you get unlucky. The main problem was that the envp array wasn't terminated with a nil pointer, so the runtime didn't know when to stop reading the array. This CL adds that nil pointer to the end of the envp array. The other problem was harmless, but confusing. In the UNIX convention, the argv array consists of argc pointers followed by a nil pointer, followed by the envp array. However, wasm_exec.js put the environment variable count between the two pointer arrays rather than a nil pointer. The runtime never looks at this slot, so it didn't matter, but the break from convention left Cherry and I trying to debug why it *wasn't* losing any environment variables before we realized that that layouts happened to be close enough to work. This CL switches to the UNIX convention of simply terminating the argv array with a nil pointer. Change-Id: Ic9a4cd9eabb5dfa599a809b960f9e579b9f1f4db Reviewed-on: https://go-review.googlesource.com/c/go/+/193417 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com> Reviewed-by: Richard Musiol <neelance@gmail.com>
-