< prev index next >

src/hotspot/share/interpreter/zero/bytecodeInterpreter.cpp

Print this page
*** 1999,14 ***
                  size_t hdr_size = oopDesc::header_size();
                  Copy::fill_to_words(result + hdr_size, obj_size - hdr_size, 0);
                }
  
                // Initialize header, mirrors MemAllocator.
!               oopDesc::set_mark(result, markWord::prototype());
!               oopDesc::set_klass_gap(result, 0);
!               oopDesc::release_set_klass(result, ik);
! 
                oop obj = cast_to_oop(result);
  
                // Must prevent reordering of stores for object initialization
                // with stores that publish the new object.
                OrderAccess::storestore();
--- 1999,17 ---
                  size_t hdr_size = oopDesc::header_size();
                  Copy::fill_to_words(result + hdr_size, obj_size - hdr_size, 0);
                }
  
                // Initialize header, mirrors MemAllocator.
!               if (UseCompactObjectHeaders) {
!                 oopDesc::release_set_mark(result, ik->prototype_header());
!               } else {
!                 oopDesc::set_mark(result, markWord::prototype());
+                 oopDesc::set_klass_gap(result, 0);
+                 oopDesc::release_set_klass(result, ik);
+               }
                oop obj = cast_to_oop(result);
  
                // Must prevent reordering of stores for object initialization
                // with stores that publish the new object.
                OrderAccess::storestore();
< prev index next >