< prev index next >

src/hotspot/share/interpreter/interpreterRuntime.cpp

Print this page

        

@@ -22,11 +22,10 @@
  *
  */
 
 #include "precompiled.hpp"
 #include "classfile/javaClasses.inline.hpp"
-#include "classfile/symbolTable.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "classfile/vmSymbols.hpp"
 #include "code/codeCache.hpp"
 #include "compiler/compileBroker.hpp"
 #include "compiler/disassembler.hpp"

@@ -155,24 +154,24 @@
 
 //------------------------------------------------------------------------------------------------------------------------
 // Constants
 
 
-JRT_ENTRY(void, InterpreterRuntime::ldc(JavaThread* thread, bool wide))
+IRT_ENTRY(void, InterpreterRuntime::ldc(JavaThread* thread, bool wide))
   // access constant pool
   LastFrameAccessor last_frame(thread);
   ConstantPool* pool = last_frame.method()->constants();
   int index = wide ? last_frame.get_index_u2(Bytecodes::_ldc_w) : last_frame.get_index_u1(Bytecodes::_ldc);
   constantTag tag = pool->tag_at(index);
 
   assert (tag.is_unresolved_klass() || tag.is_klass(), "wrong ldc call");
   Klass* klass = pool->klass_at(index, CHECK);
     oop java_class = klass->java_mirror();
     thread->set_vm_result(java_class);
-JRT_END
+IRT_END
 
-JRT_ENTRY(void, InterpreterRuntime::resolve_ldc(JavaThread* thread, Bytecodes::Code bytecode)) {
+IRT_ENTRY(void, InterpreterRuntime::resolve_ldc(JavaThread* thread, Bytecodes::Code bytecode)) {
   assert(bytecode == Bytecodes::_ldc ||
          bytecode == Bytecodes::_ldc_w ||
          bytecode == Bytecodes::_ldc2_w ||
          bytecode == Bytecodes::_fast_aldc ||
          bytecode == Bytecodes::_fast_aldc_w, "wrong bc");

@@ -218,17 +217,17 @@
     intptr_t flags = ((as_TosState(type) << ConstantPoolCacheEntry::tos_state_shift)
                       | (offset & ConstantPoolCacheEntry::field_index_mask));
     thread->set_vm_result_2((Metadata*)flags);
   }
 }
-JRT_END
+IRT_END
 
 
 //------------------------------------------------------------------------------------------------------------------------
 // Allocation
 
-JRT_ENTRY(void, InterpreterRuntime::_new(JavaThread* thread, ConstantPool* pool, int index))
+IRT_ENTRY(void, InterpreterRuntime::_new(JavaThread* thread, ConstantPool* pool, int index))
   Klass* k = pool->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);

@@ -250,27 +249,27 @@
   //       Java).
   //       If we have a breakpoint, then we don't rewrite
   //       because the _breakpoint bytecode would be lost.
   oop obj = klass->allocate_instance(CHECK);
   thread->set_vm_result(obj);
-JRT_END
+IRT_END
 
 
-JRT_ENTRY(void, InterpreterRuntime::newarray(JavaThread* thread, BasicType type, jint size))
+IRT_ENTRY(void, InterpreterRuntime::newarray(JavaThread* thread, BasicType type, jint size))
   oop obj = oopFactory::new_typeArray(type, size, CHECK);
   thread->set_vm_result(obj);
-JRT_END
+IRT_END
 
 
-JRT_ENTRY(void, InterpreterRuntime::anewarray(JavaThread* thread, ConstantPool* pool, int index, jint size))
+IRT_ENTRY(void, InterpreterRuntime::anewarray(JavaThread* thread, ConstantPool* pool, int index, jint size))
   Klass*    klass = pool->klass_at(index, CHECK);
   objArrayOop obj = oopFactory::new_objArray(klass, size, CHECK);
   thread->set_vm_result(obj);
-JRT_END
+IRT_END
 
 
-JRT_ENTRY(void, InterpreterRuntime::multianewarray(JavaThread* thread, jint* first_size_address))
+IRT_ENTRY(void, InterpreterRuntime::multianewarray(JavaThread* thread, jint* first_size_address))
   // We may want to pass in more arguments - could make this slightly faster
   LastFrameAccessor last_frame(thread);
   ConstantPool* constants = last_frame.method()->constants();
   int          i = last_frame.get_index_u2(Bytecodes::_multianewarray);
   Klass* klass   = constants->klass_at(i, CHECK);

@@ -291,33 +290,33 @@
     int n = Interpreter::local_offset_in_bytes(index)/jintSize;
     dims[index] = first_size_address[n];
   }
   oop obj = ArrayKlass::cast(klass)->multi_allocate(nof_dims, dims, CHECK);
   thread->set_vm_result(obj);
