hotspot/src/share/vm/runtime/sharedRuntime.cpp
changeset 46968 9119841280f4
parent 46796 ec791efbdecf
child 46998 efb404beeefb
equal deleted inserted replaced
46953:39063b484ec2 46968:9119841280f4
   207 JRT_LEAF(void, SharedRuntime::g1_wb_pre(oopDesc* orig, JavaThread *thread))
   207 JRT_LEAF(void, SharedRuntime::g1_wb_pre(oopDesc* orig, JavaThread *thread))
   208   if (orig == NULL) {
   208   if (orig == NULL) {
   209     assert(false, "should be optimized out");
   209     assert(false, "should be optimized out");
   210     return;
   210     return;
   211   }
   211   }
   212   assert(orig->is_oop(true /* ignore mark word */), "Error");
   212   assert(oopDesc::is_oop(orig, true /* ignore mark word */), "Error");
   213   // store the original value that was in the field reference
   213   // store the original value that was in the field reference
   214   thread->satb_mark_queue().enqueue(orig);
   214   thread->satb_mark_queue().enqueue(orig);
   215 JRT_END
   215 JRT_END
   216 
   216 
   217 // G1 write-barrier post: executed after a pointer store.
   217 // G1 write-barrier post: executed after a pointer store.
   583 oop SharedRuntime::retrieve_receiver( Symbol* sig, frame caller ) {
   583 oop SharedRuntime::retrieve_receiver( Symbol* sig, frame caller ) {
   584   assert(caller.is_interpreted_frame(), "");
   584   assert(caller.is_interpreted_frame(), "");
   585   int args_size = ArgumentSizeComputer(sig).size() + 1;
   585   int args_size = ArgumentSizeComputer(sig).size() + 1;
   586   assert(args_size <= caller.interpreter_frame_expression_stack_size(), "receiver must be on interpreter stack");
   586   assert(args_size <= caller.interpreter_frame_expression_stack_size(), "receiver must be on interpreter stack");
   587   oop result = cast_to_oop(*caller.interpreter_frame_tos_at(args_size - 1));
   587   oop result = cast_to_oop(*caller.interpreter_frame_tos_at(args_size - 1));
   588   assert(Universe::heap()->is_in(result) && result->is_oop(), "receiver must be an oop");
   588   assert(Universe::heap()->is_in(result) && oopDesc::is_oop(result), "receiver must be an oop");
   589   return result;
   589   return result;
   590 }
   590 }
   591 
   591 
   592 
   592 
   593 void SharedRuntime::throw_and_post_jvmti_exception(JavaThread *thread, Handle h_exception) {
   593 void SharedRuntime::throw_and_post_jvmti_exception(JavaThread *thread, Handle h_exception) {
   995 #if INCLUDE_JVMCI
   995 #if INCLUDE_JVMCI
   996   if (!obj->klass()->has_finalizer()) {
   996   if (!obj->klass()->has_finalizer()) {
   997     return;
   997     return;
   998   }
   998   }
   999 #endif // INCLUDE_JVMCI
   999 #endif // INCLUDE_JVMCI
  1000   assert(obj->is_oop(), "must be a valid oop");
  1000   assert(oopDesc::is_oop(obj), "must be a valid oop");
  1001   assert(obj->klass()->has_finalizer(), "shouldn't be here otherwise");
  1001   assert(obj->klass()->has_finalizer(), "shouldn't be here otherwise");
  1002   InstanceKlass::register_finalizer(instanceOop(obj), CHECK);
  1002   InstanceKlass::register_finalizer(instanceOop(obj), CHECK);
  1003 JRT_END
  1003 JRT_END
  1004 
  1004 
  1005 
  1005 
  1162 
  1162 
  1163     if (receiver.is_null()) {
  1163     if (receiver.is_null()) {
  1164       THROW_(vmSymbols::java_lang_NullPointerException(), nullHandle);
  1164       THROW_(vmSymbols::java_lang_NullPointerException(), nullHandle);
  1165     }
  1165     }
  1166   }
  1166   }
  1167 
       
  1168   assert(receiver.is_null() || receiver->is_oop(), "wrong receiver");
       
  1169 
  1167 
  1170   // Resolve method
  1168   // Resolve method
  1171   if (attached_method.not_null()) {
  1169   if (attached_method.not_null()) {
  1172     // Parameterized by attached method.
  1170     // Parameterized by attached method.
  1173     LinkResolver::resolve_invoke(callinfo, receiver, attached_method, bc, CHECK_NH);
  1171     LinkResolver::resolve_invoke(callinfo, receiver, attached_method, bc, CHECK_NH);