< prev index next >

src/hotspot/share/runtime/sharedRuntime.hpp

Print this page

326   // deopt blob
327   static void generate_deopt_blob(void);
328 
329   static bool handle_ic_miss_helper_internal(Handle receiver, CompiledMethod* caller_nm, const frame& caller_frame,
330                                              methodHandle callee_method, Bytecodes::Code bc, CallInfo& call_info,
331                                              bool& needs_ic_stub_refill, TRAPS);
332 
333  public:
334   static DeoptimizationBlob* deopt_blob(void)      { return _deopt_blob; }
335 
336   // Resets a call-site in compiled code so it will get resolved again.
337   static methodHandle reresolve_call_site(TRAPS);
338 
339   // In the code prolog, if the klass comparison fails, the inline cache
340   // misses and the call site is patched to megamorphic
341   static methodHandle handle_ic_miss_helper(TRAPS);
342 
343   // Find the method that called us.
344   static methodHandle find_callee_method(TRAPS);
345 
346   static void monitor_enter_helper(oopDesc* obj, BasicLock* lock, JavaThread* thread);
347 
348   static void monitor_exit_helper(oopDesc* obj, BasicLock* lock, JavaThread* current);
349 
350  private:
351   static Handle find_callee_info(Bytecodes::Code& bc, CallInfo& callinfo, TRAPS);
352   static Handle find_callee_info_helper(vframeStream& vfst, Bytecodes::Code& bc, CallInfo& callinfo, TRAPS);
353 
354   static Method* extract_attached_method(vframeStream& vfst);
355 
356 #if defined(X86) && defined(COMPILER1)
357   // For Object.hashCode, System.identityHashCode try to pull hashCode from object header if available.
358   static void inline_check_hashcode_from_object_header(MacroAssembler* masm, const methodHandle& method, Register obj_reg, Register result);
359 #endif // X86 && COMPILER1
360 
361  public:
362 
363   // Read the array of BasicTypes from a Java signature, and compute where
364   // compiled Java code would like to put the results.  Values in reg_lo and
365   // reg_hi refer to 4-byte quantities.  Values less than SharedInfo::stack0 are
366   // registers, those above refer to 4-byte stack slots.  All stack slots are
367   // based off of the window top.  SharedInfo::stack0 refers to the first usable
368   // slot in the bottom of the frame. SharedInfo::stack0+1 refers to the memory word

474   // in the Java compiled code convention, marshals them to the native
475   // convention (handlizes oops, etc), transitions to native, makes the call,
476   // returns to java state (possibly blocking), unhandlizes any result and
477   // returns.
478   //
479   // The wrapper may contain special-case code if the given method
480   // is a compiled method handle adapter, such as _invokeBasic, _linkToVirtual, etc.
481   static nmethod* generate_native_wrapper(MacroAssembler* masm,
482                                           const methodHandle& method,
483                                           int compile_id,
484                                           BasicType* sig_bt,
485                                           VMRegPair* regs,
486                                           BasicType ret_type);
487 
488   // A compiled caller has just called the interpreter, but compiled code
489   // exists.  Patch the caller so he no longer calls into the interpreter.
490   static void fixup_callers_callsite(Method* moop, address ret_pc);
491   static bool should_fixup_call_destination(address destination, address entry_point, address caller_pc, Method* moop, CodeBlob* cb);
492 
493   // Slow-path Locking and Unlocking
494   static void complete_monitor_locking_C(oopDesc* obj, BasicLock* lock, JavaThread* current);
495   static void complete_monitor_unlocking_C(oopDesc* obj, BasicLock* lock, JavaThread* current);
496 
497   // Resolving of calls
498   static address resolve_static_call_C     (JavaThread* current);
499   static address resolve_virtual_call_C    (JavaThread* current);
500   static address resolve_opt_virtual_call_C(JavaThread* current);
501 
502   // arraycopy, the non-leaf version.  (See StubRoutines for all the leaf calls.)
503   static void slow_arraycopy_C(oopDesc* src,  jint src_pos,
504                                oopDesc* dest, jint dest_pos,
505                                jint length, JavaThread* thread);
506 
507   // handle ic miss with caller being compiled code
508   // wrong method handling (inline cache misses)
509   static address handle_wrong_method(JavaThread* current);
510   static address handle_wrong_method_abstract(JavaThread* current);
511   static address handle_wrong_method_ic_miss(JavaThread* current);
512 
513   static address handle_unsafe_access(JavaThread* thread, address next_pc);
514 
515 #ifndef PRODUCT