-JRT_END
+IRT_END
 
 
-JRT_ENTRY(void, InterpreterRuntime::register_finalizer(JavaThread* thread, oopDesc* obj))
+IRT_ENTRY(void, InterpreterRuntime::register_finalizer(JavaThread* thread, oopDesc* obj))
   assert(oopDesc::is_oop(obj), "must be a valid oop");
   assert(obj->klass()->has_finalizer(), "shouldn't be here otherwise");
   InstanceKlass::register_finalizer(instanceOop(obj), CHECK);
-JRT_END
+IRT_END
 
 
 // Quicken instance-of and check-cast bytecodes
-JRT_ENTRY(void, InterpreterRuntime::quicken_io_cc(JavaThread* thread))
+IRT_ENTRY(void, InterpreterRuntime::quicken_io_cc(JavaThread* thread))
   // Force resolving; quicken the bytecode
   LastFrameAccessor last_frame(thread);
   int which = last_frame.get_index_u2(Bytecodes::_checkcast);
   ConstantPool* cpool = last_frame.method()->constants();
   // We'd expect to assert that we're only here to quicken bytecodes, but in a multithreaded
   // program we might have seen an unquick'd bytecode in the interpreter but have another
   // thread quicken the bytecode before we get here.
   // assert( cpool->tag_at(which).is_unresolved_klass(), "should only come here to quicken bytecodes" );
   Klass* klass = cpool->klass_at(which, CHECK);
   thread->set_vm_result_2(klass);
-JRT_END
+IRT_END
 
 
 //------------------------------------------------------------------------------------------------------------------------
 // Exceptions
 

@@ -353,14 +352,14 @@
   note_trap_inner(thread, reason, trap_method, trap_bci, THREAD);
 }
 
 #ifdef CC_INTERP
 // As legacy note_trap, but we have more arguments.
-JRT_ENTRY(void, InterpreterRuntime::note_trap(JavaThread* thread, int reason, Method *method, int trap_bci))
+IRT_ENTRY(void, InterpreterRuntime::note_trap(JavaThread* thread, int reason, Method *method, int trap_bci))
   methodHandle trap_method(method);
   note_trap_inner(thread, reason, trap_method, trap_bci, THREAD);
-JRT_END
+IRT_END
 
 // Class Deoptimization is not visible in BytecodeInterpreter, so we need a wrapper
 // for each exception.
 void InterpreterRuntime::note_nullCheck_trap(JavaThread* thread, Method *method, int trap_bci)
   { if (ProfileTraps) note_trap(thread, Deoptimization::Reason_null_check, method, trap_bci); }

@@ -393,74 +392,74 @@
 
 // Special handling for stack overflow: since we don't have any (java) stack
 // space left we use the pre-allocated & pre-initialized StackOverflowError
 // klass to create an stack overflow error instance.  We do not call its
 // constructor for the same reason (it is empty, anyway).
-JRT_ENTRY(void, InterpreterRuntime::throw_StackOverflowError(JavaThread* thread))
+IRT_ENTRY(void, InterpreterRuntime::throw_StackOverflowError(JavaThread* thread))
   Handle exception = get_preinitialized_exception(
                                  SystemDictionary::StackOverflowError_klass(),
                                  CHECK);
   // Increment counter for hs_err file reporting
   Atomic::inc(&Exceptions::_stack_overflow_errors);
   THROW_HANDLE(exception);
-JRT_END
+IRT_END
 
-JRT_ENTRY(void, InterpreterRuntime::throw_delayed_StackOverflowError(JavaThread* thread))
+IRT_ENTRY(void, InterpreterRuntime::throw_delayed_StackOverflowError(JavaThread* thread))
   Handle exception = get_preinitialized_exception(
                                  SystemDictionary::StackOverflowError_klass(),
                                  CHECK);
   java_lang_Throwable::set_message(exception(),
           Universe::delayed_stack_overflow_error_message());
   // Increment counter for hs_err file reporting
   Atomic::inc(&Exceptions::_stack_overflow_errors);
   THROW_HANDLE(exception);
-JRT_END
+IRT_END
 
-JRT_ENTRY(void, InterpreterRuntime::create_exception(JavaThread* thread, char* name, char* message))
+IRT_ENTRY(void, InterpreterRuntime::create_exception(JavaThread* thread, char* name, char* message))
   // lookup exception klass
