- 26 Feb, 2019 40 commits
-
-
WhisperRain authored
Set element in slice to nil avoiding memory leak. Change-Id: I9dbef9a0466407011e326725d3a0b681cd815389 GitHub-Last-Rev: 1bae5d375876a7f146eb04c2a5ba88d079264eb3 GitHub-Pull-Request: golang/go#30386 Reviewed-on: https://go-review.googlesource.com/c/163601 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Ian Lance Taylor authored
This makes the tests slightly faster, though the bulk of the time is still spent building the test programs. Also run some tests in parallel. Updates #26470 Change-Id: Ia5ec2b99831d69c426b43dbab80613aa03e705f5 Reviewed-on: https://go-review.googlesource.com/c/153258Reviewed-by: Austin Clements <austin@google.com>
-
Ian Lance Taylor authored
Updates https://gcc.gnu.org/PR89406 Change-Id: Iccf2760e42e9caa90720b96e74a805a9c0d48f35 Reviewed-on: https://go-review.googlesource.com/c/163277 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Mikio Hara <mikioh.public.networking@gmail.com> Reviewed-by: Than McIntosh <thanm@google.com>
-
Ian Lance Taylor authored
Fixes #30400 Change-Id: Icbd1dda29562afa80c8e37657133a6fe48070ac0 Reviewed-on: https://go-review.googlesource.com/c/163744Reviewed-by: Rob Pike <r@golang.org>
-
Leon Klingele authored
Change-Id: Ia0847790a597c35ebb572db6fc1b7534ecf8f006 GitHub-Last-Rev: 03f039d0abbce0e2a2bf15201948e46354950a22 GitHub-Pull-Request: golang/go#30022 Reviewed-on: https://go-review.googlesource.com/c/160446Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Leon Klingele authored
Change-Id: Iaa0e1721996b582bba9509c083755e1f125abb6b GitHub-Last-Rev: c9b13ec0cdc2b22aafa54706dc6df6113a11712b GitHub-Pull-Request: golang/go#29996 Reviewed-on: https://go-review.googlesource.com/c/160420 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Ian Lance Taylor authored
Also store 64-bit data in lib/time/zoneinfo.zip. The comments argue that we don't need the 64-bit data until 2037 or 2106, but that turns out not to be the case. We also need them for dates before December 13, 1901, which is time.Unix(-0x80000000, 0). Fixes #30099 Change-Id: Ib8c9efb29b7b3c08531ae69912c588209d6320e9 Reviewed-on: https://go-review.googlesource.com/c/161202Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Iskander Sharipov authored
Emit &runtime.zerobase instead of a call to newobject for allocations of zero sized objects in walk.go. Fixes #29446 Change-Id: I11b67981d55009726a17c2e582c12ce0c258682e Reviewed-on: https://go-review.googlesource.com/c/155840 Run-TryBot: Iskander Sharipov <quasilyte@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com> Reviewed-by: Keith Randall <khr@golang.org>
-
Bryan Heden authored
Original Printf("%d", hi) obviously doesn't produce %!d(string=hi) unless somewhere before this code block you have hi := "hi" somewhere, also this change maintains consistency with the rest of it Change-Id: I40d8cca623176dcad66374ba74e3a1f8f975ac9e GitHub-Last-Rev: 242e9ee6afba7ab22ed2967b0ba01ef18db01ca9 GitHub-Pull-Request: golang/go#30223 Reviewed-on: https://go-review.googlesource.com/c/162541Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Dmitry Mottl authored
This commit adds godoc for Dir.Open function. Change-Id: Ibc3b22f38660a082802e1f868c5cf9d880fc2801 GitHub-Last-Rev: 774cfd7d8cc61989179956e47d51451135b6c203 GitHub-Pull-Request: golang/go#30353 Reviewed-on: https://go-review.googlesource.com/c/163437Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Ian Lance Taylor authored
Change-Id: Icdc980e0dcb5639c49aba5f4f252f33bd207e4fa Reviewed-on: https://go-review.googlesource.com/c/162617 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
Jeremy Jay authored
Change-Id: Ib24778f3172c011e6a39ee65dce8764f3cc911ea GitHub-Last-Rev: 9c617c1e60ac48db67e26e64ce240d3845c0e6ac GitHub-Pull-Request: golang/go#30284 Reviewed-on: https://go-review.googlesource.com/c/162999Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com> Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Leon Klingele authored
Change-Id: I904b8655f21743189814bccf24073b6fbb9fc56d GitHub-Last-Rev: b032c14394c949f9ad7b18d019a3979d38d4e1fb GitHub-Pull-Request: golang/go#29997 Reviewed-on: https://go-review.googlesource.com/c/160421Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Derek Phan authored
Change-Id: Ic93a084311de46461ed3b30f4ac2fe11311e74d7 GitHub-Last-Rev: 32fbd63b10d0fa489406333ff6f8b6708974a73c GitHub-Pull-Request: golang/go#29705 Reviewed-on: https://go-review.googlesource.com/c/157642 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matt Layher <mdlayher@gmail.com>
-
Alessandro Arzilli authored
Avoid name collisions between autogenerated statictmp variables and user defined global variables. Fixes #25113 Change-Id: I023eb42a5c2bd2f5352b046d33363faed87084dc Reviewed-on: https://go-review.googlesource.com/c/142497Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com> Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Austin Clements authored
Back when the linker did code generation after dead code elimination, it had to know that references to runtime.read_tls_fallback could be generated at code generation time (and never appear before that). Now that code generation is done by the compiler, the references to runtime.read_tls_fallback are obvious in the relocations, so the linker no longer needs special knowledge of this symbol. Change-Id: I9813a8478e85a6a13470b2d0528db53fd33fcfdf Reviewed-on: https://go-review.googlesource.com/c/154601 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Marcel van Lohuizen authored
generating frame information in errors will cause this function to no longer be inlined. Updates #29934. Change-Id: I1d7bc11707f1872d7315f627bfb9a12afa41e358 Reviewed-on: https://go-review.googlesource.com/c/161760 Run-TryBot: Marcel van Lohuizen <mpvl@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Tobias Klauser authored
The number of CPUs reported by the hw.ncpu sysctl is twice as high as the actual number of CPUs running on OpenBSD 6.4. with hyperthreading disabled (hw.smt=0). Try hw.cpuonline first and fall back to hw.ncpu in case it fails (which is the case on older OpenBSD before 6.4). Fixes #30127 Change-Id: Id091234b8038cc9f7c40519d039fc1a05437c40d Reviewed-on: https://go-review.googlesource.com/c/161757 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Ggicci authored
The path of the new stripped URL should also be cleaned. Since an empty path may cause unexpected errors in some HTTP handlers, e.g. http.ServeFile. Fixes #30165 Change-Id: Ib44fdce6388b5d62ffbcab5266925ef8f13f26e2 Reviewed-on: https://go-review.googlesource.com/c/161738Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Yasser Abdolmaleki authored
Change-Id: If9332bae87449c94fc14710133614fcd84d2815c Reviewed-on: https://go-review.googlesource.com/c/161726Reviewed-by: Filippo Valsorda <filippo@golang.org>
-
Tobias Klauser authored
This was spotted during the review of the corresponding CL 154179 for x/sys/unix. Let's change it in syscall as well to be consistent. Change-Id: I33f25db1f6ba941b694c2aa276336448cc2b9b51 Reviewed-on: https://go-review.googlesource.com/c/154719 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Tooru Takahashi authored
Change-Id: I31ac8845e72c3027c9a463b1f691f4d2b7913ec0 GitHub-Last-Rev: a6b185cc41d649141e6034b77bcfe53525498ea6 GitHub-Pull-Request: golang/go#29682 Reviewed-on: https://go-review.googlesource.com/c/157518Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
-
Keith Randall authored
They can't be used, so we don't need code generated for them. We just need to report errors in their bodies. The compiler currently has a bunch of special cases sprinkled about for "_" functions, because we never generate a linker symbol for them. Instead, abort compilation earlier so we never reach any of that special-case code. Fixes #29870 Change-Id: I3530c9c353deabcf75ce9072c0b740e992349ee5 Reviewed-on: https://go-review.googlesource.com/c/158845 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
-
Keith Randall authored
var a []int = ... p := &a[0] _ = *p We don't need to nil check on the 3rd line. If the bounds check on the 2nd line passes, we know p is non-nil. We rely on the fact that any cap>0 slice has a non-nil pointer as its pointer to the backing array. This is true for all safely-constructed slices, and I don't see any reason why someone would violate this rule using unsafe. R=go1.13 Fixes #30366 Change-Id: I3ed764fcb72cfe1fbf963d8c1a82e24e3b6dead7 Reviewed-on: https://go-review.googlesource.com/c/163740 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
-
Keith Randall authored
The comment about losing the high bits is incorrect. We now use these nops in places where they really need to be a nop. (Before inline marks, we used them just before deferreturn calls, so they could clobber any caller-saved values.) Change-Id: I433d1ec455aa37dab8fef6eb7d407f3737dbb97f Reviewed-on: https://go-review.googlesource.com/c/158057Reviewed-by: Ilya Tocar <ilya.tocar@intel.com>
-
Alex Brainman authored
syscall.NewCallback mistakenly used MOVL even for windows/amd64, which only returned the lower 32 bits regardless of the architecture. This was due to a copy and paste after porting from windows/386. The code now uses MOVQ, which will return all the available bits. Also adjust TestReturnAfterStackGrowInCallback to ensure we never regress. Fixes #29331 Change-Id: I4f5c8021c33f234c2bb7baa9ef7a6b4870172509 Reviewed-on: https://go-review.googlesource.com/c/159579 Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com> Reviewed-by: Keith Randall <khr@golang.org>
-
Josh Bleecher Snyder authored
...and size initial buffers more accurately. Easy pickings only. More might remain. name old time/op new time/op delta CSSEscaper-8 1.17µs ± 1% 0.80µs ± 2% -31.55% (p=0.000 n=44+48) CSSEscaperNoSpecials-8 205ns ± 2% 204ns ± 3% -0.73% (p=0.014 n=46+49) DecodeCSS-8 438ns ± 2% 436ns ± 2% ~ (p=0.099 n=48+47) DecodeCSSNoSpecials-8 6.11ns ± 3% 5.93ns ± 3% -2.85% (p=0.000 n=50+48) CSSValueFilter-8 149ns ± 0% 145ns ± 0% -2.68% (p=0.000 n=32+35) CSSValueFilterOk-8 238ns ± 2% 234ns ± 2% -1.40% (p=0.000 n=49+47) EscapedExecute-8 2.53µs ± 2% 2.55µs ± 1% +0.87% (p=0.000 n=48+49) HTMLNospaceEscaper-8 1.35µs ± 2% 0.92µs ± 1% -31.74% (p=0.000 n=48+48) HTMLNospaceEscaperNoSpecials-8 278ns ± 2% 263ns ± 2% -5.17% (p=0.000 n=47+49) StripTags-8 778ns ± 2% 786ns ± 1% +0.96% (p=0.000 n=46+47) StripTagsNoSpecials-8 84.2ns ± 1% 84.1ns ± 1% ~ (p=0.300 n=48+48) JSValEscaperWithNum-8 506ns ± 2% 486ns ± 3% -3.82% (p=0.000 n=47+45) JSValEscaperWithStr-8 1.61µs ± 1% 1.64µs ± 1% +1.75% (p=0.000 n=44+49) JSValEscaperWithStrNoSpecials-8 548ns ± 2% 552ns ± 2% +0.78% (p=0.000 n=48+46) JSValEscaperWithObj-8 1.91µs ± 2% 1.87µs ± 1% -2.08% (p=0.000 n=49+47) JSValEscaperWithObjNoSpecials-8 735ns ± 2% 742ns ± 2% +1.01% (p=0.000 n=47+49) JSStrEscaperNoSpecials-8 228ns ± 4% 211ns ± 3% -7.53% (p=0.000 n=50+49) JSStrEscaper-8 1.11µs ± 1% 0.78µs ± 1% -29.94% (p=0.000 n=48+48) JSRegexpEscaperNoSpecials-8 214ns ± 2% 212ns ± 3% -1.12% (p=0.000 n=50+49) JSRegexpEscaper-8 1.17µs ± 0% 0.79µs ± 1% -31.92% (p=0.000 n=48+47) TemplateSpecialTags-8 172µs ± 1% 172µs ± 1% ~ (p=0.976 n=48+47) URLEscaper-8 1.88µs ± 2% 1.87µs ± 2% -0.56% (p=0.001 n=49+49) URLEscaperNoSpecials-8 162ns ± 1% 169ns ± 1% +3.76% (p=0.000 n=49+50) URLNormalizer-8 1.29µs ± 3% 1.29µs ± 2% -0.37% (p=0.041 n=48+48) URLNormalizerNoSpecials-8 185ns ± 1% 186ns ± 1% +0.15% (p=0.013 n=49+49) SrcsetFilter-8 616ns ± 1% 618ns ± 1% +0.36% (p=0.000 n=46+46) SrcsetFilterNoSpecials-8 359ns ± 0% 352ns ± 0% -1.93% (p=0.000 n=40+43) [Geo mean] 560ns 525ns -6.17% name old alloc/op new alloc/op delta CSSEscaper-8 672B ± 0% 336B ± 0% -50.00% (p=0.000 n=50+50) CSSEscaperNoSpecials-8 0.00B 0.00B ~ (all equal) DecodeCSS-8 160B ± 0% 160B ± 0% ~ (all equal) DecodeCSSNoSpecials-8 0.00B 0.00B ~ (all equal) CSSValueFilter-8 96.0B ± 0% 96.0B ± 0% ~ (all equal) CSSValueFilterOk-8 48.0B ± 0% 48.0B ± 0% ~ (all equal) EscapedExecute-8 688B ± 0% 624B ± 0% -9.30% (p=0.000 n=50+50) HTMLNospaceEscaper-8 752B ± 0% 368B ± 0% -51.06% (p=0.000 n=50+50) HTMLNospaceEscaperNoSpecials-8 48.0B ± 0% 32.0B ± 0% -33.33% (p=0.000 n=50+50) StripTags-8 224B ± 0% 224B ± 0% ~ (all equal) StripTagsNoSpecials-8 112B ± 0% 112B ± 0% ~ (all equal) JSValEscaperWithNum-8 96.0B ± 0% 40.0B ± 0% -58.33% (p=0.000 n=50+50) JSValEscaperWithStr-8 384B ± 0% 384B ± 0% ~ (all equal) JSValEscaperWithStrNoSpecials-8 96.0B ± 0% 96.0B ± 0% ~ (all equal) JSValEscaperWithObj-8 448B ± 0% 448B ± 0% ~ (all equal) JSValEscaperWithObjNoSpecials-8 160B ± 0% 160B ± 0% ~ (all equal) JSStrEscaperNoSpecials-8 0.00B 0.00B ~ (all equal) JSStrEscaper-8 672B ± 0% 336B ± 0% -50.00% (p=0.000 n=50+50) JSRegexpEscaperNoSpecials-8 0.00B 0.00B ~ (all equal) JSRegexpEscaper-8 672B ± 0% 336B ± 0% -50.00% (p=0.000 n=50+50) TemplateSpecialTags-8 48.0kB ± 0% 47.9kB ± 0% -0.13% (p=0.000 n=50+48) URLEscaper-8 336B ± 0% 336B ± 0% ~ (all equal) URLEscaperNoSpecials-8 112B ± 0% 112B ± 0% ~ (all equal) URLNormalizer-8 176B ± 0% 176B ± 0% ~ (all equal) URLNormalizerNoSpecials-8 112B ± 0% 112B ± 0% ~ (all equal) SrcsetFilter-8 160B ± 0% 160B ± 0% ~ (all equal) SrcsetFilterNoSpecials-8 160B ± 0% 160B ± 0% ~ (all equal) [Geo mean] 259B 216B -16.60% name old allocs/op new allocs/op delta CSSEscaper-8 4.00 ± 0% 2.00 ± 0% -50.00% (p=0.000 n=50+50) CSSEscaperNoSpecials-8 0.00 0.00 ~ (all equal) DecodeCSS-8 1.00 ± 0% 1.00 ± 0% ~ (all equal) DecodeCSSNoSpecials-8 0.00 0.00 ~ (all equal) CSSValueFilter-8 2.00 ± 0% 2.00 ± 0% ~ (all equal) CSSValueFilterOk-8 3.00 ± 0% 3.00 ± 0% ~ (all equal) EscapedExecute-8 18.0 ± 0% 18.0 ± 0% ~ (all equal) HTMLNospaceEscaper-8 5.00 ± 0% 3.00 ± 0% -40.00% (p=0.000 n=50+50) HTMLNospaceEscaperNoSpecials-8 1.00 ± 0% 1.00 ± 0% ~ (all equal) StripTags-8 3.00 ± 0% 3.00 ± 0% ~ (all equal) StripTagsNoSpecials-8 2.00 ± 0% 2.00 ± 0% ~ (all equal) JSValEscaperWithNum-8 3.00 ± 0% 3.00 ± 0% ~ (all equal) JSValEscaperWithStr-8 2.00 ± 0% 2.00 ± 0% ~ (all equal) JSValEscaperWithStrNoSpecials-8 2.00 ± 0% 2.00 ± 0% ~ (all equal) JSValEscaperWithObj-8 3.00 ± 0% 3.00 ± 0% ~ (all equal) JSValEscaperWithObjNoSpecials-8 3.00 ± 0% 3.00 ± 0% ~ (all equal) JSStrEscaperNoSpecials-8 0.00 0.00 ~ (all equal) JSStrEscaper-8 4.00 ± 0% 2.00 ± 0% -50.00% (p=0.000 n=50+50) JSRegexpEscaperNoSpecials-8 0.00 0.00 ~ (all equal) JSRegexpEscaper-8 4.00 ± 0% 2.00 ± 0% -50.00% (p=0.000 n=50+50) TemplateSpecialTags-8 185 ± 0% 185 ± 0% ~ (all equal) URLEscaper-8 4.00 ± 0% 4.00 ± 0% ~ (all equal) URLEscaperNoSpecials-8 2.00 ± 0% 2.00 ± 0% ~ (all equal) URLNormalizer-8 3.00 ± 0% 3.00 ± 0% ~ (all equal) URLNormalizerNoSpecials-8 2.00 ± 0% 2.00 ± 0% ~ (all equal) SrcsetFilter-8 3.00 ± 0% 3.00 ± 0% ~ (all equal) SrcsetFilterNoSpecials-8 3.00 ± 0% 3.00 ± 0% ~ (all equal) [Geo mean] 3.41 3.05 -10.65% Change-Id: I809ea56495ce1881656af7e24621448ab64b449a Reviewed-on: https://go-review.googlesource.com/c/155919 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Josh Bleecher Snyder authored
As discussed in #29242, this optimization is for a bash-ism. No one writes Go code like this. In this repo, it triggers only in test/fixedbugs/bug425.go and that appears to be accidental. Fixes #29242 Change-Id: I257e6ecc73f24680f7282c6ab28729de4e8b27af Reviewed-on: https://go-review.googlesource.com/c/163728 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Russ Cox authored
Matching fmt, %#b now prints an 0b prefix, and %O prints octal with an 0o prefix. See golang.org/design/19308-number-literals for background. For #19308. For #12711. Change-Id: I139c5a9a1dfae15415621601edfa13c6a5f19cfc Reviewed-on: https://go-review.googlesource.com/c/160250Reviewed-by: Rob Pike <r@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
-
Russ Cox authored
big.Float already had %p for printing hex format, but that format normalizes differently from fmt's %x and ignores precision entirely. This CL adds %x to big.Float, matching fmt's behavior: the verb is spelled 'x' not 'p', the mantissa is normalized to [1, 2), and precision is respected. See golang.org/design/19308-number-literals for background. For #29008. Change-Id: I9c1b9612107094856797e5b0b584c556c1914895 Reviewed-on: https://go-review.googlesource.com/c/160249Reviewed-by: Robert Griesemer <gri@golang.org>
-
Josh Bleecher Snyder authored
Now that checknil has only a single caller, inline it. Passes toolstash-check. Change-Id: I5b13596bef84dd9a3e7f4bff8560903f1e54acfb Reviewed-on: https://go-review.googlesource.com/c/148829 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Daniel Martí authored
First, we can lift the enc.decodeMap nil check out of the loop. Second, we can make it clear to the compiler that 'in := src[0]' doesn't need a bounds check, by making len(src)==0 a single if check that always stops the loop. This is by far the largest speed-up. Third, we can use a dst slice index instead of reslicing dst, which removes work from the loop body. While at it, we can merge the two 'switch dlen' pieces of code, which simplifies the code and doesn't affect performance. name old time/op new time/op delta DecodeString-8 80.2µs ± 0% 67.5µs ± 0% -15.81% (p=0.002 n=6+6) name old speed new speed delta DecodeString-8 163MB/s ± 0% 194MB/s ± 0% +18.78% (p=0.002 n=6+6) Change-Id: Iefeaae94c03453f8760452b1da706a77b3522718 Reviewed-on: https://go-review.googlesource.com/c/154422 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Agniva De Sarker authored
CL 150377 made the change of converting smart quotes to their html escaped entities for ToHTML, and to unicode quotes for ToText. But for ToText, the change converted the quotes in pre-formatted text too. This fixes that behavior to not touch any text in pre-formatted blocks, which also makes the behavior consistent with ToHTML. Fixes #29730 Change-Id: I58e0216cbdbe189d06d82147e5a02b620af14734 Reviewed-on: https://go-review.googlesource.com/c/162922 Run-TryBot: Agniva De Sarker <agniva.quicksilver@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
-
Agniva De Sarker authored
Fixes #30087 Change-Id: Ic6d80f8e6e1831886af8613420b1bd129a1b4850 Reviewed-on: https://go-review.googlesource.com/c/161577Reviewed-by: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Marat Khabibullin authored
Comparing err variable to be not nil is redundant in this case. The code above ensures that it is always not nil. Updates #30208 Change-Id: I0a41601273de36a05d22270a743c0bdedeb1d0bf GitHub-Last-Rev: 372e0fd48f90f33e266fbcdf2ccf87b9f1311c4f GitHub-Pull-Request: golang/go#30213 Reviewed-on: https://go-review.googlesource.com/c/162439Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Michael Fraenkel authored
When looking for the field specified in a composite literal, check that the specified name is actually a field and not a method. Fixes #29855. Change-Id: Id77666e846f925907b1eec64213b1d25af8a2466 Reviewed-on: https://go-review.googlesource.com/c/158938 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
-
Marat Khabibullin authored
The variable err could have nil value when we call err.Error(), because after we check it for nil above we continue the test (t.Errorf doesn't stop the test execution). Updates #30208 Change-Id: Ibcf38698326c69c06068989510311e37806995c6 GitHub-Last-Rev: 3ab20f6d7fe34ed9b777e0894b57166d173de8ca GitHub-Pull-Request: golang/go#30214 Reviewed-on: https://go-review.googlesource.com/c/162457Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Filippo Valsorda authored
Change-Id: I8ea3043fcbaf7a5f73b2a796171a7f1cb3cb3693 Reviewed-on: https://go-review.googlesource.com/c/158818 Run-TryBot: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Josh Bleecher Snyder authored
The special case for ODOTPTR to handle zero-width fields is unneeded. It is an artifact of the old backend, from which time this code dates. The Node to SSA converter is careful to insert a nil check. This is tested in test/nilptr2.go, among other places. Passes toolstash-check. Change-Id: I6c1d99f7ff5abdae9aa08ee047dc088a3fe8dc3c Reviewed-on: https://go-review.googlesource.com/c/148828 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Elias Naur authored
They don't work on Android but will be run if the host has gfortran installed. Change-Id: I983c5695a9e963def90e4f8264fb00077a0c5e53 Reviewed-on: https://go-review.googlesource.com/c/163838 Run-TryBot: Elias Naur <mail@eliasnaur.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-