mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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:
parent
63c1aff60b
commit
ff3a4ef7ec
3 changed files with 13 additions and 8 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue