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

Unified Diff: src/heap-inl.h

Issue 7029030: Use page header information to test for InNewSpace. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Created 9 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
Index: src/heap-inl.h
diff --git a/src/heap-inl.h b/src/heap-inl.h
index bb79b47d480c35c102673d10d8cc0affd85fd983..3bd479d008b9830d367c77c0374bbf0a1ec15512 100644
--- a/src/heap-inl.h
+++ b/src/heap-inl.h
@@ -254,7 +254,7 @@ MaybeObject* Heap::AllocateRawCell() {
bool Heap::InNewSpace(Object* object) {
- bool result = new_space_.Contains(object);
+ bool result = new_space_.PageContains(object);
Erik Corry 2011/05/19 07:22:32 Not mad keen on this name, but I guess it will go
Lasse Reichstein 2011/05/19 08:40:40 That is the idea. If anything, this name is a lit
ASSERT(!result || // Either not in new space
gc_state_ != NOT_IN_GC || // ... or in the middle of GC
InToSpace(object)); // ... or in to-space (where we allocate).
@@ -267,6 +267,11 @@ bool Heap::InNewSpace(Address addr) {
}
+bool Heap::InNewSpacePage(Address addr) {
+ return new_space_.PageContains(addr);
+}
+
+
bool Heap::InFromSpace(Object* object) {
return new_space_.FromSpaceContains(object);
}
« no previous file with comments | « src/heap.h ('k') | src/ia32/macro-assembler-ia32.h » ('j') | src/ia32/macro-assembler-ia32-inl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698