Index: src/hydrogen-instructions.h |
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h |
index 94f136143f0cafc6dbc772f587e3fa40d07cb742..6e10a383dea29e94befdcde26c02f258efb990e4 100644 |
--- a/src/hydrogen-instructions.h |
+++ b/src/hydrogen-instructions.h |
@@ -3291,6 +3291,7 @@ class HConstant: public HTemplateInstruction<0> { |
HType type, |
bool is_internalized_string, |
bool is_not_in_new_space, |
+ bool is_cell, |
bool boolean_value); |
Handle<Object> handle() { |
@@ -3339,6 +3340,10 @@ class HConstant: public HTemplateInstruction<0> { |
unique_id_ == UniqueValueId(heap->empty_string()); |
} |
+ bool IsCell() const { |
+ return is_cell_; |
+ } |
+ |
virtual Representation RequiredInputRepresentation(int index) { |
return Representation::None(); |
} |
@@ -3350,7 +3355,7 @@ class HConstant: public HTemplateInstruction<0> { |
return Representation::Tagged(); |
} |
- virtual bool EmitAtUses() { return !representation().IsDouble(); } |
+ virtual bool EmitAtUses(); |
virtual void PrintDataTo(StringStream* stream); |
virtual HType CalculateInferredType(); |
bool IsInteger() { return handle()->IsSmi(); } |
@@ -3465,6 +3470,7 @@ class HConstant: public HTemplateInstruction<0> { |
bool has_double_value_ : 1; |
bool is_internalized_string_ : 1; // TODO(yangguo): make this part of HType. |
bool is_not_in_new_space_ : 1; |
+ bool is_cell_ : 1; |
bool boolean_value_ : 1; |
int32_t int32_value_; |
double double_value_; |
@@ -5118,6 +5124,9 @@ inline bool ReceiverObjectNeedsWriteBarrier(HValue* object, |
HInnerAllocatedObject::cast(object)->base_object(), |
new_space_dominator); |
} |
+ if (object->IsConstant() && HConstant::cast(object)->IsCell()) { |
+ return false; |
+ } |
if (object != new_space_dominator) return true; |
if (object->IsAllocateObject()) return false; |
if (object->IsAllocate()) { |
@@ -5379,6 +5388,9 @@ class HObjectAccess { |
static HObjectAccess ForField(Handle<Map> map, |
LookupResult *lookup, Handle<String> name = Handle<String>::null()); |
+ // Create an access for the payload of a Cell or JSGlobalPropertyCell. |
+ static HObjectAccess ForCellPayload(Isolate* isolate); |
+ |
void PrintTo(StringStream* stream); |
inline bool Equals(HObjectAccess that) const { |