Inlining Exception Handlers
A standard phase template
The global environment; overridden by instantiation in Global.
The global environment; overridden by instantiation in Global.
Names of phases that must run before this phase.
Names of phases that must run before this phase.
Name of the phase that this phase must follow immediately.
Name of the phase that this phase must follow immediately.
Is this component enabled? Default is true.
Is this component enabled? Default is true.
SubComponent are added to a HashSet and two phases are the same if they have the same name
SubComponent are added to a HashSet and two phases are the same if they have the same name
True if this phase runs before all other phases.
True if this phase runs before all other phases. Usually, parser
.
True if this phase is not provided by a plug-in.
True if this phase is not provided by a plug-in.
Create a new phase
Create a new phase
The phase corresponding to this subcomponent in the current compiler run
The phase corresponding to this subcomponent in the current compiler run
The name of the phase
The name of the phase
New flags defined by the phase which are not valid before
New flags defined by the phase which are not valid before
New flags defined by the phase which are not valid until immediately after it
New flags defined by the phase which are not valid until immediately after it
Names of phases required by this component.
Names of phases required by this component. Default is Nil
.
Names of phases that must run after this phase.
Names of phases that must run after this phase. Default is Nil
.
True if this phase runs after all other phases.
True if this phase runs after all other phases. Usually, terminal
.
This optimization phase inlines the exception handlers so that further phases can optimize the code better
will inline the exception handler code to:
Q: How does the inlining work, ICode level? A: if a block contains a THROW(A) instruction AND there is a handler that takes A or a superclass of A we do:
Q: Why do we need to duplicate the handler? A: An exception might be thrown in a method that we invoke in the function and we cannot see that THROW command directly. In order to catch such exceptions, we keep the exception handler in place and duplicate it in order to inline its code.