Commit 01661612 authored by Alberto Donizetti's avatar Alberto Donizetti Committed by Matthew Dempsky

cmd/compile: update error messages in Mpint, Mpflt methods

CL 20909 gave Mpint methods nice go-like names, but it
didn't update the names in the error strings. Fix them.

Same for a couple of Mpflt methods.

Change-Id: I9c99653d4b922e32fd5ba18aba768a589a4c7869
Reviewed-on: https://go-review.googlesource.com/30091Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 962dc4b4
...@@ -128,7 +128,7 @@ func (a *Mpflt) Float64() float64 { ...@@ -128,7 +128,7 @@ func (a *Mpflt) Float64() float64 {
// check for overflow // check for overflow
if math.IsInf(x, 0) && nsavederrors+nerrors == 0 { if math.IsInf(x, 0) && nsavederrors+nerrors == 0 {
yyerror("mpgetflt ovf") yyerror("ovf in Mpflt Float64")
} }
return x + 0 // avoid -0 (should not be needed, but be conservative) return x + 0 // avoid -0 (should not be needed, but be conservative)
...@@ -140,7 +140,7 @@ func (a *Mpflt) Float32() float64 { ...@@ -140,7 +140,7 @@ func (a *Mpflt) Float32() float64 {
// check for overflow // check for overflow
if math.IsInf(x, 0) && nsavederrors+nerrors == 0 { if math.IsInf(x, 0) && nsavederrors+nerrors == 0 {
yyerror("mpgetflt32 ovf") yyerror("ovf in Mpflt Float32")
} }
return x + 0 // avoid -0 (should not be needed, but be conservative) return x + 0 // avoid -0 (should not be needed, but be conservative)
......
...@@ -71,7 +71,7 @@ func (a *Mpint) SetFloat(b *Mpflt) int { ...@@ -71,7 +71,7 @@ func (a *Mpint) SetFloat(b *Mpflt) int {
func (a *Mpint) Add(b *Mpint) { func (a *Mpint) Add(b *Mpint) {
if a.Ovf || b.Ovf { if a.Ovf || b.Ovf {
if nsavederrors+nerrors == 0 { if nsavederrors+nerrors == 0 {
yyerror("ovf in mpaddfixfix") yyerror("ovf in Mpint Add")
} }
a.SetOverflow() a.SetOverflow()
return return
...@@ -87,7 +87,7 @@ func (a *Mpint) Add(b *Mpint) { ...@@ -87,7 +87,7 @@ func (a *Mpint) Add(b *Mpint) {
func (a *Mpint) Sub(b *Mpint) { func (a *Mpint) Sub(b *Mpint) {
if a.Ovf || b.Ovf { if a.Ovf || b.Ovf {
if nsavederrors+nerrors == 0 { if nsavederrors+nerrors == 0 {
yyerror("ovf in mpsubfixfix") yyerror("ovf in Mpint Sub")
} }
a.SetOverflow() a.SetOverflow()
return return
...@@ -103,7 +103,7 @@ func (a *Mpint) Sub(b *Mpint) { ...@@ -103,7 +103,7 @@ func (a *Mpint) Sub(b *Mpint) {
func (a *Mpint) Mul(b *Mpint) { func (a *Mpint) Mul(b *Mpint) {
if a.Ovf || b.Ovf { if a.Ovf || b.Ovf {
if nsavederrors+nerrors == 0 { if nsavederrors+nerrors == 0 {
yyerror("ovf in mpmulfixfix") yyerror("ovf in Mpint Mul")
} }
a.SetOverflow() a.SetOverflow()
return return
...@@ -119,7 +119,7 @@ func (a *Mpint) Mul(b *Mpint) { ...@@ -119,7 +119,7 @@ func (a *Mpint) Mul(b *Mpint) {
func (a *Mpint) Quo(b *Mpint) { func (a *Mpint) Quo(b *Mpint) {
if a.Ovf || b.Ovf { if a.Ovf || b.Ovf {
if nsavederrors+nerrors == 0 { if nsavederrors+nerrors == 0 {
yyerror("ovf in mpdivfixfix") yyerror("ovf in Mpint Quo")
} }
a.SetOverflow() a.SetOverflow()
return return
...@@ -136,7 +136,7 @@ func (a *Mpint) Quo(b *Mpint) { ...@@ -136,7 +136,7 @@ func (a *Mpint) Quo(b *Mpint) {
func (a *Mpint) Rem(b *Mpint) { func (a *Mpint) Rem(b *Mpint) {
if a.Ovf || b.Ovf { if a.Ovf || b.Ovf {
if nsavederrors+nerrors == 0 { if nsavederrors+nerrors == 0 {
yyerror("ovf in mpmodfixfix") yyerror("ovf in Mpint Rem")
} }
a.SetOverflow() a.SetOverflow()
return return
...@@ -153,7 +153,7 @@ func (a *Mpint) Rem(b *Mpint) { ...@@ -153,7 +153,7 @@ func (a *Mpint) Rem(b *Mpint) {
func (a *Mpint) Or(b *Mpint) { func (a *Mpint) Or(b *Mpint) {
if a.Ovf || b.Ovf { if a.Ovf || b.Ovf {
if nsavederrors+nerrors == 0 { if nsavederrors+nerrors == 0 {
yyerror("ovf in mporfixfix") yyerror("ovf in Mpint Or")
} }
a.SetOverflow() a.SetOverflow()
return return
...@@ -165,7 +165,7 @@ func (a *Mpint) Or(b *Mpint) { ...@@ -165,7 +165,7 @@ func (a *Mpint) Or(b *Mpint) {
func (a *Mpint) And(b *Mpint) { func (a *Mpint) And(b *Mpint) {
if a.Ovf || b.Ovf { if a.Ovf || b.Ovf {
if nsavederrors+nerrors == 0 { if nsavederrors+nerrors == 0 {
yyerror("ovf in mpandfixfix") yyerror("ovf in Mpint And")
} }
a.SetOverflow() a.SetOverflow()
return return
...@@ -177,7 +177,7 @@ func (a *Mpint) And(b *Mpint) { ...@@ -177,7 +177,7 @@ func (a *Mpint) And(b *Mpint) {
func (a *Mpint) AndNot(b *Mpint) { func (a *Mpint) AndNot(b *Mpint) {
if a.Ovf || b.Ovf { if a.Ovf || b.Ovf {
if nsavederrors+nerrors == 0 { if nsavederrors+nerrors == 0 {
yyerror("ovf in mpandnotfixfix") yyerror("ovf in Mpint AndNot")
} }
a.SetOverflow() a.SetOverflow()
return return
...@@ -189,7 +189,7 @@ func (a *Mpint) AndNot(b *Mpint) { ...@@ -189,7 +189,7 @@ func (a *Mpint) AndNot(b *Mpint) {
func (a *Mpint) Xor(b *Mpint) { func (a *Mpint) Xor(b *Mpint) {
if a.Ovf || b.Ovf { if a.Ovf || b.Ovf {
if nsavederrors+nerrors == 0 { if nsavederrors+nerrors == 0 {
yyerror("ovf in mpxorfixfix") yyerror("ovf in Mpint Xor")
} }
a.SetOverflow() a.SetOverflow()
return return
...@@ -201,7 +201,7 @@ func (a *Mpint) Xor(b *Mpint) { ...@@ -201,7 +201,7 @@ func (a *Mpint) Xor(b *Mpint) {
func (a *Mpint) Lsh(b *Mpint) { func (a *Mpint) Lsh(b *Mpint) {
if a.Ovf || b.Ovf { if a.Ovf || b.Ovf {
if nsavederrors+nerrors == 0 { if nsavederrors+nerrors == 0 {
yyerror("ovf in mplshfixfix") yyerror("ovf in Mpint Lsh")
} }
a.SetOverflow() a.SetOverflow()
return return
...@@ -228,7 +228,7 @@ func (a *Mpint) Lsh(b *Mpint) { ...@@ -228,7 +228,7 @@ func (a *Mpint) Lsh(b *Mpint) {
func (a *Mpint) Rsh(b *Mpint) { func (a *Mpint) Rsh(b *Mpint) {
if a.Ovf || b.Ovf { if a.Ovf || b.Ovf {
if nsavederrors+nerrors == 0 { if nsavederrors+nerrors == 0 {
yyerror("ovf in mprshfixfix") yyerror("ovf in Mpint Rsh")
} }
a.SetOverflow() a.SetOverflow()
return return
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment