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

Unified Diff: src/spaces.h

Issue 398473002: Revert "Remove failure tag.". (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/globals.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/spaces.h
diff --git a/src/spaces.h b/src/spaces.h
index a3cc737784f1947ba430d6b17e39b989349bc241..efed18ec6d4778c26ef7bd1fd1067e68230b43ff 100644
--- a/src/spaces.h
+++ b/src/spaces.h
@@ -312,11 +312,20 @@ class MemoryChunk {
}
Space* owner() const {
- return owner_;
+ if ((reinterpret_cast<intptr_t>(owner_) & kFailureTagMask) ==
+ kFailureTag) {
+ return reinterpret_cast<Space*>(reinterpret_cast<intptr_t>(owner_) -
+ kFailureTag);
+ } else {
+ return NULL;
+ }
}
void set_owner(Space* space) {
- owner_ = space;
+ ASSERT((reinterpret_cast<intptr_t>(space) & kFailureTagMask) == 0);
+ owner_ = reinterpret_cast<Address>(space) + kFailureTag;
+ ASSERT((reinterpret_cast<intptr_t>(owner_) & kFailureTagMask) ==
+ kFailureTag);
}
base::VirtualMemory* reserved_memory() {
@@ -682,7 +691,10 @@ class MemoryChunk {
// If the chunk needs to remember its memory reservation, it is stored here.
base::VirtualMemory reservation_;
- Space* owner_;
+ // The identity of the owning space. This is tagged as a failure pointer, but
+ // no failure can be in an object, so this can be distinguished from any entry
+ // in a fixed array.
+ Address owner_;
Heap* heap_;
// Used by the store buffer to keep track of which pages to mark scan-on-
// scavenge.
« no previous file with comments | « src/globals.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698