Mercurial > hg > truffle
diff src/share/vm/runtime/vframeArray.cpp @ 4693:07bcee8b70a4
Simplify exception debug information and exception handler table creation based on Graal's simplified model of exception handler information (i.e. the dispatch is done in compiled code).
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Sat, 25 Feb 2012 00:40:34 +0100 |
parents | a03f3fd16b22 |
children | 1c7c5be93e84 |
line wrap: on
line diff
--- a/src/share/vm/runtime/vframeArray.cpp Fri Feb 24 22:32:43 2012 +0100 +++ b/src/share/vm/runtime/vframeArray.cpp Sat Feb 25 00:40:34 2012 +0100 @@ -127,38 +127,27 @@ // Now the expressions off-stack // Same silliness as above - bool rethrow_exception = vf->scope()->rethrow_exception(); - if (rethrow_exception) { - // (tw) Make sure there are only null pointers on the stack, because the stack values do not correspond to the GC map at the bytecode at which the exception is rethrown. - // TODO: Fix this! Locals map might be wrong too. - _expressions = new StackValueCollection(vf->method()->max_stack()); - assert(Thread::current()->has_pending_exception(), "just checking"); - for (int i=0; i<vf->method()->max_stack(); ++i) { - _expressions->add( new StackValue()); - } - } else { - StackValueCollection *exprs = vf->expressions(); - _expressions = new StackValueCollection(exprs->size()); - for(index = 0; index < exprs->size(); index++) { - StackValue* value = exprs->at(index); - switch(value->type()) { - case T_OBJECT: - assert(!value->obj_is_scalar_replaced(), "object should be reallocated already"); - // preserve object type - _expressions->add( new StackValue((intptr_t) (value->get_obj()()), T_OBJECT )); - break; - case T_CONFLICT: - // A dead stack element. Will be initialized to null/zero. - // This can occur when the compiler emits a state in which stack - // elements are known to be dead (because of an imminent exception). - _expressions->add( new StackValue()); - break; - case T_INT: - _expressions->add( new StackValue(value->get_int())); - break; - default: - ShouldNotReachHere(); - } + StackValueCollection *exprs = vf->expressions(); + _expressions = new StackValueCollection(exprs->size()); + for(index = 0; index < exprs->size(); index++) { + StackValue* value = exprs->at(index); + switch(value->type()) { + case T_OBJECT: + assert(!value->obj_is_scalar_replaced(), "object should be reallocated already"); + // preserve object type + _expressions->add( new StackValue((intptr_t) (value->get_obj()()), T_OBJECT )); + break; + case T_CONFLICT: + // A dead stack element. Will be initialized to null/zero. + // This can occur when the compiler emits a state in which stack + // elements are known to be dead (because of an imminent exception). + _expressions->add( new StackValue()); + break; + case T_INT: + _expressions->add( new StackValue(value->get_int())); + break; + default: + ShouldNotReachHere(); } } }