Reviewers: Michael Starzinger,
Description:
Remove failure tag.
BUG=
Please review this at https://codereview.chromium.org/397613002/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+3, -25 lines):
M src/globals.h
M src/spaces.h
Index: src/globals.h
diff --git a/src/globals.h b/src/globals.h
index
871164eaefe6059f9ed700beb3dbbdca9d780078..d5ae4a9baa6dab6f179aed08c8de3fd4e62e27a0
100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -216,13 +216,6 @@ const int kCodeAlignmentBits = 5;
const intptr_t kCodeAlignment = 1 << kCodeAlignmentBits;
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.
// Should be a recognizable hex value tagged as a failure.
#ifdef V8_HOST_ARCH_64_BIT
@@ -537,9 +530,6 @@ enum StateTag {
#define HAS_SMI_TAG(value) \
((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
#define OBJECT_POINTER_ALIGN(value) \
(((value) + kObjectAlignmentMask) & ~kObjectAlignmentMask)
Index: src/spaces.h
diff --git a/src/spaces.h b/src/spaces.h
index
efed18ec6d4778c26ef7bd1fd1067e68230b43ff..a3cc737784f1947ba430d6b17e39b989349bc241
100644
--- a/src/spaces.h
+++ b/src/spaces.h
@@ -312,20 +312,11 @@ class MemoryChunk {
}
Space* owner() const {
- if ((reinterpret_cast<intptr_t>(owner_) & kFailureTagMask) ==
- kFailureTag) {
- return reinterpret_cast<Space*>(reinterpret_cast<intptr_t>(owner_) -
- kFailureTag);
- } else {
- return NULL;
- }
+ return owner_;
}
void set_owner(Space* space) {
- ASSERT((reinterpret_cast<intptr_t>(space) & kFailureTagMask) == 0);
- owner_ = reinterpret_cast<Address>(space) + kFailureTag;
- ASSERT((reinterpret_cast<intptr_t>(owner_) & kFailureTagMask) ==
- kFailureTag);
+ owner_ = space;
}
base::VirtualMemory* reserved_memory() {
@@ -691,10 +682,7 @@ class MemoryChunk {
// If the chunk needs to remember its memory reservation, it is stored
here.
base::VirtualMemory reservation_;
- // 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_;
+ Space* owner_;
Heap* heap_;
// Used by the store buffer to keep track of which pages to mark scan-on-
// scavenge.
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.