cmd/compile: reduce reliance on implementation details of Mpint

Change-Id: Ifdc41f6c77c83d22b9ad8811280f1e1db051c781
Reviewed-on: https://go-review.googlesource.com/39951
Run-TryBot: Martin Möhrmann <moehrmann@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
Martin Möhrmann 2017-04-07 09:09:17 +02:00 committed by Robert Griesemer
parent 63c1aff60b
commit ff3a4ef7ec
3 changed files with 13 additions and 8 deletions

View file

@ -38,7 +38,7 @@ func newMpflt() *Mpflt {
}
func (a *Mpflt) SetInt(b *Mpint) {
if b.Ovf {
if b.checkOverflow(0) {
// sign doesn't really matter but copy anyway
a.Val.SetInf(b.Val.Sign() < 0)
return