Mercurial > hg > shark > hotspot
changeset 1536:79c5422649e4
Start fixing up the exception handler marshaller
author | Gary Benson <gbenson@redhat.com> |
---|---|
date | Tue, 18 May 2010 15:38:54 +0100 |
parents | 1cf9edfaa559 |
children | 6fd1ffad34e2 |
files | src/share/vm/shark/sharkTopLevelBlock.cpp |
diffstat | 1 files changed, 14 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/shark/sharkTopLevelBlock.cpp Thu May 13 14:29:53 2010 +0100 +++ b/src/share/vm/shark/sharkTopLevelBlock.cpp Tue May 18 15:38:54 2010 +0100 @@ -439,7 +439,19 @@ } void SharkTopLevelBlock::handle_exception(Value* exception, int action) { - if (action & EAM_HANDLE && num_exceptions() != 0) { + if (action & EAM_HANDLE) { + // Build a list of exception handlers for this block + ciExceptionHandlerStream str(target(), bci()); + GrowableArray<ciExceptionHandler*>* handlers = + new GrowableArray<ciExceptionHandler*>(str.count()); + for (; !str.is_done(); str.next()) { + ciExceptionHandler* handler = str.handler(); + if (handler->handler_bci() == -1) + break; + handlers->append(handler); + } + + if (handlers->length() != 0) { // Clear the stack and push the exception onto it. // We do this now to protect it across the VM call // we may be about to make. @@ -505,6 +517,7 @@ return; } } + } // No exception handler was found; unwind and return handle_return(T_VOID, exception);