Mercurial > hg > truffle
diff src/share/vm/c1/c1_GraphBuilder.cpp @ 14704:b51e29501f30
Merged with jdk9/dev/hotspot changeset 9486a41de3b7
author | twisti |
---|---|
date | Tue, 18 Mar 2014 20:19:10 -0700 |
parents | d8041d695d19 1179450ad3ee |
children | 92aa6797d639 |
line wrap: on
line diff
--- a/src/share/vm/c1/c1_GraphBuilder.cpp Thu Mar 20 22:30:26 2014 +0100 +++ b/src/share/vm/c1/c1_GraphBuilder.cpp Tue Mar 18 20:19:10 2014 -0700 @@ -1436,7 +1436,7 @@ bool need_mem_bar = false; if (method()->name() == ciSymbol::object_initializer_name() && - scope()->wrote_final()) { + (scope()->wrote_final() || (AlwaysSafeConstructors && scope()->wrote_fields()))) { need_mem_bar = true; } @@ -1550,6 +1550,10 @@ scope()->set_wrote_final(); } + if (code == Bytecodes::_putfield) { + scope()->set_wrote_fields(); + } + const int offset = !needs_patching ? field->offset() : -1; switch (code) { case Bytecodes::_getstatic: { @@ -3769,11 +3773,14 @@ } // now perform tests that are based on flag settings - if (callee->force_inline()) { - if (inline_level() > MaxForceInlineLevel) INLINE_BAILOUT("MaxForceInlineLevel"); - print_inlining(callee, "force inline by annotation"); - } else if (callee->should_inline()) { - print_inlining(callee, "force inline by CompileOracle"); + if (callee->force_inline() || callee->should_inline()) { + if (inline_level() > MaxForceInlineLevel ) INLINE_BAILOUT("MaxForceInlineLevel"); + if (recursive_inline_level(callee) > MaxRecursiveInlineLevel) INLINE_BAILOUT("recursive inlining too deep"); + + const char* msg = ""; + if (callee->force_inline()) msg = "force inline by annotation"; + if (callee->should_inline()) msg = "force inline by CompileOracle"; + print_inlining(callee, msg); } else { // use heuristic controls on inlining if (inline_level() > MaxInlineLevel ) INLINE_BAILOUT("inlining too deep");