326   // deopt blob
327   static void generate_deopt_blob(void);
328 
329   static bool handle_ic_miss_helper_internal(Handle receiver, CompiledMethod* caller_nm, const frame& caller_frame,
330                                              methodHandle callee_method, Bytecodes::Code bc, CallInfo& call_info,
331                                              bool& needs_ic_stub_refill, TRAPS);
332 
333  public:
334   static DeoptimizationBlob* deopt_blob(void)      { return _deopt_blob; }
335 
336   // Resets a call-site in compiled code so it will get resolved again.
337   static methodHandle reresolve_call_site(TRAPS);
338 
339   // In the code prolog, if the klass comparison fails, the inline cache
340   // misses and the call site is patched to megamorphic
341   static methodHandle handle_ic_miss_helper(TRAPS);
342 
343   // Find the method that called us.
344   static methodHandle find_callee_method(TRAPS);
345 
346   static void monitor_enter_helper(oopDesc* obj, JavaThread* thread);
347 
348   static void monitor_exit_helper(oopDesc* obj, JavaThread* current);
349 
350  private:
351   static Handle find_callee_info(Bytecodes::Code& bc, CallInfo& callinfo, TRAPS);
352   static Handle find_callee_info_helper(vframeStream& vfst, Bytecodes::Code& bc, CallInfo& callinfo, TRAPS);
353 
354   static Method* extract_attached_method(vframeStream& vfst);
355 
356 #if defined(X86) && defined(COMPILER1)
357   // For Object.hashCode, System.identityHashCode try to pull hashCode from object header if available.
358   static void inline_check_hashcode_from_object_header(MacroAssembler* masm, const methodHandle& method, Register obj_reg, Register result);
359 #endif // X86 && COMPILER1
360 
361  public:
362 
363   // Read the array of BasicTypes from a Java signature, and compute where
364   // compiled Java code would like to put the results.  Values in reg_lo and
365   // reg_hi refer to 4-byte quantities.  Values less than SharedInfo::stack0 are
366   // registers, those above refer to 4-byte stack slots.  All stack slots are
367   // based off of the window top.  SharedInfo::stack0 refers to the first usable
368   // slot in the bottom of the frame. SharedInfo::stack0+1 refers to the memory word

474   // in the Java compiled code convention, marshals them to the native
475   // convention (handlizes oops, etc), transitions to native, makes the call,
476   // returns to java state (possibly blocking), unhandlizes any result and
477   // returns.
478   //
479   // The wrapper may contain special-case code if the given method
480   // is a compiled method handle adapter, such as _invokeBasic, _linkToVirtual, etc.
481   static nmethod* generate_native_wrapper(MacroAssembler* masm,
482                                           const methodHandle& method,
483                                           int compile_id,
484                                           BasicType* sig_bt,
485                                           VMRegPair* regs,
486                                           BasicType ret_type);
487 
488   // A compiled caller has just called the interpreter, but compiled code
489   // exists.  Patch the caller so he no longer calls into the interpreter.
490   static void fixup_callers_callsite(Method* moop, address ret_pc);
491   static bool should_fixup_call_destination(address destination, address entry_point, address caller_pc, Method* moop, CodeBlob* cb);
492 
493   // Slow-path Locking and Unlocking
494   static void complete_monitor_locking_C(oopDesc* obj, JavaThread* current);
495   static void complete_monitor_unlocking_C(oopDesc* obj, JavaThread* current);
496 
497   // Resolving of calls
498   static address resolve_static_call_C     (JavaThread* current);
499   static address resolve_virtual_call_C    (JavaThread* current);
500   static address resolve_opt_virtual_call_C(JavaThread* current);
501 
502   // arraycopy, the non-leaf version.  (See StubRoutines for all the leaf calls.)
503   static void slow_arraycopy_C(oopDesc* src,  jint src_pos,
504                                oopDesc* dest, jint dest_pos,
505                                jint length, JavaThread* thread);
506 
507   // handle ic miss with caller being compiled code
508   // wrong method handling (inline cache misses)
509   static address handle_wrong_method(JavaThread* current);
510   static address handle_wrong_method_abstract(JavaThread* current);
511   static address handle_wrong_method_ic_miss(JavaThread* current);
512 
513   static address handle_unsafe_access(JavaThread* thread, address next_pc);
514 
515 #ifndef PRODUCT
< prev index next >