-  TempNewSymbol s = SymbolTable::new_symbol(name);
+  TempNewSymbol s = SymbolTable::new_symbol(name, CHECK);
   if (ProfileTraps) {
     if (s == vmSymbols::java_lang_ArithmeticException()) {
       note_trap(thread, Deoptimization::Reason_div0_check, CHECK);
     } else if (s == vmSymbols::java_lang_NullPointerException()) {
       note_trap(thread, Deoptimization::Reason_null_check, CHECK);
     }
   }
   // create exception
   Handle exception = Exceptions::new_exception(thread, s, message);
   thread->set_vm_result(exception());
-JRT_END
+IRT_END
 
 
-JRT_ENTRY(void, InterpreterRuntime::create_klass_exception(JavaThread* thread, char* name, oopDesc* obj))
+IRT_ENTRY(void, InterpreterRuntime::create_klass_exception(JavaThread* thread, char* name, oopDesc* obj))
   // Produce the error message first because note_trap can safepoint
   ResourceMark rm(thread);
   const char* klass_name = obj->klass()->external_name();
   // lookup exception klass
-  TempNewSymbol s = SymbolTable::new_symbol(name);
+  TempNewSymbol s = SymbolTable::new_symbol(name, CHECK);
   if (ProfileTraps) {
     note_trap(thread, Deoptimization::Reason_class_check, CHECK);
   }
   // create exception, with klass name as detail message
   Handle exception = Exceptions::new_exception(thread, s, klass_name);
   thread->set_vm_result(exception());
-JRT_END
+IRT_END
 
-JRT_ENTRY(void, InterpreterRuntime::throw_ArrayIndexOutOfBoundsException(JavaThread* thread, arrayOopDesc* a, jint index))
+IRT_ENTRY(void, InterpreterRuntime::throw_ArrayIndexOutOfBoundsException(JavaThread* thread, arrayOopDesc* a, jint index))
   // Produce the error message first because note_trap can safepoint
   ResourceMark rm(thread);
   stringStream ss;
   ss.print("Index %d out of bounds for length %d", index, a->length());
 
   if (ProfileTraps) {
     note_trap(thread, Deoptimization::Reason_range_check, CHECK);
   }
 
   THROW_MSG(vmSymbols::java_lang_ArrayIndexOutOfBoundsException(), ss.as_string());
-JRT_END
+IRT_END
 
-JRT_ENTRY(void, InterpreterRuntime::throw_ClassCastException(
+IRT_ENTRY(void, InterpreterRuntime::throw_ClassCastException(
   JavaThread* thread, oopDesc* obj))
 
   // Produce the error message first because note_trap can safepoint
   ResourceMark rm(thread);
   char* message = SharedRuntime::generate_class_cast_message(

@@ -470,21 +469,21 @@
     note_trap(thread, Deoptimization::Reason_class_check, CHECK);
   }
 
   // create exception
   THROW_MSG(vmSymbols::java_lang_ClassCastException(), message);
-JRT_END
+IRT_END
 
 // exception_handler_for_exception(...) returns the continuation address,
 // the exception oop (via TLS) and sets the bci/bcp for the continuation.
 // The exception oop is returned to make sure it is preserved over GC (it
 // is only on the stack if the exception was thrown explicitly via athrow).
 // During this operation, the expression stack contains the values for the
 // bci where the exception happened. If the exception was propagated back
 // from a call, the expression stack contains the values for the bci at the
 // invoke w/o arguments (i.e., as if one were inside the call).
-JRT_ENTRY(address, InterpreterRuntime::exception_handler_for_exception(JavaThread* thread, oopDesc* exception))
+IRT_ENTRY(address, InterpreterRuntime::exception_handler_for_exception(JavaThread* thread, oopDesc* exception))
 
   LastFrameAccessor last_frame(thread);
   Handle             h_exception(thread, exception);
   methodHandle       h_method   (thread, last_frame.method());
   constantPoolHandle h_constants(thread, h_method->constants());

@@ -541,11 +540,11 @@
       ResourceMark rm(thread);
       stringStream tempst;
       tempst.print("interpreter method <%s>\n"
                    " at bci %d for thread " INTPTR_FORMAT " (%s)",
                    h_method->print_value_string(), current_bci, p2i(thread), thread->name());
-      Exceptions::log_exception(h_exception, tempst.as_string());
+      Exceptions::log_exception(h_exception, tempst);
     }
 // Don't go paging in something which won't be used.
 //     else if (extable->length() == 0) {
 //       // disabled for now - interpreter is not using shortcut yet
 //       // (shortcut is not to call runtime if we have no exception handlers)

@@ -621,62 +620,62 @@
     JvmtiExport::notice_unwind_due_to_exception(thread, h_method(), handler_pc, h_exception(), (handler_pc != NULL));
   }
 
   thread->set_vm_result(h_exception());
   return continuation;
