2294 case T_SHORT:
2295 sig_type = JVM_SIGNATURE_SHORT;
2296 value->i = 0; // clear it
2297 value->s = (jshort)ival;
2298 break;
2299 case T_INT:
2300 // nothing to do
2301 break;
2302 default:
2303 // this is an integer instruction, should be one of above
2304 ShouldNotReachHere();
2305 break;
2306 }
2307 }
2308 }
2309
2310 assert(sig_type != JVM_SIGNATURE_ARRAY, "array should have sig_type == 'L'");
2311 bool handle_created = false;
2312
2313 // convert oop to JNI handle.
2314 if (sig_type == JVM_SIGNATURE_CLASS) {
2315 handle_created = true;
2316 value->l = (jobject)JNIHandles::make_local(thread, cast_to_oop(value->l));
2317 }
2318
2319 post_field_modification(thread, method, location, field_klass, object, field, sig_type, value);
2320
2321 // Destroy the JNI handle allocated above.
2322 if (handle_created) {
2323 JNIHandles::destroy_local(value->l);
2324 }
2325 }
2326
2327 void JvmtiExport::post_field_modification(JavaThread *thread, Method* method,
2328 address location, Klass* field_klass, Handle object, jfieldID field,
2329 char sig_type, jvalue *value_ptr) {
2330
2331 HandleMark hm(thread);
2332 methodHandle mh(thread, method);
2333
2334 JvmtiThreadState *state = thread->jvmti_thread_state();
|
2294 case T_SHORT:
2295 sig_type = JVM_SIGNATURE_SHORT;
2296 value->i = 0; // clear it
2297 value->s = (jshort)ival;
2298 break;
2299 case T_INT:
2300 // nothing to do
2301 break;
2302 default:
2303 // this is an integer instruction, should be one of above
2304 ShouldNotReachHere();
2305 break;
2306 }
2307 }
2308 }
2309
2310 assert(sig_type != JVM_SIGNATURE_ARRAY, "array should have sig_type == 'L'");
2311 bool handle_created = false;
2312
2313 // convert oop to JNI handle.
2314 if (sig_type == JVM_SIGNATURE_CLASS || sig_type == JVM_SIGNATURE_PRIMITIVE_OBJECT) {
2315 handle_created = true;
2316 value->l = (jobject)JNIHandles::make_local(thread, cast_to_oop(value->l));
2317 }
2318
2319 post_field_modification(thread, method, location, field_klass, object, field, sig_type, value);
2320
2321 // Destroy the JNI handle allocated above.
2322 if (handle_created) {
2323 JNIHandles::destroy_local(value->l);
2324 }
2325 }
2326
2327 void JvmtiExport::post_field_modification(JavaThread *thread, Method* method,
2328 address location, Klass* field_klass, Handle object, jfieldID field,
2329 char sig_type, jvalue *value_ptr) {
2330
2331 HandleMark hm(thread);
2332 methodHandle mh(thread, method);
2333
2334 JvmtiThreadState *state = thread->jvmti_thread_state();
|