|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jikesrvm.runtime.ExceptionDeliverer
public abstract class ExceptionDeliverer
Interface for exception delivery called by RuntimeEntrypoints.deliverException() to pass control to a stackframe whose method has an appropriate "catch" block or to step over a stackframe that does not have an appropriate catch block.
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 Summary | |
---|---|
ExceptionDeliverer()
|
Method Summary | |
---|---|
abstract void |
deliverException(CompiledMethod compiledMethod,
Address catchBlockInstructionAddress,
Throwable exceptionObject,
ArchitectureSpecific.Registers registers)
Stackframe's method has a "catch" block for exception being thrown and control is to be passed to that catch block. |
abstract void |
unwindStackFrame(CompiledMethod compiledMethod,
ArchitectureSpecific.Registers registers)
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExceptionDeliverer()
Method Detail |
---|
public abstract void deliverException(CompiledMethod compiledMethod, Address catchBlockInstructionAddress, Throwable exceptionObject, ArchitectureSpecific.Registers 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 controlcatchBlockInstructionAddress
- instruction address at which
to begin execution of catch blockexceptionObject
- exception object to be passed as argument to
catch blockregisters
- registers to be loaded before passing control to
catch blockpublic abstract void unwindStackFrame(CompiledMethod compiledMethod, ArchitectureSpecific.Registers registers)
compiledMethod
- method whose stackframe is to be unwoundregisters
- thread state to be updated by restoring non-volatiles
and unwinding the stackframe
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |