Index: src/hydrogen-instructions.h |
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h |
index 6e7435af0627fc68d384fe81f37e80d2b6262a78..1bd27cb68561205f3ea927756bc0695ec652439c 100644 |
--- a/src/hydrogen-instructions.h |
+++ b/src/hydrogen-instructions.h |
@@ -5374,6 +5374,11 @@ inline bool ReceiverObjectNeedsWriteBarrier(HValue* object, |
if (object->IsConstant() && HConstant::cast(object)->IsCell()) { |
return false; |
} |
+ if (object->IsConstant() && |
+ HConstant::cast(object)->HasExternalReferenceValue()) { |
+ // Stores to external references require no write barriers |
+ return false; |
+ } |
if (object != new_space_dominator) return true; |
if (object->IsAllocate()) { |
return !HAllocate::cast(object)->IsNewSpaceAllocation(); |
@@ -6155,6 +6160,7 @@ class HStoreNamedField: public HTemplateInstruction<2> { |
if (field_representation().IsDouble()) return false; |
if (field_representation().IsSmi()) return false; |
if (field_representation().IsInteger32()) return false; |
+ if (field_representation().IsExternal()) return false; |
return StoringValueNeedsWriteBarrier(value()) && |
ReceiverObjectNeedsWriteBarrier(object(), new_space_dominator()); |
} |