hotspot/src/share/vm/c1/c1_GraphBuilder.cpp
changeset 23190 e8bbf9cd711e
parent 22893 e3a2b513713a
child 23191 5f3c5592f0e8
equal deleted inserted replaced
23189:27cf1316709b 23190:e8bbf9cd711e
  1434     call_register_finalizer();
  1434     call_register_finalizer();
  1435   }
  1435   }
  1436 
  1436 
  1437   bool need_mem_bar = false;
  1437   bool need_mem_bar = false;
  1438   if (method()->name() == ciSymbol::object_initializer_name() &&
  1438   if (method()->name() == ciSymbol::object_initializer_name() &&
  1439       scope()->wrote_final()) {
  1439       (scope()->wrote_final() || (AlwaysSafeConstructors && scope()->wrote_fields()))) {
  1440     need_mem_bar = true;
  1440     need_mem_bar = true;
  1441   }
  1441   }
  1442 
  1442 
  1443   // Check to see whether we are inlining. If so, Return
  1443   // Check to see whether we are inlining. If so, Return
  1444   // instructions become Gotos to the continuation point.
  1444   // instructions become Gotos to the continuation point.
  1546     }
  1546     }
  1547   }
  1547   }
  1548 
  1548 
  1549   if (field->is_final() && (code == Bytecodes::_putfield)) {
  1549   if (field->is_final() && (code == Bytecodes::_putfield)) {
  1550     scope()->set_wrote_final();
  1550     scope()->set_wrote_final();
       
  1551   }
       
  1552 
       
  1553   if (code == Bytecodes::_putfield) {
       
  1554     scope()->set_wrote_fields();
  1551   }
  1555   }
  1552 
  1556 
  1553   const int offset = !needs_patching ? field->offset() : -1;
  1557   const int offset = !needs_patching ? field->offset() : -1;
  1554   switch (code) {
  1558   switch (code) {
  1555     case Bytecodes::_getstatic: {
  1559     case Bytecodes::_getstatic: {