< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/StandardGraphBuilderPlugins.java

Print this page

        

*** 558,581 **** throw GraalError.shouldNotReachHere("Unknown integer exact operation."); } } private static boolean createIntegerExactOperation(GraphBuilderContext b, JavaKind kind, ValueNode x, ValueNode y, IntegerExactOp op) { - if (x.isConstant() && y.isConstant()) { - b.addPush(kind, createIntegerExactArithmeticNode(x, y, null, op)); - return true; - } else { BytecodeExceptionKind exceptionKind = kind == JavaKind.Int ? BytecodeExceptionKind.INTEGER_EXACT_OVERFLOW : BytecodeExceptionKind.LONG_EXACT_OVERFLOW; AbstractBeginNode exceptionEdge = b.genExplicitExceptionEdge(exceptionKind); if (exceptionEdge != null) { IntegerExactArithmeticSplitNode split = b.addPush(kind, createIntegerExactSplit(x, y, exceptionEdge, op)); split.setNext(b.add(new BeginNode())); return true; } return false; } - } private static void registerMathPlugins(InvocationPlugins plugins, boolean allowDeoptimization) { Registration r = new Registration(plugins, Math.class); if (allowDeoptimization) { for (JavaKind kind : new JavaKind[]{JavaKind.Int, JavaKind.Long}) { --- 558,576 ----
< prev index next >