public abstract class ExceptionDeliverer extends Object
The exception delivery implementation is specific to the compiler that generated the method's machine instructions.
Note that the "deliverException" and "unwindStackFrame" methods of this class will be called in an environment that does not permit garbage collection: see VM.disableGC(). We must do this because some of the parameters to these methods are raw machine addresses. They are not recognized by the garbage collector as Object references and so would not be correctly fixed up in the event of object motion during GC. As a consequence, implementors of these methods must not cause object allocations to take place (i.e. by calling "new" either directly or indirectly).
|Constructor and Description|
|Modifier and Type||Method and Description|
Stackframe's method has a "catch" block for exception being thrown and control is to be passed to that catch block.
Stackframe's method has no "catch" block for exception being thrown and stackframe is to be "unwound" as follows: 1. for a synchronized method, call ObjectModel.genericUnlock(), passing it the appropriate "lock" object for non-static methods, the lock is the method's first argument ("this") for static methods, the lock is the method's java.lang.Class 2. restore the non-volatile registers (including fp) that were saved in the method's prologue, by copying them from the method's stackframe save area into the provided "registers" object
public abstract void deliverException(CompiledMethod compiledMethod, Address catchBlockInstructionAddress, Throwable exceptionObject, AbstractRegisters registers)
Note: Implementers must issue the following two lines just before transferring control to the catch block:
VM.enableGC(); registers.inuse = false;
Note: this method does not return (execution resumes at catchBlockInstructionAddress)
compiledMethod- method whose catch block is to receive control
catchBlockInstructionAddress- instruction address at which to begin execution of catch block
exceptionObject- exception object to be passed as argument to catch block
registers- registers to be loaded before passing control to catch block
public abstract void unwindStackFrame(CompiledMethod compiledMethod, AbstractRegisters registers)
compiledMethod- method whose stackframe is to be unwound
registers- thread state to be updated by restoring non-volatiles and unwinding the stackframe