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

src/share/vm/c1/c1_LIRAssembler.cpp

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


  76     switch (code) {
  77       case Bytecodes::_new:
  78       case Bytecodes::_anewarray:
  79       case Bytecodes::_multianewarray:
  80       case Bytecodes::_instanceof:
  81       case Bytecodes::_checkcast:
  82         break;
  83       default:
  84         ShouldNotReachHere();
  85     }
  86   } else if (patch->id() == PatchingStub::load_mirror_id) {
  87     switch (code) {
  88       case Bytecodes::_putstatic:
  89       case Bytecodes::_getstatic:
  90       case Bytecodes::_ldc:
  91       case Bytecodes::_ldc_w:
  92         break;
  93       default:
  94         ShouldNotReachHere();
  95     }



  96   } else {
  97     ShouldNotReachHere();
  98   }
  99 #endif
 100 }
 101 








 102 
 103 //---------------------------------------------------------------
 104 
 105 
 106 LIR_Assembler::LIR_Assembler(Compilation* c):
 107    _compilation(c)
 108  , _masm(c->masm())
 109  , _bs(Universe::heap()->barrier_set())
 110  , _frame_map(c->frame_map())
 111  , _current_block(NULL)
 112  , _pending_non_safepoint(NULL)
 113  , _pending_non_safepoint_offset(0)
 114 {
 115   _slow_case_stubs = new CodeStubList();
 116 }
 117 
 118 
 119 LIR_Assembler::~LIR_Assembler() {
 120 }
 121 




  76     switch (code) {
  77       case Bytecodes::_new:
  78       case Bytecodes::_anewarray:
  79       case Bytecodes::_multianewarray:
  80       case Bytecodes::_instanceof:
  81       case Bytecodes::_checkcast:
  82         break;
  83       default:
  84         ShouldNotReachHere();
  85     }
  86   } else if (patch->id() == PatchingStub::load_mirror_id) {
  87     switch (code) {
  88       case Bytecodes::_putstatic:
  89       case Bytecodes::_getstatic:
  90       case Bytecodes::_ldc:
  91       case Bytecodes::_ldc_w:
  92         break;
  93       default:
  94         ShouldNotReachHere();
  95     }
  96   } else if (patch->id() == PatchingStub::load_appendix_id) {
  97     Bytecodes::Code bc_raw = info->scope()->method()->raw_code_at_bci(info->stack()->bci());
  98     assert(Bytecodes::has_optional_appendix(bc_raw), "unexpected appendix resolution");
  99   } else {
 100     ShouldNotReachHere();
 101   }
 102 #endif
 103 }
 104 
 105 PatchingStub::PatchID LIR_Assembler::patching_id(CodeEmitInfo* info) {
 106   IRScope* scope = info->scope();
 107   Bytecodes::Code bc_raw = scope->method()->raw_code_at_bci(info->stack()->bci());
 108   if (Bytecodes::has_optional_appendix(bc_raw)) {
 109     return PatchingStub::load_appendix_id;
 110   }
 111   return PatchingStub::load_mirror_id;
 112 }
 113 
 114 //---------------------------------------------------------------
 115 
 116 
 117 LIR_Assembler::LIR_Assembler(Compilation* c):
 118    _compilation(c)
 119  , _masm(c->masm())
 120  , _bs(Universe::heap()->barrier_set())
 121  , _frame_map(c->frame_map())
 122  , _current_block(NULL)
 123  , _pending_non_safepoint(NULL)
 124  , _pending_non_safepoint_offset(0)
 125 {
 126   _slow_case_stubs = new CodeStubList();
 127 }
 128 
 129 
 130 LIR_Assembler::~LIR_Assembler() {
 131 }
 132 


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