-JRT_END
+IRT_END
 
 
-JRT_ENTRY(void, InterpreterRuntime::throw_pending_exception(JavaThread* thread))
+IRT_ENTRY(void, InterpreterRuntime::throw_pending_exception(JavaThread* thread))
   assert(thread->has_pending_exception(), "must only ne called if there's an exception pending");
   // nothing to do - eventually we should remove this code entirely (see comments @ call sites)
-JRT_END
+IRT_END
 
 
-JRT_ENTRY(void, InterpreterRuntime::throw_AbstractMethodError(JavaThread* thread))
+IRT_ENTRY(void, InterpreterRuntime::throw_AbstractMethodError(JavaThread* thread))
   THROW(vmSymbols::java_lang_AbstractMethodError());
-JRT_END
+IRT_END
 
 // This method is called from the "abstract_entry" of the interpreter.
 // At that point, the arguments have already been removed from the stack
 // and therefore we don't have the receiver object at our fingertips. (Though,
 // on some platforms the receiver still resides in a register...). Thus,
 // we have no choice but print an error message not containing the receiver
 // type.
-JRT_ENTRY(void, InterpreterRuntime::throw_AbstractMethodErrorWithMethod(JavaThread* thread,
+IRT_ENTRY(void, InterpreterRuntime::throw_AbstractMethodErrorWithMethod(JavaThread* thread,
                                                                         Method* missingMethod))
   ResourceMark rm(thread);
   assert(missingMethod != NULL, "sanity");
   methodHandle m(thread, missingMethod);
   LinkResolver::throw_abstract_method_error(m, THREAD);
-JRT_END
+IRT_END
 
-JRT_ENTRY(void, InterpreterRuntime::throw_AbstractMethodErrorVerbose(JavaThread* thread,
+IRT_ENTRY(void, InterpreterRuntime::throw_AbstractMethodErrorVerbose(JavaThread* thread,
                                                                      Klass* recvKlass,
                                                                      Method* missingMethod))
   ResourceMark rm(thread);
   methodHandle mh = methodHandle(thread, missingMethod);
   LinkResolver::throw_abstract_method_error(mh, recvKlass, THREAD);
-JRT_END
+IRT_END
 
 
-JRT_ENTRY(void, InterpreterRuntime::throw_IncompatibleClassChangeError(JavaThread* thread))
+IRT_ENTRY(void, InterpreterRuntime::throw_IncompatibleClassChangeError(JavaThread* thread))
   THROW(vmSymbols::java_lang_IncompatibleClassChangeError());
-JRT_END
+IRT_END
 
-JRT_ENTRY(void, InterpreterRuntime::throw_IncompatibleClassChangeErrorVerbose(JavaThread* thread,
+IRT_ENTRY(void, InterpreterRuntime::throw_IncompatibleClassChangeErrorVerbose(JavaThread* thread,
                                                                               Klass* recvKlass,
                                                                               Klass* interfaceKlass))
   ResourceMark rm(thread);
   char buf[1000];
   buf[0] = '\0';
   jio_snprintf(buf, sizeof(buf),
                "Class %s does not implement the requested interface %s",
                recvKlass ? recvKlass->external_name() : "NULL",
                interfaceKlass ? interfaceKlass->external_name() : "NULL");
   THROW_MSG(vmSymbols::java_lang_IncompatibleClassChangeError(), buf);
-JRT_END
+IRT_END
 
 //------------------------------------------------------------------------------------------------------------------------
 // Fields
 //
 

@@ -759,11 +758,11 @@
 // The interpreter's synchronization code is factored out so that it can
 // be shared by method invocation and synchronized blocks.
 //%note synchronization_3
 
 //%note monitor_1
-JRT_ENTRY_NO_ASYNC(void, InterpreterRuntime::monitorenter(JavaThread* thread, BasicObjectLock* elem))
+IRT_ENTRY_NO_ASYNC(void, InterpreterRuntime::monitorenter(JavaThread* thread, BasicObjectLock* elem))
 #ifdef ASSERT
   thread->last_frame().interpreter_frame_verify_monitor(elem);
 #endif
   if (PrintBiasedLockingStatistics) {
     Atomic::inc(BiasedLocking::slow_path_entry_count_addr());

@@ -780,15 +779,15 @@
   assert(Universe::heap()->is_in_reserved_or_null(elem->obj()),
          "must be NULL or an object");
 #ifdef ASSERT
   thread->last_frame().interpreter_frame_verify_monitor(elem);
 #endif
-JRT_END
+IRT_END
 
 
 //%note monitor_1
-JRT_ENTRY_NO_ASYNC(void, InterpreterRuntime::monitorexit(JavaThread* thread, BasicObjectLock* elem))
+IRT_ENTRY_NO_ASYNC(void, InterpreterRuntime::monitorexit(JavaThread* thread, BasicObjectLock* elem))
 #ifdef ASSERT
   thread->last_frame().interpreter_frame_verify_monitor(elem);
 #endif
   Handle h_obj(thread, elem->obj());
   assert(Universe::heap()->is_in_reserved_or_null(h_obj()),

@@ -801,19 +800,19 @@
   // exit. If it is not cleared, the exception handling code will try to unlock the monitor again.
   elem->set_obj(NULL);
 #ifdef ASSERT
   thread->last_frame().interpreter_frame_verify_monitor(elem);
 #endif
-JRT_END
+IRT_END
 
 
-JRT_ENTRY(void, InterpreterRuntime::throw_illegal_monitor_state_exception(JavaThread* thread))
+IRT_ENTRY(void, InterpreterRuntime::throw_illegal_monitor_state_exception(JavaThread* thread))
   THROW(vmSymbols::java_lang_IllegalMonitorStateException());
-JRT_END
+IRT_END
 
 
-JRT_ENTRY(void, InterpreterRuntime::new_illegal_monitor_state_exception(JavaThread* thread))
+IRT_ENTRY(void, InterpreterRuntime::new_illegal_monitor_state_exception(JavaThread* thread))
   // Returns an illegal exception to install into the current thread. The
   // pending_exception flag is cleared so normal exception handling does not
   // trigger. Any current installed exception will be overwritten. This
   // method will be called during an exception unwind.
 

@@ -825,27 +824,27 @@
     exception = get_preinitialized_exception(
                        SystemDictionary::IllegalMonitorStateException_klass(),
                        CATCH);
   }
   thread->set_vm_result(exception());
-JRT_END
+IRT_END
 
 
 //------------------------------------------------------------------------------------------------------------------------
 // Invokes
 
-JRT_ENTRY(Bytecodes::Code, InterpreterRuntime::get_original_bytecode_at(JavaThread* thread, Method* method, address bcp))
+IRT_ENTRY(Bytecodes::Code, InterpreterRuntime::get_original_bytecode_at(JavaThread* thread, Method* method, address bcp))
   return method->orig_bytecode_at(method->bci_from(bcp));
-JRT_END
+IRT_END
 
-JRT_ENTRY(void, InterpreterRuntime::set_original_bytecode_at(JavaThread* thread, Method* method, address bcp, Bytecodes::Code new_code))
+IRT_ENTRY(void, InterpreterRuntime::set_original_bytecode_at(JavaThread* thread, Method* method, address bcp, Bytecodes::Code new_code))
   method->set_orig_bytecode_at(method->bci_from(bcp), new_code);
-JRT_END
+IRT_END
 
-JRT_ENTRY(void, InterpreterRuntime::_breakpoint(JavaThread* thread, Method* method, address bcp))
+IRT_ENTRY(void, InterpreterRuntime::_breakpoint(JavaThread* thread, Method* method, address bcp))
   JvmtiExport::post_raw_breakpoint(thread, method, bcp);
-JRT_END
+IRT_END
 
 void InterpreterRuntime::resolve_invoke(JavaThread* thread, Bytecodes::Code bytecode) {
   Thread* THREAD = thread;
   LastFrameAccessor last_frame(thread);
   // extract receiver from the outgoing argument list if necessary

@@ -919,23 +918,27 @@
   } else {
     assert(info.call_kind() == CallInfo::direct_call ||
            info.call_kind() == CallInfo::vtable_call, "");
   }
 #endif
-  // Get sender or sender's unsafe_anonymous_host, and only set cpCache entry to resolved if
-  // it is not an interface.  The receiver for invokespecial calls within interface
-  // methods must be checked for every call.
-  InstanceKlass* sender = pool->pool_holder();
-  sender = sender->is_unsafe_anonymous() ? sender->unsafe_anonymous_host() : sender;
 
   switch (info.call_kind()) {
-  case CallInfo::direct_call:
+  case CallInfo::direct_call: {
+    // Get sender or sender's unsafe_anonymous_host, and only set cpCache entry to resolved if
+    // it is not an interface.  The receiver for invokespecial calls within interface
+    // methods must be checked for every call.
+    InstanceKlass* pool_holder = pool->pool_holder();
+    InstanceKlass* sender = pool_holder->is_unsafe_anonymous() ?
+                              pool_holder->unsafe_anonymous_host() : pool_holder;
+
     cp_cache_entry->set_direct_call(
       bytecode,
       info.resolved_method(),
-      sender->is_interface());
+      sender->is_interface(),
+      pool_holder);
     break;
+  }
   case CallInfo::vtable_call:
     cp_cache_entry->set_vtable_call(
       bytecode,
       info.resolved_method(),
       info.vtable_index());

@@ -993,11 +996,11 @@
 }
 
 // This function is the interface to the assembly code. It returns the resolved
 // cpCache entry.  This doesn't safepoint, but the helper routines safepoint.
 // This function will check for redefinition!
-JRT_ENTRY(void, InterpreterRuntime::resolve_from_cache(JavaThread* thread, Bytecodes::Code bytecode)) {
+IRT_ENTRY(void, InterpreterRuntime::resolve_from_cache(JavaThread* thread, Bytecodes::Code bytecode)) {
   switch (bytecode) {
   case Bytecodes::_getstatic:
   case Bytecodes::_putstatic:
   case Bytecodes::_getfield:
   case Bytecodes::_putfield:

@@ -1018,11 +1021,11 @@
   default:
     fatal("unexpected bytecode: %s", Bytecodes::name(bytecode));
     break;
   }
 }
-JRT_END
+IRT_END
 
 //------------------------------------------------------------------------------------------------------------------------
 // Miscellaneous
 
 

@@ -1064,11 +1067,11 @@
   }
 #endif
   return nm;
 }
 
-JRT_ENTRY(nmethod*,
+IRT_ENTRY(nmethod*,
           InterpreterRuntime::frequency_counter_overflow_inner(JavaThread* thread, address branch_bcp))
   // use UnlockFlagSaver to clear and restore the _do_not_unlock_if_synchronized
   // flag, in case this method triggers classloading which will call into Java.
   UnlockFlagSaver fs(thread);
 

@@ -1108,21 +1111,21 @@
       }
       BiasedLocking::revoke(objects_to_revoke);
     }
   }
   return osr_nm;
-JRT_END
+IRT_END
 
-JRT_LEAF(jint, InterpreterRuntime::bcp_to_di(Method* method, address cur_bcp))
+IRT_LEAF(jint, InterpreterRuntime::bcp_to_di(Method* method, address cur_bcp))
   assert(ProfileInterpreter, "must be profiling interpreter");
   int bci = method->bci_from(cur_bcp);
   MethodData* mdo = method->method_data();
   if (mdo == NULL)  return 0;
   return mdo->bci_to_di(bci);
-JRT_END
+IRT_END
 
-JRT_ENTRY(void, InterpreterRuntime::profile_method(JavaThread* thread))
+IRT_ENTRY(void, InterpreterRuntime::profile_method(JavaThread* thread))
   // use UnlockFlagSaver to clear and restore the _do_not_unlock_if_synchronized
   // flag, in case this method triggers classloading which will call into Java.
   UnlockFlagSaver fs(thread);
 
   assert(ProfileInterpreter, "must be profiling interpreter");

@@ -1133,15 +1136,15 @@
   if (HAS_PENDING_EXCEPTION) {
     assert((PENDING_EXCEPTION->is_a(SystemDictionary::OutOfMemoryError_klass())), "we expect only an OOM error here");
     CLEAR_PENDING_EXCEPTION;
     // and fall through...
   }
-JRT_END
+IRT_END
 
 
 #ifdef ASSERT
-JRT_LEAF(void, InterpreterRuntime::verify_mdp(Method* method, address bcp, address mdp))
+IRT_LEAF(void, InterpreterRuntime::verify_mdp(Method* method, address bcp, address mdp))
   assert(ProfileInterpreter, "must be profiling interpreter");
 
   MethodData* mdo = method->method_data();
   assert(mdo != NULL, "must not be null");
 

@@ -1164,14 +1167,14 @@
     tty->print_cr("  actual bci is %d  expected bci %d", approx_bci, expected_approx_bci);
     mdo->print_on(tty);
     method->print_codes();
   }
   assert(mdp == mdp2, "wrong mdp");
-JRT_END
+IRT_END
 #endif // ASSERT
 
-JRT_ENTRY(void, InterpreterRuntime::update_mdp_for_ret(JavaThread* thread, int return_bci))
+IRT_ENTRY(void, InterpreterRuntime::update_mdp_for_ret(JavaThread* thread, int return_bci))
   assert(ProfileInterpreter, "must be profiling interpreter");
   ResourceMark rm(thread);
   HandleMark hm(thread);
   LastFrameAccessor last_frame(thread);
   assert(last_frame.is_interpreted_frame(), "must come from interpreter");

@@ -1186,40 +1189,40 @@
   ProfileData* data = h_mdo->data_at(h_mdo->dp_to_di(last_frame.mdp()));
   guarantee(data != NULL, "profile data must be valid");
   RetData* rdata = data->as_RetData();
   address new_mdp = rdata->fixup_ret(return_bci, h_mdo);
   last_frame.set_mdp(new_mdp);
-JRT_END
+IRT_END
 
-JRT_ENTRY(MethodCounters*, InterpreterRuntime::build_method_counters(JavaThread* thread, Method* m))
+IRT_ENTRY(MethodCounters*, InterpreterRuntime::build_method_counters(JavaThread* thread, Method* m))
   MethodCounters* mcs = Method::build_method_counters(m, thread);
   if (HAS_PENDING_EXCEPTION) {
     assert((PENDING_EXCEPTION->is_a(SystemDictionary::OutOfMemoryError_klass())), "we expect only an OOM error here");
     CLEAR_PENDING_EXCEPTION;
   }
   return mcs;
-JRT_END
+IRT_END
 
 
-JRT_ENTRY(void, InterpreterRuntime::at_safepoint(JavaThread* thread))
+IRT_ENTRY(void, InterpreterRuntime::at_safepoint(JavaThread* thread))
   // We used to need an explict preserve_arguments here for invoke bytecodes. However,
   // stack traversal automatically takes care of preserving arguments for invoke, so
   // this is no longer needed.
 
-  // JRT_END does an implicit safepoint check, hence we are guaranteed to block
+  // IRT_END does an implicit safepoint check, hence we are guaranteed to block
   // if this is called during a safepoint
 
   if (JvmtiExport::should_post_single_step()) {
     // We are called during regular safepoints and when the VM is
     // single stepping. If any thread is marked for single stepping,
     // then we may have JVMTI work to do.
     LastFrameAccessor last_frame(thread);
     JvmtiExport::at_single_stepping_point(thread, last_frame.method(), last_frame.bcp());
   }
-JRT_END
+IRT_END
 
-JRT_ENTRY(void, InterpreterRuntime::post_field_access(JavaThread *thread, oopDesc* obj,
+IRT_ENTRY(void, InterpreterRuntime::post_field_access(JavaThread *thread, oopDesc* obj,
 ConstantPoolCacheEntry *cp_entry))
 
   // check the access_flags for the field in the klass
 
   InstanceKlass* ik = InstanceKlass::cast(cp_entry->f1_as_klass());

@@ -1236,13 +1239,13 @@
   }
   InstanceKlass* cp_entry_f1 = InstanceKlass::cast(cp_entry->f1_as_klass());
   jfieldID fid = jfieldIDWorkaround::to_jfieldID(cp_entry_f1, cp_entry->f2_as_index(), is_static);
   LastFrameAccessor last_frame(thread);
   JvmtiExport::post_field_access(thread, last_frame.method(), last_frame.bcp(), cp_entry_f1, h_obj, fid);
-JRT_END
+IRT_END
 
-JRT_ENTRY(void, InterpreterRuntime::post_field_modification(JavaThread *thread,
+IRT_ENTRY(void, InterpreterRuntime::post_field_modification(JavaThread *thread,
   oopDesc* obj, ConstantPoolCacheEntry *cp_entry, jvalue *value))
 
   Klass* k = cp_entry->f1_as_klass();
 
   // check the access_flags for the field in the klass

@@ -1293,28 +1296,28 @@
   }
 
   LastFrameAccessor last_frame(thread);
   JvmtiExport::post_raw_field_modification(thread, last_frame.method(), last_frame.bcp(), ik, h_obj,
                                            fid, sig_type, &fvalue);
-JRT_END
+IRT_END
 
-JRT_ENTRY(void, InterpreterRuntime::post_method_entry(JavaThread *thread))
+IRT_ENTRY(void, InterpreterRuntime::post_method_entry(JavaThread *thread))
   LastFrameAccessor last_frame(thread);
   JvmtiExport::post_method_entry(thread, last_frame.method(), last_frame.get_frame());
-JRT_END
+IRT_END
 
 
-JRT_ENTRY(void, InterpreterRuntime::post_method_exit(JavaThread *thread))
+IRT_ENTRY(void, InterpreterRuntime::post_method_exit(JavaThread *thread))
   LastFrameAccessor last_frame(thread);
   JvmtiExport::post_method_exit(thread, last_frame.method(), last_frame.get_frame());
-JRT_END
+IRT_END
 
-JRT_LEAF(int, InterpreterRuntime::interpreter_contains(address pc))
+IRT_LEAF(int, InterpreterRuntime::interpreter_contains(address pc))
 {
   return (Interpreter::contains(pc) ? 1 : 0);
 }
-JRT_END
+IRT_END
 
 
 // Implementation of SignatureHandlerLibrary
 
 #ifndef SHARING_FAST_NATIVE_FINGERPRINTS

@@ -1503,11 +1506,11 @@
 GrowableArray<uint64_t>* SignatureHandlerLibrary::_fingerprints = NULL;
 GrowableArray<address>*  SignatureHandlerLibrary::_handlers     = NULL;
 address                  SignatureHandlerLibrary::_buffer       = NULL;
 
 
-JRT_ENTRY(void, InterpreterRuntime::prepare_native_call(JavaThread* thread, Method* method))
+IRT_ENTRY(void, InterpreterRuntime::prepare_native_call(JavaThread* thread, Method* method))
   methodHandle m(thread, method);
   assert(m->is_native(), "sanity check");
   // lookup native function entry point if it doesn't exist
   bool in_base_library;
   if (!m->has_native_function()) {

@@ -1517,14 +1520,14 @@
   SignatureHandlerLibrary::add(m);
   // The interpreter entry point checks the signature handler first,
   // before trying to fetch the native entry point and klass mirror.
   // We must set the signature handler last, so that multiple processors
   // preparing the same method will be sure to see non-null entry & mirror.
-JRT_END
+IRT_END
 
 #if defined(IA32) || defined(AMD64) || defined(ARM)
-JRT_LEAF(void, InterpreterRuntime::popframe_move_outgoing_args(JavaThread* thread, void* src_address, void* dest_address))
+IRT_LEAF(void, InterpreterRuntime::popframe_move_outgoing_args(JavaThread* thread, void* src_address, void* dest_address))
   if (src_address == dest_address) {
     return;
   }
   ResetNoHandleMark rnm; // In a LEAF entry.
   HandleMark hm;

@@ -1536,21 +1539,21 @@
   Bytecode_invoke invoke(mh, bci);
   ArgumentSizeComputer asc(invoke.signature());
   int size_of_arguments = (asc.size() + (invoke.has_receiver() ? 1 : 0)); // receiver
   Copy::conjoint_jbytes(src_address, dest_address,
                        size_of_arguments * Interpreter::stackElementSize);
-JRT_END
+IRT_END
 #endif
 
 #if INCLUDE_JVMTI
 // This is a support of the JVMTI PopFrame interface.
 // Make sure it is an invokestatic of a polymorphic intrinsic that has a member_name argument
 // and return it as a vm_result so that it can be reloaded in the list of invokestatic parameters.
 // The member_name argument is a saved reference (in local#0) to the member_name.
 // For backward compatibility with some JDK versions (7, 8) it can also be a direct method handle.
 // FIXME: remove DMH case after j.l.i.InvokerBytecodeGenerator code shape is updated.
-JRT_ENTRY(void, InterpreterRuntime::member_name_arg_or_null(JavaThread* thread, address member_name,
+IRT_ENTRY(void, InterpreterRuntime::member_name_arg_or_null(JavaThread* thread, address member_name,
                                                             Method* method, address bcp))
   Bytecodes::Code code = Bytecodes::code_at(method, bcp);
   if (code != Bytecodes::_invokestatic) {
     return;
   }

@@ -1567,21 +1570,21 @@
     }
     thread->set_vm_result(member_name_oop);
   } else {
     thread->set_vm_result(NULL);
   }
-JRT_END
+IRT_END
 #endif // INCLUDE_JVMTI
 
 #ifndef PRODUCT
-// This must be a JRT_LEAF function because the interpreter must save registers on x86 to
+// This must be a IRT_LEAF function because the interpreter must save registers on x86 to
 // call this, which changes rsp and makes the interpreter's expression stack not walkable.
 // The generated code still uses call_VM because that will set up the frame pointer for
 // bcp and method.
-JRT_LEAF(intptr_t, InterpreterRuntime::trace_bytecode(JavaThread* thread, intptr_t preserve_this_value, intptr_t tos, intptr_t tos2))
+IRT_LEAF(intptr_t, InterpreterRuntime::trace_bytecode(JavaThread* thread, intptr_t preserve_this_value, intptr_t tos, intptr_t tos2))
   LastFrameAccessor last_frame(thread);
   assert(last_frame.is_interpreted_frame(), "must be an interpreted frame");
   methodHandle mh(thread, last_frame.method());
   BytecodeTracer::trace(mh, last_frame.bcp(), tos, tos2);
   return preserve_this_value;
-JRT_END
+IRT_END
 #endif // !PRODUCT
< prev index next >