File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed
core/src/main/java/org/jruby/truffle/nodes/core Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -66,14 +66,9 @@ public int neg(int value) {
66
66
return ExactMath .subtractExact (0 , value );
67
67
}
68
68
69
- @ Specialization (rewriteOn = ArithmeticException .class )
70
- public long negWithLongOverflow (int value ) {
71
- return ExactMath .subtractExact (0 , (long ) value );
72
- }
73
-
74
69
@ Specialization
75
- public BigInteger negWithBigIntegerOverflow (int value ) {
76
- return BigInteger . valueOf ( value ). negate ( );
70
+ public long negWithLongOverflow (int value ) {
71
+ return -(( long ) value );
77
72
}
78
73
79
74
@ Specialization (rewriteOn = ArithmeticException .class )
@@ -215,7 +210,7 @@ public int mul(int a, int b) {
215
210
216
211
@ Specialization
217
212
public long mulWithLong (int a , int b ) {
218
- return ExactMath . multiplyExact (( long ) a , (long ) b ) ;
213
+ return ( long ) a * (long ) b ;
219
214
}
220
215
221
216
@ Specialization
@@ -224,7 +219,7 @@ public double mul(int a, double b) {
224
219
}
225
220
226
221
@ Specialization (rewriteOn = ArithmeticException .class )
227
- public Object mul (long a , long b ) {
222
+ public long mul (long a , long b ) {
228
223
return ExactMath .multiplyExact (a , b );
229
224
}
230
225
You can’t perform that action at this time.
0 commit comments