Index: runtime/vm/intermediate_language_x64.cc |
=================================================================== |
--- runtime/vm/intermediate_language_x64.cc (revision 11354) |
+++ runtime/vm/intermediate_language_x64.cc (working copy) |
@@ -920,12 +920,12 @@ |
__ j(ABOVE_EQUAL, deopt); |
// Note that index is Smi, i.e, times 4. |
ASSERT(kSmiTagShift == 1); |
- if (this->value()->BindsToConstant()) { |
- // Compile time constants are Smi or allocated in the old space. |
- __ movq(FieldAddress(receiver, index, TIMES_4, sizeof(RawArray)), |
+ if (this->value()->NeedsStoreBuffer()) { |
+ __ StoreIntoObject(receiver, |
+ FieldAddress(receiver, index, TIMES_4, sizeof(RawArray)), |
value); |
} else { |
- __ StoreIntoObject(receiver, |
+ __ StoreIntoObjectNoBarrier(receiver, |
FieldAddress(receiver, index, TIMES_4, sizeof(RawArray)), |
value); |
} |
@@ -939,12 +939,12 @@ |
__ movq(temp, FieldAddress(receiver, GrowableObjectArray::data_offset())); |
// Note that index is Smi, i.e, times 4. |
ASSERT(kSmiTagShift == 1); |
- if (this->value()->BindsToConstant()) { |
- // Compile time constants are Smi or allocated in the old space. |
- __ movq(FieldAddress(temp, index, TIMES_4, sizeof(RawArray)), |
+ if (this->value()->NeedsStoreBuffer()) { |
+ __ StoreIntoObject(temp, |
+ FieldAddress(temp, index, TIMES_4, sizeof(RawArray)), |
value); |
} else { |
- __ StoreIntoObject(temp, |
+ __ StoreIntoObjectNoBarrier(temp, |
FieldAddress(temp, index, TIMES_4, sizeof(RawArray)), |
value); |
} |
@@ -1018,12 +1018,12 @@ |
ASSERT(ic_data() != NULL); |
compiler->EmitClassChecksNoSmi(*ic_data(), instance_reg, temp_reg, deopt); |
} |
- if (this->value()->BindsToConstant()) { |
- // Compile time constants are Smi or allocated in the old space. |
- __ movq(FieldAddress(instance_reg, field().Offset()), value_reg); |
- } else { |
+ if (this->value()->NeedsStoreBuffer()) { |
__ StoreIntoObject(instance_reg, |
FieldAddress(instance_reg, field().Offset()), value_reg); |
+ } else { |
+ __ StoreIntoObjectNoBarrier(instance_reg, |
+ FieldAddress(instance_reg, field().Offset()), value_reg); |
} |
} |
@@ -1057,11 +1057,11 @@ |
ASSERT(locs()->out().reg() == value); |
__ LoadObject(temp, field()); |
- if (this->value()->BindsToConstant()) { |
- // Compile time constants are Smi or allocated in the old space. |
- __ movq(FieldAddress(temp, Field::value_offset()), value); |
+ if (this->value()->NeedsStoreBuffer()) { |
+ __ StoreIntoObject(temp, FieldAddress(temp, Field::value_offset()), value); |
} else { |
- __ StoreIntoObject(temp, FieldAddress(temp, Field::value_offset()), value); |
+ __ StoreIntoObjectNoBarrier( |
+ temp, FieldAddress(temp, Field::value_offset()), value); |
} |
} |