public class RemoveUnwindPhase
extends org.graalvm.compiler.phases.Phase
exception handling mechanism of Substrate VM is
capable of jumping over methods that have no exception handler registered. That saves us from
emitting boilerplate code in every call site in every method that just forwards the exception
object from the InvokeWithExceptionNode to the UnwindNode.| Constructor and Description |
|---|
RemoveUnwindPhase() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
run(org.graalvm.compiler.nodes.StructuredGraph graph) |
protected void |
walkBack(org.graalvm.compiler.graph.Node n,
org.graalvm.compiler.graph.Node successor,
List<org.graalvm.compiler.nodes.InvokeWithExceptionNode> invocations)
We walk back from the
UnwindNode to an InvokeWithExceptionNode. |
apply, apply, codeSizeIncrease, contractorName, getName, shouldDumpAfterAtBasicLevel, shouldDumpBeforeAtBasicLevelprotected void run(org.graalvm.compiler.nodes.StructuredGraph graph)
run in class org.graalvm.compiler.phases.Phaseprotected void walkBack(org.graalvm.compiler.graph.Node n,
org.graalvm.compiler.graph.Node successor,
List<org.graalvm.compiler.nodes.InvokeWithExceptionNode> invocations)
UnwindNode to an InvokeWithExceptionNode. If the
control flow path only contains nodes white-listed in this method, then we know that we have
an invoke that just forwards the exception to the UnwindNode. Such invokes are
rewritten to a plain InvokeNode, i.e., no exception handler entry is created for such
invokes.