1. 10 Mar, 2017 4 commits
    • Josh Bleecher Snyder's avatar
      cmd/compile: add 32 bit (AddPtr (Const)) rule · 4b3a55ec
      Josh Bleecher Snyder authored
      This triggers about 50k times during 32 bit make.bash.
      
      Change-Id: Ia0c2b1a8246b92173b4b0d94a4037626f76b6e73
      Reviewed-on: https://go-review.googlesource.com/37998
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
      4b3a55ec
    • Josh Bleecher Snyder's avatar
      cmd/compile: add OpOffPtr [c] SP to constant cache · 3dcfce8d
      Josh Bleecher Snyder authored
      They accounted for almost 30% of all CSE'd values.
      
      By never creating the duplicates in the first place,
      we reduce the high water mark of Value IDs,
      which in turn makes all SSA phases cheaper,
      particularly regalloc.
      
      name       old time/op     new time/op     delta
      Template       200ms ± 3%      198ms ± 4%  -0.87%  (p=0.016 n=50+49)
      Unicode       86.9ms ± 2%     85.5ms ± 3%  -1.56%  (p=0.000 n=49+50)
      GoTypes        553ms ± 4%      551ms ± 4%    ~     (p=0.183 n=50+49)
      SSA            3.97s ± 3%      3.93s ± 2%  -1.06%  (p=0.000 n=48+48)
      Flate          124ms ± 4%      124ms ± 3%    ~     (p=0.545 n=48+50)
      GoParser       146ms ± 4%      146ms ± 4%    ~     (p=0.810 n=49+49)
      Reflect        357ms ± 3%      355ms ± 3%  -0.59%  (p=0.049 n=50+48)
      Tar            106ms ± 4%      107ms ± 5%    ~     (p=0.454 n=49+50)
      XML            203ms ± 4%      203ms ± 4%    ~     (p=0.726 n=48+50)
      
      name       old user-ns/op  new user-ns/op  delta
      Template        237M ± 3%       235M ± 4%    ~     (p=0.208 n=47+48)
      Unicode         111M ± 4%       108M ± 9%  -2.50%  (p=0.000 n=47+50)
      GoTypes         736M ± 5%       729M ± 4%  -0.95%  (p=0.017 n=50+46)
      SSA            5.73G ± 4%      5.74G ± 4%    ~     (p=0.765 n=50+50)
      Flate           150M ± 5%       148M ± 6%  -0.89%  (p=0.045 n=48+47)
      GoParser        180M ± 5%       178M ± 7%  -1.34%  (p=0.012 n=50+50)
      Reflect         450M ± 4%       444M ± 4%  -1.40%  (p=0.000 n=50+49)
      Tar             124M ± 7%       123M ± 7%    ~     (p=0.092 n=50+50)
      XML             248M ± 6%       245M ± 5%    ~     (p=0.057 n=50+50)
      
      name       old alloc/op    new alloc/op    delta
      Template      39.4MB ± 0%     39.3MB ± 0%  -0.37%  (p=0.000 n=50+50)
      Unicode       30.9MB ± 0%     30.9MB ± 0%  -0.27%  (p=0.000 n=48+50)
      GoTypes        114MB ± 0%      113MB ± 0%  -1.03%  (p=0.000 n=50+49)
      SSA            882MB ± 0%      865MB ± 0%  -1.95%  (p=0.000 n=49+49)
      Flate         25.8MB ± 0%     25.7MB ± 0%  -0.21%  (p=0.000 n=50+50)
      GoParser      31.7MB ± 0%     31.6MB ± 0%  -0.33%  (p=0.000 n=50+50)
      Reflect       79.7MB ± 0%     79.3MB ± 0%  -0.49%  (p=0.000 n=44+49)
      Tar           27.2MB ± 0%     27.1MB ± 0%  -0.31%  (p=0.000 n=50+50)
      XML           42.7MB ± 0%     42.3MB ± 0%  -1.05%  (p=0.000 n=48+49)
      
      name       old allocs/op   new allocs/op   delta
      Template        379k ± 1%       380k ± 1%  +0.26%  (p=0.000 n=50+50)
      Unicode         324k ± 1%       324k ± 1%    ~     (p=0.964 n=49+50)
      GoTypes        1.14M ± 0%      1.15M ± 0%  +0.14%  (p=0.000 n=50+49)
      SSA            7.89M ± 0%      7.89M ± 0%  -0.05%  (p=0.000 n=49+49)
      Flate           240k ± 1%       241k ± 1%  +0.27%  (p=0.001 n=50+50)
      GoParser        310k ± 1%       311k ± 1%  +0.48%  (p=0.000 n=50+49)
      Reflect        1.00M ± 0%      1.00M ± 0%  +0.17%  (p=0.000 n=48+50)
      Tar             254k ± 1%       255k ± 1%  +0.23%  (p=0.005 n=50+50)
      XML             395k ± 1%       395k ± 1%  +0.19%  (p=0.002 n=49+47)
      
      Change-Id: Iaa8f5f37e23bd81983409f7359f9dcd4dfe2961f
      Reviewed-on: https://go-review.googlesource.com/38003
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
      3dcfce8d
    • Josh Bleecher Snyder's avatar
      cmd/compile: allow earlier GC of freed constant value · d11a2184
      Josh Bleecher Snyder authored
      Minor fix, because it's the right thing to do.
      No significant impact.
      
      Change-Id: I2138285d397494daa9a88c414149c2a7860edd7e
      Reviewed-on: https://go-review.googlesource.com/38001
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      d11a2184
    • Josh Bleecher Snyder's avatar
      cmd/compile: fix SSA type for first runtime call arg/result · 678f35b6
      Josh Bleecher Snyder authored
      CLs 37254 and 37869 contained similar fixes.
      
      Change-Id: I0cbf01c691b54d82acef398489df6e9c89ebb83f
      Reviewed-on: https://go-review.googlesource.com/38000
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      Reviewed-by: default avatarMichael Munday <munday@ca.ibm.com>
      678f35b6
  2. 09 Mar, 2017 14 commits
  3. 08 Mar, 2017 11 commits
    • Elias Naur's avatar
      go/internal/srcimporter: skip tests on iOS · 3a1271da
      Elias Naur authored
      The iOS test harness only includes the current test directory in its
      app bundles, but the tests need access to all source code.
      
      Change-Id: I8a902b183bc2745b4fbfffef867002d573abb1f5
      Reviewed-on: https://go-review.googlesource.com/37961
      Run-TryBot: Elias Naur <elias.naur@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      3a1271da
    • Josh Bleecher Snyder's avatar
      runtime: optimize slicebytestostring · 23be7289
      Josh Bleecher Snyder authored
      Inline rawstringtmp and simplify.
      Use memmove instead of copy.
      
      name                     old time/op  new time/op  delta
      SliceByteToString/1-8    19.4ns ± 2%  14.1ns ± 1%  -27.04%  (p=0.000 n=20+17)
      SliceByteToString/2-8    20.8ns ± 2%  15.5ns ± 2%  -25.46%  (p=0.000 n=20+20)
      SliceByteToString/4-8    20.7ns ± 1%  14.9ns ± 1%  -28.30%  (p=0.000 n=20+20)
      SliceByteToString/8-8    23.2ns ± 1%  17.1ns ± 1%  -26.22%  (p=0.000 n=19+19)
      SliceByteToString/16-8   29.4ns ± 1%  23.6ns ± 1%  -19.76%  (p=0.000 n=17+20)
      SliceByteToString/32-8   31.4ns ± 1%  26.0ns ± 1%  -17.11%  (p=0.000 n=16+19)
      SliceByteToString/64-8   36.1ns ± 0%  30.0ns ± 0%  -16.96%  (p=0.000 n=16+16)
      SliceByteToString/128-8  46.9ns ± 0%  38.9ns ± 0%  -17.15%  (p=0.000 n=17+19)
      
      Change-Id: I422e688830e4a9bd21897d1f74964625b735f436
      Reviewed-on: https://go-review.googlesource.com/37791
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarMarvin Stenger <marvin.stenger94@gmail.com>
      Reviewed-by: default avatarKeith Randall <khr@golang.org>
      23be7289
    • Elias Naur's avatar
      os/user: fake Current on Android · 228438e0
      Elias Naur authored
      On Android devices where the stub fallback for Current fails to
      extract a User from the environment, return a dummy fallback instead
      of failing.
      
      While we're here, use / instead of /home/nacl for the NaCL fallback.
      
      Hopefully fixes the Android builder.
      
      Change-Id: Ia29304fbc224ee5f9c0f4e706d1756f765a7eae5
      Reviewed-on: https://go-review.googlesource.com/37960
      Run-TryBot: Elias Naur <elias.naur@gmail.com>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      228438e0
    • Bryan C. Mills's avatar
      runtime: poll libc to deliver signals under TSAN · 29edf0f9
      Bryan C. Mills authored
      fixes #18717
      
      Change-Id: I7244463d2e7489e0b0fe3b74c4b782e71210beb2
      Reviewed-on: https://go-review.googlesource.com/35494
      Run-TryBot: Bryan Mills <bcmills@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      29edf0f9
    • David Chase's avatar
      cmd/compile: check loop rescheduling with stack bound, not counter · d71f36b5
      David Chase authored
      After benchmarking with a compiler modified to have better
      spill location, it became clear that this method of checking
      was actually faster on (at least) two different architectures
      (ppc64 and amd64) and it also provides more timely interruption
      of loops.
      
      This change adds a modified FOR loop node "FORUNTIL" that
      checks after executing the loop body instead of before (i.e.,
      always at least once).  This ensures that a pointer past the
      end of a slice or array is not made visible to the garbage
      collector.
      
      Without the rescheduling checks inserted, the restructured
      loop from this  change apparently provides a 1% geomean
      improvement on PPC64 running the go1 benchmarks; the
      improvement on AMD64 is only 0.12%.
      
      Inserting the rescheduling check exposed some peculiar bug
      with the ssa test code for s390x; this was updated based on
      initial code actually generated for GOARCH=s390x to use
      appropriate OpArg, OpAddr, and OpVarDef.
      
      NaCl is disabled in testing.
      
      Change-Id: Ieafaa9a61d2a583ad00968110ef3e7a441abca50
      Reviewed-on: https://go-review.googlesource.com/36206
      Run-TryBot: David Chase <drchase@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
      d71f36b5
    • Kevin Burke's avatar
      database/sql: fix spelling mistake in tests · 6fbedc1a
      Kevin Burke authored
      Change-Id: I04e150d4e4123aad2f277e5c6e9f2abd15628a28
      Reviewed-on: https://go-review.googlesource.com/37941Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      6fbedc1a
    • Robert Griesemer's avatar
      cmd/compile: fix recorded export data position info · 2123a6c6
      Robert Griesemer authored
      The position information recorded now consists of the line-
      directive relative filename and line number. It would be
      relatively easy to also encode absolute position information
      as necessary (by serializing src.PosBase data).
      
      For example, given $GOROOT/src/tmp/x.go:
      
      	package p
      
      	const C0 = 0
      
      	//line c.go:10
      	const C1 = 1
      
      	//line t.go:20
      	type T int
      
      	//line v.go:30
      	var V T
      
      	//line f.go:40
      	func F() {}
      
      The recorded positions for the exported entities are:
      
      	C0 $GOROOT/src/tmp/x.go 3
      	C1 c.go 10
      	T t.go 20
      	V v.go 30
      	F f.go 40
      
      Fix verified by manual inspection. There's currently no easy way
      to test this, but it will eventually be tested when we fix #7311.
      
      Fixes #19391.
      
      Change-Id: I6269067ea58358250fe6dd1f73bdf9e5d2adfe3d
      Reviewed-on: https://go-review.googlesource.com/37936Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
      2123a6c6
    • Sarah Adams's avatar
      database/sql: proper prepared statement support in transactions · 82e1732f
      Sarah Adams authored
      This change was originally written by Marko Tiikkaja <marko@joh.to>.
      https://go-review.googlesource.com/#/c/2035/
      
      Previously *Tx.Stmt always prepared a new statement, even if an
      existing one was available on the connection the transaction was on.
      Now we first see if the statement is already available on the
      connection and only prepare if it isn't. Additionally, when we do
      need to prepare one, we store it in the parent *Stmt to allow it to be
      later reused by other calls to *Tx.Stmt on that statement or just
      straight up by *Stmt.Exec et al.
      
      To make sure that the statement doesn't disappear unexpectedly, we
      record a dependency from the statement returned by *Tx.Stmt to the
      *Stmt it came from and set a new field, parentStmt, to point to the
      originating *Stmt. When the transaction's *Stmt is closed, we remove
      the dependency. This way the "parent" *Stmt can be closed by the user
      without her having to know whether any transactions are still using it
      or not.
      
      Fixes #15606
      
      Change-Id: I41b5056847e117ac61130328b0239d1e000a4a08
      Reviewed-on: https://go-review.googlesource.com/35476
      Run-TryBot: Daniel Theophanes <kardianos@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarDaniel Theophanes <kardianos@gmail.com>
      82e1732f
    • Johan Brandhorst's avatar
      net/http: use httptest.Server Client in tests · 3b988eb6
      Johan Brandhorst authored
      After merging https://go-review.googlesource.com/c/34639/,
      it was pointed out to me that a lot of tests under net/http
      could use the new functionality to simplify and unify testing.
      
      Using the httptest.Server provided Client removes the need to
      call CloseIdleConnections() on all Transports created, as it
      is automatically called on the Transport associated with the
      client when Server.Close() is called.
      
      Change the transport used by the non-TLS
      httptest.Server to a new *http.Transport rather than using
      http.DefaultTransport implicitly. The TLS version already
      used its own *http.Transport. This change is to prevent
      concurrency problems with using DefaultTransport implicitly
      across several httptest.Server's.
      
      Add tests to ensure the httptest.Server.Client().Transport
      RoundTripper interface is implemented by a *http.Transport,
      as is now assumed across large parts of net/http tests.
      
      Change-Id: I9f9d15f59d72893deead5678d314388718c91821
      Reviewed-on: https://go-review.googlesource.com/37771
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      3b988eb6
    • Hiroshi Ioka's avatar
      net/mail: fix wrong error message in consumePhrase · 2bd6360e
      Hiroshi Ioka authored
      Fixes #19415
      
      Change-Id: I6414f82e42bd09f1793156befce326aeac919ea2
      Reviewed-on: https://go-review.googlesource.com/37911Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      2bd6360e
    • Russ Cox's avatar
      runtime/pprof: add GNU build IDs to Mappings recorded from /proc/self/maps · c797256a
      Russ Cox authored
      This helps systems that maintain an external database mapping
      build ID to symbol information for the given binary, especially
      in the case where /proc/self/maps lists many different files
      (for example, many shared libraries).
      
      Avoid importing debug/elf to avoid dragging in that whole
      package (and its dependencies like debug/dwarf) into the
      build of every program that generates a profile.
      
      Fixes #19431.
      
      Change-Id: I6d4362a79fe23e4f1726dffb0661d20bb57f766f
      Reviewed-on: https://go-review.googlesource.com/37855
      Run-TryBot: Russ Cox <rsc@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      c797256a
  4. 07 Mar, 2017 11 commits
    • Robert Griesemer's avatar
      cmd/internal/src: fix Pos.String() for positions after line directives · 752d7bad
      Robert Griesemer authored
      The old code simply printed the position of the line directive in
      square brackets for a position modified by a line directive. Now
      we print the corresponding actual source file position instead.
      
      Fixes #19392.
      
      Change-Id: I933f3e435d03a6ee8269df36ae35f9202b7b2e76
      Reviewed-on: https://go-review.googlesource.com/37932
      Run-TryBot: Robert Griesemer <gri@golang.org>
      Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      752d7bad
    • Mikio Hara's avatar
      internal/poll: code cleanup · 38409f5f
      Mikio Hara authored
      This change adds missing docs, collapses single-line import paths,
      removes unsed method placeholders and renames str.go to strconv.go.
      
      Change-Id: I2d155c838935cd8427abd142a462ff4c56829703
      Reviewed-on: https://go-review.googlesource.com/37814
      Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      38409f5f
    • Austin Clements's avatar
      runtime: join selectgo and selectgoImpl · d50f892a
      Austin Clements authored
      Currently selectgo is just a wrapper around selectgoImpl. This keeps
      the hard-coded frame skip counts for tracing the same between the
      channel implementation and the select implementation.
      
      However, this is fragile and confusing, so pass a skip parameter to
      send and recv, join selectgo and selectgoImpl into one function, and
      use decrease all of the skips in selectgo by one.
      
      Change-Id: I11b8cbb7d805b55f5dc6ab4875ac7dde79412ff2
      Reviewed-on: https://go-review.googlesource.com/37860
      Run-TryBot: Austin Clements <austin@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
      d50f892a
    • Matthew Dempsky's avatar
      cmd/compile: refactor portable SSA Op handling · 5e4a9583
      Matthew Dempsky authored
      Several SSA ops will always behave identically regardless of target
      architecture, so handle those within gc/ssa.go instead.
      
      Passes toolstash-check -all.
      
      Change-Id: I54d514e80ab86723e44332a5a38e3054cbca8c5d
      Reviewed-on: https://go-review.googlesource.com/37931
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      Reviewed-by: default avatarKeith Randall <khr@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      5e4a9583
    • Austin Clements's avatar
      runtime: print SP/FP on bad pointer crashes · b992c264
      Austin Clements authored
      If the bad pointer is on a stack, this makes it possible to find the
      frame containing the bad pointer.
      
      Change-Id: Ieda44e054aa9ebf22d15d184457c7610b056dded
      Reviewed-on: https://go-review.googlesource.com/37858
      Run-TryBot: Austin Clements <austin@google.com>
      Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      Reviewed-by: default avatarKeith Randall <khr@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      b992c264
    • Austin Clements's avatar
      runtime: honor GOTRACEBACK=crash even if _g_.m.traceback != 0 · caa7dacf
      Austin Clements authored
      Change-Id: I6de1ef8f67bde044b8706c01e98400e266e1f8f0
      Reviewed-on: https://go-review.googlesource.com/37857
      Run-TryBot: Austin Clements <austin@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarKeith Randall <khr@golang.org>
      caa7dacf
    • Matthew Dempsky's avatar
      cmd/compile, runtime: simplify multiway select implementation · c310c688
      Matthew Dempsky authored
      This commit reworks multiway select statements to use normal control
      flow primitives instead of the previous setjmp/longjmp-like behavior.
      This simplifies liveness analysis and should prevent issues around
      "returns twice" function calls within SSA passes.
      
      test/live.go is updated because liveness analysis's CFG is more
      representative of actual control flow. The case bodies are the only
      real successors of the selectgo call, but previously the selectsend,
      selectrecv, etc. calls were included in the successors list too.
      
      Updates #19331.
      
      Change-Id: I7f879b103a4b85e62fc36a270d812f54c0aa3e83
      Reviewed-on: https://go-review.googlesource.com/37661
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarKeith Randall <khr@golang.org>
      c310c688
    • Daniel Martí's avatar
      runtime/pprof: actually use tag parameter · 5ed95236
      Daniel Martí authored
      It's only ever called with the value it was using, but the code was
      counterintuitive. Use the parameter instead, like the other funcs near
      it.
      
      Found by github.com/mvdan/unparam.
      
      Change-Id: I45855e11d749380b9b2a28e6dd1d5dedf119a19b
      Reviewed-on: https://go-review.googlesource.com/37893Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      Run-TryBot: Russ Cox <rsc@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      5ed95236
    • Elias Naur's avatar
      os/user: use the stubs fallback for Android · 143fd8ef
      Elias Naur authored
      Using the stubs, user.Current will no longer fail on Android, fixing
      the os/exec.TestCredentialNoSetGroups test.
      
      Change-Id: I8b9842aa6704c0cde383c549a614bab0a0ed7695
      Reviewed-on: https://go-review.googlesource.com/37765
      Run-TryBot: Elias Naur <elias.naur@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      143fd8ef
    • Alberto Donizetti's avatar
      cmd/compile: fix misleading "truncated to int" messages · e99dafc4
      Alberto Donizetti authored
      When defining an int const, the compiler tries to cast the RHS
      expression to int. The cast may fail for three reasons:
      
        1. expr is an integer constant that overflows int
        2. expr is a floating point constant
        3. expr is a complex constant, or not a number
      
      In the second case, in order to print a sensible error message, we
      must distinguish between a floating point constant that should be
      included in the error message and a floating point constant that
      cannot be reasonably formatted for inclusion in an error message.
      
      For example, in:
      
        const a int = 1.1
        const b int = 1 + 1e-100
      
      a is in the former group, while b is in the latter, since the floating
      point value resulting from the evaluation of the rhs of the assignment
      (1.00...01) is too long to be fully printed in an error message, and
      cannot be shortened without making the error message misleading
      (rounding or truncating it would result in a "1", which looks like an
      integer constant, and it makes little sense in an error message about
      an invalid floating point expression).
      
      To fix this problem, we try to format the float value using fconv
      (which is used by the error reporting mechanism to format float
      arguments), and then parse the resulting string back to a
      big.Float. If the result is an integer, we assume that expr is a float
      value that cannot be reasonably be formatted as a string, and we emit
      an error message that does not include its string representation.
      
      Also, change the error message for overflows to a more conservative
      "integer too large", which does not mention overflows that are only
      caused by an internal implementation restriction.
      
      Also, change (*Mpint) SetFloat so that it returns a bool (instead of
      0/-1 for success/failure).
      
      Fixes #11371
      
      Change-Id: Ibbc73e2ed2eaf41f07827b0649d0eb637150ecaa
      Reviewed-on: https://go-review.googlesource.com/35411
      Run-TryBot: Alberto Donizetti <alb.donizetti@gmail.com>
      Run-TryBot: Robert Griesemer <gri@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarRobert Griesemer <gri@golang.org>
      e99dafc4
    • Matthew Dempsky's avatar
      cmd/compile/internal/gc: skip autotmp vars in gc again · 527f3518
      Matthew Dempsky authored
      Instead of skipping them based on string matching much later in the
      compilation process, skip them up front using the proper API.
      
      Passes toolstash-check.
      
      Change-Id: Ibd4c0448a0701ba0de3235d4689ef300235fa1d9
      Reviewed-on: https://go-review.googlesource.com/37930
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      527f3518