< prev index next >

src/hotspot/share/c1/c1_LIRAssembler.cpp

Print this page

        

@@ -160,10 +160,13 @@
 
 bool LIR_Assembler::needs_icache(ciMethod* method) const {
   return !method->is_static();
 }
 
+bool LIR_Assembler::needs_clinit_barrier_on_entry(ciMethod* method) const {
+  return UseFastClassInitChecks && method->needs_clinit_barrier();
+}
 
 int LIR_Assembler::code_offset() const {
   return _masm->offset();
 }
 

@@ -619,10 +622,13 @@
       if (needs_icache(compilation()->method())) {
         check_icache();
       }
       offsets()->set_value(CodeOffsets::Verified_Entry, _masm->offset());
       _masm->verified_entry();
+      if (needs_clinit_barrier_on_entry(compilation()->method())) {
+        clinit_barrier(compilation()->method());
+      }
       build_frame();
       offsets()->set_value(CodeOffsets::Frame_Complete, _masm->offset());
       break;
 
     case lir_osr_entry:
< prev index next >