Commit 46135f28 authored by hpayer@chromium.org's avatar hpayer@chromium.org

Remove failure tag.

BUG=
R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/397613002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22408 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 23eebeed
...@@ -216,12 +216,6 @@ const int kCodeAlignmentBits = 5; ...@@ -216,12 +216,6 @@ const int kCodeAlignmentBits = 5;
const intptr_t kCodeAlignment = 1 << kCodeAlignmentBits; const intptr_t kCodeAlignment = 1 << kCodeAlignmentBits;
const intptr_t kCodeAlignmentMask = kCodeAlignment - 1; const intptr_t kCodeAlignmentMask = kCodeAlignment - 1;
// Tag information for Failure.
// TODO(yangguo): remove this from space owner calculation.
const int kFailureTag = 3;
const int kFailureTagSize = 2;
const intptr_t kFailureTagMask = (1 << kFailureTagSize) - 1;
// Zap-value: The value used for zapping dead objects. // Zap-value: The value used for zapping dead objects.
// Should be a recognizable hex value tagged as a failure. // Should be a recognizable hex value tagged as a failure.
...@@ -537,9 +531,6 @@ enum StateTag { ...@@ -537,9 +531,6 @@ enum StateTag {
#define HAS_SMI_TAG(value) \ #define HAS_SMI_TAG(value) \
((reinterpret_cast<intptr_t>(value) & kSmiTagMask) == kSmiTag) ((reinterpret_cast<intptr_t>(value) & kSmiTagMask) == kSmiTag)
#define HAS_FAILURE_TAG(value) \
((reinterpret_cast<intptr_t>(value) & kFailureTagMask) == kFailureTag)
// OBJECT_POINTER_ALIGN returns the value aligned as a HeapObject pointer // OBJECT_POINTER_ALIGN returns the value aligned as a HeapObject pointer
#define OBJECT_POINTER_ALIGN(value) \ #define OBJECT_POINTER_ALIGN(value) \
(((value) + kObjectAlignmentMask) & ~kObjectAlignmentMask) (((value) + kObjectAlignmentMask) & ~kObjectAlignmentMask)
......
...@@ -312,20 +312,11 @@ class MemoryChunk { ...@@ -312,20 +312,11 @@ class MemoryChunk {
} }
Space* owner() const { Space* owner() const {
if ((reinterpret_cast<intptr_t>(owner_) & kFailureTagMask) == return owner_;
kFailureTag) {
return reinterpret_cast<Space*>(reinterpret_cast<intptr_t>(owner_) -
kFailureTag);
} else {
return NULL;
}
} }
void set_owner(Space* space) { void set_owner(Space* space) {
ASSERT((reinterpret_cast<intptr_t>(space) & kFailureTagMask) == 0); owner_ = space;
owner_ = reinterpret_cast<Address>(space) + kFailureTag;
ASSERT((reinterpret_cast<intptr_t>(owner_) & kFailureTagMask) ==
kFailureTag);
} }
base::VirtualMemory* reserved_memory() { base::VirtualMemory* reserved_memory() {
...@@ -691,10 +682,7 @@ class MemoryChunk { ...@@ -691,10 +682,7 @@ class MemoryChunk {
// If the chunk needs to remember its memory reservation, it is stored here. // If the chunk needs to remember its memory reservation, it is stored here.
base::VirtualMemory reservation_; base::VirtualMemory reservation_;
// The identity of the owning space. This is tagged as a failure pointer, but Space* owner_;
// no failure can be in an object, so this can be distinguished from any entry
// in a fixed array.
Address owner_;
Heap* heap_; Heap* heap_;
// Used by the store buffer to keep track of which pages to mark scan-on- // Used by the store buffer to keep track of which pages to mark scan-on-
// scavenge. // scavenge.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment