< prev index next >
src/hotspot/share/prims/jvmtiImpl.cpp
Print this page
*** 586,596 ****
assert(ty_sign != NULL, "type signature must not be NULL");
assert(thread != NULL, "thread must not be NULL");
assert(klass != NULL, "klass must not be NULL");
int len = (int) strlen(ty_sign);
! if (ty_sign[0] == 'L' && ty_sign[len-1] == ';') { // Need pure class/interface name
ty_sign++;
len -= 2;
}
TempNewSymbol ty_sym = SymbolTable::new_symbol(ty_sign, len);
if (klass->name() == ty_sym) {
--- 586,596 ----
assert(ty_sign != NULL, "type signature must not be NULL");
assert(thread != NULL, "thread must not be NULL");
assert(klass != NULL, "klass must not be NULL");
int len = (int) strlen(ty_sign);
! if ((ty_sign[0] == 'L' || ty_sign[0] == 'Q') && ty_sign[len-1] == ';') { // Need pure class/interface name
ty_sign++;
len -= 2;
}
TempNewSymbol ty_sym = SymbolTable::new_symbol(ty_sign, len);
if (klass->name() == ty_sym) {
*** 769,779 ****
// If we are updating an oop then get the oop from the handle
// since the handle will be long gone by the time the deopt
// happens. The oop stored in the deferred local will be
// gc'd on its own.
! if (_type == T_OBJECT) {
_value.l = (jobject) (JNIHandles::resolve_external_guard(_value.l));
}
// Re-read the vframe so we can see that it is deoptimized
// [ Only need because of assert in update_local() ]
_jvf = get_java_vframe();
--- 769,779 ----
// If we are updating an oop then get the oop from the handle
// since the handle will be long gone by the time the deopt
// happens. The oop stored in the deferred local will be
// gc'd on its own.
! if (_type == T_OBJECT || _type == T_VALUETYPE) {
_value.l = (jobject) (JNIHandles::resolve_external_guard(_value.l));
}
// Re-read the vframe so we can see that it is deoptimized
// [ Only need because of assert in update_local() ]
_jvf = get_java_vframe();
*** 786,796 ****
switch (_type) {
case T_INT: locals->set_int_at (_index, _value.i); break;
case T_LONG: locals->set_long_at (_index, _value.j); break;
case T_FLOAT: locals->set_float_at (_index, _value.f); break;
case T_DOUBLE: locals->set_double_at(_index, _value.d); break;
! case T_OBJECT: {
Handle ob_h(Thread::current(), JNIHandles::resolve_external_guard(_value.l));
locals->set_obj_at (_index, ob_h);
break;
}
default: ShouldNotReachHere();
--- 786,797 ----
switch (_type) {
case T_INT: locals->set_int_at (_index, _value.i); break;
case T_LONG: locals->set_long_at (_index, _value.j); break;
case T_FLOAT: locals->set_float_at (_index, _value.f); break;
case T_DOUBLE: locals->set_double_at(_index, _value.d); break;
! case T_OBJECT:
! case T_VALUETYPE: {
Handle ob_h(Thread::current(), JNIHandles::resolve_external_guard(_value.l));
locals->set_obj_at (_index, ob_h);
break;
}
default: ShouldNotReachHere();
*** 807,817 ****
switch (_type) {
case T_INT: _value.i = locals->int_at (_index); break;
case T_LONG: _value.j = locals->long_at (_index); break;
case T_FLOAT: _value.f = locals->float_at (_index); break;
case T_DOUBLE: _value.d = locals->double_at(_index); break;
! case T_OBJECT: {
// Wrap the oop to be returned in a local JNI handle since
// oops_do() no longer applies after doit() is finished.
oop obj = locals->obj_at(_index)();
_value.l = JNIHandles::make_local(_calling_thread, obj);
break;
--- 808,819 ----
switch (_type) {
case T_INT: _value.i = locals->int_at (_index); break;
case T_LONG: _value.j = locals->long_at (_index); break;
case T_FLOAT: _value.f = locals->float_at (_index); break;
case T_DOUBLE: _value.d = locals->double_at(_index); break;
! case T_OBJECT:
! case T_VALUETYPE: {
// Wrap the oop to be returned in a local JNI handle since
// oops_do() no longer applies after doit() is finished.
oop obj = locals->obj_at(_index)();
_value.l = JNIHandles::make_local(_calling_thread, obj);
break;
< prev index next >