Skip to content
Snippets Groups Projects
Commit 29851d07 authored by Tomas Stupka's avatar Tomas Stupka
Browse files

use j.l.Math instead of deprecated c.o.t.api.ExactMath in...

use j.l.Math instead of deprecated c.o.t.api.ExactMath in c.o.t.r.nodes.builtin.base.Strtoi.doStrtio
parent c9d45cdb
No related branches found
No related tags found
No related merge requests found
......@@ -30,7 +30,6 @@ import static com.oracle.truffle.r.nodes.builtin.CastBuilder.Predef.stringValue;
import static com.oracle.truffle.r.runtime.builtins.RBehavior.PURE;
import static com.oracle.truffle.r.runtime.builtins.RBuiltinKind.INTERNAL;
import com.oracle.truffle.api.ExactMath;
import com.oracle.truffle.api.dsl.Cached;
import com.oracle.truffle.api.dsl.Specialization;
import com.oracle.truffle.api.profiles.ConditionProfile;
......@@ -127,7 +126,7 @@ public abstract class Strtoi extends RBuiltinNode.Arg2 {
}
}
try {
dataValue = ExactMath.addExact(ExactMath.multiplyExact(dataValue, base), digit);
dataValue = Math.addExact(Math.multiplyExact(dataValue, base), digit);
} catch (ArithmeticException e) {
dataValue = RRuntime.INT_NA;
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment