Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Unified Diff: src/objects.h

Issue 14996004: Track heap objects. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698