hotspot/src/share/vm/opto/parse3.cpp
changeset 23190 e8bbf9cd711e
parent 23189 27cf1316709b
child 23528 8f1a7f5e8066
equal deleted inserted replaced
23189:27cf1316709b 23190:e8bbf9cd711e
   332     if (is_field) {
   332     if (is_field) {
   333       set_wrote_volatile(true);
   333       set_wrote_volatile(true);
   334     }
   334     }
   335   }
   335   }
   336 
   336 
       
   337   if (is_field) {
       
   338     set_wrote_fields(true);
       
   339   }
       
   340 
   337   // If the field is final, the rules of Java say we are in <init> or <clinit>.
   341   // If the field is final, the rules of Java say we are in <init> or <clinit>.
   338   // Note the presence of writes to final non-static fields, so that we
   342   // Note the presence of writes to final non-static fields, so that we
   339   // can insert a memory barrier later on to keep the writes from floating
   343   // can insert a memory barrier later on to keep the writes from floating
   340   // out of the constructor.
   344   // out of the constructor.
   341   // Any method can write a @Stable field; insert memory barriers after those also.
   345   // Any method can write a @Stable field; insert memory barriers after those also.
   342   if (is_field && (field->is_final() || field->is_stable())) {
   346   if (is_field && (field->is_final() || field->is_stable())) {
   343     set_wrote_final(true);
   347     if (field->is_final()) {
       
   348         set_wrote_final(true);
       
   349     }
       
   350     if (field->is_stable()) {
       
   351         set_wrote_stable(true);
       
   352     }
       
   353 
   344     // Preserve allocation ptr to create precedent edge to it in membar
   354     // Preserve allocation ptr to create precedent edge to it in membar
   345     // generated on exit from constructor.
   355     // generated on exit from constructor.
   346     if (C->eliminate_boxing() &&
   356     if (C->eliminate_boxing() &&
   347         adr_type->isa_oopptr() && adr_type->is_oopptr()->is_ptr_to_boxed_value() &&
   357         adr_type->isa_oopptr() && adr_type->is_oopptr()->is_ptr_to_boxed_value() &&
   348         AllocateNode::Ideal_allocation(obj, &_gvn) != NULL) {
   358         AllocateNode::Ideal_allocation(obj, &_gvn) != NULL) {