Index: src/objects.h |
diff --git a/src/objects.h b/src/objects.h |
index 1b4ed5b3b572e8b7cb17b85bddf6479496ef692b..7dfc46291b0ad01bbc88d5749dbae24537b292e7 100644 |
--- a/src/objects.h |
+++ b/src/objects.h |
@@ -1066,6 +1066,13 @@ class Object : public MaybeObject { |
return Representation::Smi(); |
} else if (FLAG_track_double_fields && IsHeapNumber()) { |
return Representation::Double(); |
+ } else if (FLAG_track_heap_object_fields && !IsUndefined()) { |
+ // Don't track undefined as heapobject because it's also used as temporary |
+ // value for computed fields that may turn out to be Smi. That combination |
+ // will go tagged, so go tagged immediately. |
+ // TODO(verwaest): Change once we track computed boilerplate fields. |
+ ASSERT(IsHeapObject()); |
+ return Representation::HeapObject(); |
} else { |
return Representation::Tagged(); |
} |
@@ -1076,6 +1083,8 @@ class Object : public MaybeObject { |
return IsSmi(); |
} else if (FLAG_track_double_fields && representation.IsDouble()) { |
return IsNumber(); |
+ } else if (FLAG_track_heap_object_fields && representation.IsHeapObject()) { |
+ return IsHeapObject(); |
} |
return true; |
} |