src/share/vm/c1/c1_LIR.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/c1

src/share/vm/c1/c1_LIR.hpp

Print this page
rev 5100 : 7199175: JSR 292: C1 needs patching when invokedynamic/invokehandle call site is not linked
Summary: Do patching rather bailing out for unlinked call with appendix
Reviewed-by: twisti, kvn


1194   , _method(method)
1195   , _method_handle_invoke_SP_save_opr(LIR_OprFact::illegalOpr)
1196   { assert(is_in_range(code, begin_opJavaCall, end_opJavaCall), "code check"); }
1197 
1198   LIR_OpJavaCall(LIR_Code code, ciMethod* method,
1199                  LIR_Opr receiver, LIR_Opr result, intptr_t vtable_offset,
1200                  LIR_OprList* arguments, CodeEmitInfo* info)
1201   : LIR_OpCall(code, (address)vtable_offset, result, arguments, info)
1202   , _receiver(receiver)
1203   , _method(method)
1204   , _method_handle_invoke_SP_save_opr(LIR_OprFact::illegalOpr)
1205   { assert(is_in_range(code, begin_opJavaCall, end_opJavaCall), "code check"); }
1206 
1207   LIR_Opr receiver() const                       { return _receiver; }
1208   ciMethod* method() const                       { return _method;   }
1209 
1210   // JSR 292 support.
1211   bool is_invokedynamic() const                  { return code() == lir_dynamic_call; }
1212   bool is_method_handle_invoke() const {
1213     return
1214       is_invokedynamic()  // An invokedynamic is always a MethodHandle call site.
1215       ||
1216       method()->is_compiled_lambda_form()  // Java-generated adapter
1217       ||
1218       method()->is_method_handle_intrinsic();  // JVM-generated MH intrinsic
1219   }
1220 
1221   intptr_t vtable_offset() const {
1222     assert(_code == lir_virtual_call, "only have vtable for real vcall");
1223     return (intptr_t) addr();
1224   }
1225 
1226   virtual void emit_code(LIR_Assembler* masm);
1227   virtual LIR_OpJavaCall* as_OpJavaCall() { return this; }
1228   virtual void print_instr(outputStream* out) const PRODUCT_RETURN;
1229 };
1230 
1231 // --------------------------------------------------
1232 // LIR_OpLabel
1233 // --------------------------------------------------
1234 // Location where a branch can continue
1235 class LIR_OpLabel: public LIR_Op {




1194   , _method(method)
1195   , _method_handle_invoke_SP_save_opr(LIR_OprFact::illegalOpr)
1196   { assert(is_in_range(code, begin_opJavaCall, end_opJavaCall), "code check"); }
1197 
1198   LIR_OpJavaCall(LIR_Code code, ciMethod* method,
1199                  LIR_Opr receiver, LIR_Opr result, intptr_t vtable_offset,
1200                  LIR_OprList* arguments, CodeEmitInfo* info)
1201   : LIR_OpCall(code, (address)vtable_offset, result, arguments, info)
1202   , _receiver(receiver)
1203   , _method(method)
1204   , _method_handle_invoke_SP_save_opr(LIR_OprFact::illegalOpr)
1205   { assert(is_in_range(code, begin_opJavaCall, end_opJavaCall), "code check"); }
1206 
1207   LIR_Opr receiver() const                       { return _receiver; }
1208   ciMethod* method() const                       { return _method;   }
1209 
1210   // JSR 292 support.
1211   bool is_invokedynamic() const                  { return code() == lir_dynamic_call; }
1212   bool is_method_handle_invoke() const {
1213     return


1214       method()->is_compiled_lambda_form()  // Java-generated adapter
1215       ||
1216       method()->is_method_handle_intrinsic();  // JVM-generated MH intrinsic
1217   }
1218 
1219   intptr_t vtable_offset() const {
1220     assert(_code == lir_virtual_call, "only have vtable for real vcall");
1221     return (intptr_t) addr();
1222   }
1223 
1224   virtual void emit_code(LIR_Assembler* masm);
1225   virtual LIR_OpJavaCall* as_OpJavaCall() { return this; }
1226   virtual void print_instr(outputStream* out) const PRODUCT_RETURN;
1227 };
1228 
1229 // --------------------------------------------------
1230 // LIR_OpLabel
1231 // --------------------------------------------------
1232 // Location where a branch can continue
1233 class LIR_OpLabel: public LIR_Op {


src/share/vm/c1/c1_LIR.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File