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

Unified Diff: src/objects-inl.h

Issue 413693002: Use heap iterator in store buffer when page was swept precisely. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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/objects.h ('k') | src/store-buffer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 36e7eb1758769709f12c17d6abf609f422dd9359..b26a857e1920fa691b2eceb244fd0272da285f58 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -1480,6 +1480,24 @@ int HeapObject::Size() {
}
+bool HeapObject::MayContainNewSpacePointers() {
+ InstanceType type = map()->instance_type();
+ if (type <= LAST_NAME_TYPE) {
+ if (type == SYMBOL_TYPE) {
+ return true;
+ }
+ ASSERT(type < FIRST_NONSTRING_TYPE);
+ // There are four string representations: sequential strings, external
+ // strings, cons strings, and sliced strings.
+ // Only the latter two contain non-map-word pointers to heap objects.
+ return ((type & kIsIndirectStringMask) == kIsIndirectStringTag);
+ }
+ // The ConstantPoolArray contains heap pointers, but not new space pointers.
+ if (type == CONSTANT_POOL_ARRAY_TYPE) return false;
+ return (type > LAST_DATA_TYPE);
+}
+
+
void HeapObject::IteratePointers(ObjectVisitor* v, int start, int end) {
v->VisitPointers(reinterpret_cast<Object**>(FIELD_ADDR(this, start)),
reinterpret_cast<Object**>(FIELD_ADDR(this, end)));
« no previous file with comments | « src/objects.h ('k') | src/store-buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698