< prev index next >
src/share/vm/shark/sharkRuntime.cpp
Print this page
*** 39,58 ****
JRT_ENTRY(int, SharkRuntime::find_exception_handler(JavaThread* thread,
int* indexes,
int num_indexes))
constantPoolHandle pool(thread, method(thread)->constants());
! KlassHandle exc_klass(thread, ((oop) tos_at(thread, 0))->klass());
for (int i = 0; i < num_indexes; i++) {
Klass* tmp = pool->klass_at(indexes[i], CHECK_0);
- KlassHandle chk_klass(thread, tmp);
! if (exc_klass() == chk_klass())
return i;
! if (exc_klass()->is_subtype_of(chk_klass()))
return i;
}
return -1;
JRT_END
--- 39,57 ----
JRT_ENTRY(int, SharkRuntime::find_exception_handler(JavaThread* thread,
int* indexes,
int num_indexes))
constantPoolHandle pool(thread, method(thread)->constants());
! Klass* exc_klass = ((oop) tos_at(thread, 0))->klass();
for (int i = 0; i < num_indexes; i++) {
Klass* tmp = pool->klass_at(indexes[i], CHECK_0);
! if (exc_klass() == tmp)
return i;
! if (exc_klass()->is_subtype_of(tmp))
return i;
}
return -1;
JRT_END
*** 83,93 ****
ObjectSynchronizer::slow_exit(object(), lock->lock(), thread);
JRT_END
JRT_ENTRY(void, SharkRuntime::new_instance(JavaThread* thread, int index))
Klass* k_oop = method(thread)->constants()->klass_at(index, CHECK);
! instanceKlassHandle klass(THREAD, k_oop);
// Make sure we are not instantiating an abstract klass
klass->check_valid_for_instantiation(true, CHECK);
// Make sure klass is initialized
--- 82,92 ----
ObjectSynchronizer::slow_exit(object(), lock->lock(), thread);
JRT_END
JRT_ENTRY(void, SharkRuntime::new_instance(JavaThread* thread, int index))
Klass* k_oop = method(thread)->constants()->klass_at(index, CHECK);
! InstanceKlass* klass = InstanceKlass::cast(k);
// Make sure we are not instantiating an abstract klass
klass->check_valid_for_instantiation(true, CHECK);
// Make sure klass is initialized
< prev index next >