We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8329b5b + 62d6ac1 commit 9b445b0Copy full SHA for 9b445b0
src/main/java/org/truffleruby/core/numeric/IntegerNodes.java
@@ -106,12 +106,7 @@ public abstract static class AddNode extends BignumCoreMethodNode {
106
107
public abstract Object executeAdd(Object a, Object b);
108
109
- @Specialization(guards = "b == 1", rewriteOn = ArithmeticException.class)
110
- public int incInt(int a, int b) {
111
- return Math.incrementExact(a);
112
- }
113
-
114
- @Specialization(rewriteOn = ArithmeticException.class, replaces = "incInt")
+ @Specialization(rewriteOn = ArithmeticException.class)
115
public int add(int a, int b) {
116
return Math.addExact(a, b);
117
}
0 commit comments