hotspot/src/share/vm/c1/c1_LIR.hpp
changeset 5046 27e801a857cb
parent 4646 e0683487dbe5
child 5048 c31b6243f37e
equal deleted inserted replaced
5044:7e40acdf2163 5046:27e801a857cb
   838   , begin_opJavaCall
   838   , begin_opJavaCall
   839       , lir_static_call
   839       , lir_static_call
   840       , lir_optvirtual_call
   840       , lir_optvirtual_call
   841       , lir_icvirtual_call
   841       , lir_icvirtual_call
   842       , lir_virtual_call
   842       , lir_virtual_call
       
   843       , lir_dynamic_call
   843   , end_opJavaCall
   844   , end_opJavaCall
   844   , begin_opArrayCopy
   845   , begin_opArrayCopy
   845       , lir_arraycopy
   846       , lir_arraycopy
   846   , end_opArrayCopy
   847   , end_opArrayCopy
   847   , begin_opLock
   848   , begin_opLock
  1050   , _method(method)          { assert(is_in_range(code, begin_opJavaCall, end_opJavaCall), "code check"); }
  1051   , _method(method)          { assert(is_in_range(code, begin_opJavaCall, end_opJavaCall), "code check"); }
  1051 
  1052 
  1052   LIR_Opr receiver() const                       { return _receiver; }
  1053   LIR_Opr receiver() const                       { return _receiver; }
  1053   ciMethod* method() const                       { return _method;   }
  1054   ciMethod* method() const                       { return _method;   }
  1054 
  1055 
       
  1056   // JSR 292 support.
       
  1057   bool is_invokedynamic() const                  { return code() == lir_dynamic_call; }
       
  1058   bool is_method_handle_invoke() const {
       
  1059     return
       
  1060       is_invokedynamic()  // An invokedynamic is always a MethodHandle call site.
       
  1061       ||
       
  1062       (method()->holder()->name() == ciSymbol::java_dyn_MethodHandle() &&
       
  1063        method()->name()           == ciSymbol::invoke_name());
       
  1064   }
       
  1065 
  1055   intptr_t vtable_offset() const {
  1066   intptr_t vtable_offset() const {
  1056     assert(_code == lir_virtual_call, "only have vtable for real vcall");
  1067     assert(_code == lir_virtual_call, "only have vtable for real vcall");
  1057     return (intptr_t) addr();
  1068     return (intptr_t) addr();
  1058   }
  1069   }
  1059 
  1070 
  1763     append(new LIR_OpJavaCall(lir_icvirtual_call, method, receiver, result, dest, arguments, info));
  1774     append(new LIR_OpJavaCall(lir_icvirtual_call, method, receiver, result, dest, arguments, info));
  1764   }
  1775   }
  1765   void call_virtual(ciMethod* method, LIR_Opr receiver, LIR_Opr result,
  1776   void call_virtual(ciMethod* method, LIR_Opr receiver, LIR_Opr result,
  1766                     intptr_t vtable_offset, LIR_OprList* arguments, CodeEmitInfo* info) {
  1777                     intptr_t vtable_offset, LIR_OprList* arguments, CodeEmitInfo* info) {
  1767     append(new LIR_OpJavaCall(lir_virtual_call, method, receiver, result, vtable_offset, arguments, info));
  1778     append(new LIR_OpJavaCall(lir_virtual_call, method, receiver, result, vtable_offset, arguments, info));
       
  1779   }
       
  1780   void call_dynamic(ciMethod* method, LIR_Opr receiver, LIR_Opr result,
       
  1781                     address dest, LIR_OprList* arguments, CodeEmitInfo* info) {
       
  1782     append(new LIR_OpJavaCall(lir_dynamic_call, method, receiver, result, dest, arguments, info));
  1768   }
  1783   }
  1769 
  1784 
  1770   void get_thread(LIR_Opr result)                { append(new LIR_Op0(lir_get_thread, result)); }
  1785   void get_thread(LIR_Opr result)                { append(new LIR_Op0(lir_get_thread, result)); }
  1771   void word_align()                              { append(new LIR_Op0(lir_word_align)); }
  1786   void word_align()                              { append(new LIR_Op0(lir_word_align)); }
  1772   void membar()                                  { append(new LIR_Op0(lir_membar)); }
  1787   void membar()                                  { append(new LIR_Op0(lir_membar)); }