@Override @SuppressWarnings("deprecation") protected void run(StructuredGraph graph) { for (Node n : graph.getNodes()) { if (n instanceof InvokeWithExceptionNode) { InvokeWithExceptionNode invoke = (InvokeWithExceptionNode) n; ExceptionObjectNode exceptionObject = (ExceptionObjectNode) invoke.exceptionEdge(); FixedNode originalNext = exceptionObject.next(); if (!(originalNext instanceof DeoptimizeNode) && invoke.callTarget().targetMethod() != null) { TruffleBoundary truffleBoundary = invoke.callTarget().targetMethod().getAnnotation(TruffleBoundary.class); if (truffleBoundary != null) { if (!truffleBoundary.throwsControlFlowException() && truffleBoundary.transferToInterpreterOnException()) { addDeoptimizeNode(graph, originalNext); } } } } } }
FixedNode exceptionSux = exceptionEdge.next(); graph.addBeforeFixed(exceptionSux, exceptionMerge); exceptionObjectPhi = graph.addWithoutUnique(new ValuePhiNode(StampFactory.forKind(JavaKind.Object), exceptionMerge));
ExceptionObjectNode obj = (ExceptionObjectNode) invokeWithException.exceptionEdge(); obj.replaceAtUsages(unwindNode.exception()); Node n = obj.next(); obj.setNext(null); unwindNode.replaceAndDelete(n);
writeOrderId(invokeWithExcpetion.exceptionEdge(), nodeOrder); writeOrderId(exceptionEdge.stateAfter(), nodeOrder); writeOrderId(exceptionEdge.next(), nodeOrder);