# HG changeset patch # User Christos Kotselidis # Date 1385984693 -3600 # Node ID ffa3d2d26cc2a6e7c85cd6fda112853b2bdd946d # Parent f9f4503a4ab52c2e22adc37c7eb485396b45c144 Ommit G1 Pre barrier in init writes of instance objects diff -r f9f4503a4ab5 -r ffa3d2d26cc2 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/phases/WriteBarrierAdditionPhase.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/phases/WriteBarrierAdditionPhase.java Thu Nov 21 15:04:54 2013 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/phases/WriteBarrierAdditionPhase.java Mon Dec 02 12:44:53 2013 +0100 @@ -98,7 +98,9 @@ } } else if (barrierType == BarrierType.IMPRECISE) { if (useG1GC()) { - addG1PreWriteBarrier(node, node.object(), null, node.location(), true, node.getNullCheck(), graph); + if (!node.isInitialization()) { + addG1PreWriteBarrier(node, node.object(), null, node.location(), true, node.getNullCheck(), graph); + } addG1PostWriteBarrier(node, node.object(), node.value(), node.location(), false, graph); } else { addSerialPostWriteBarrier(node, node.object(), node.value(), node.location(), false, graph);