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.
1 parent ac1617a commit 62d6ac1Copy full SHA for 62d6ac1
src/main/java/org/truffleruby/core/numeric/IntegerNodes.java
@@ -107,12 +107,7 @@ public abstract static class AddNode extends BignumCoreMethodNode {
107
108
public abstract Object executeAdd(Object a, Object b);
109
110
- @Specialization(guards = "b == 1", rewriteOn = ArithmeticException.class)
111
- public int incInt(int a, int b) {
112
- return Math.incrementExact(a);
113
- }
114
-
115
- @Specialization(rewriteOn = ArithmeticException.class, replaces = "incInt")
+ @Specialization(rewriteOn = ArithmeticException.class)
116
public int add(int a, int b) {
117
return Math.addExact(a, b);
118
}
0 commit comments