Index: src/spaces-inl.h |
=================================================================== |
--- src/spaces-inl.h (revision 5173) |
+++ src/spaces-inl.h (working copy) |
@@ -220,21 +220,22 @@ |
void Page::FlipMeaningOfInvalidatedWatermarkFlag() { |
- watermark_invalidated_mark_ ^= WATERMARK_INVALIDATED; |
+ watermark_invalidated_mark_ ^= 1 << WATERMARK_INVALIDATED; |
} |
bool Page::IsWatermarkValid() { |
- return (flags_ & WATERMARK_INVALIDATED) != watermark_invalidated_mark_; |
+ return (flags_ & (1 << WATERMARK_INVALIDATED)) != watermark_invalidated_mark_; |
} |
void Page::InvalidateWatermark(bool value) { |
if (value) { |
- flags_ = (flags_ & ~WATERMARK_INVALIDATED) | watermark_invalidated_mark_; |
+ flags_ = (flags_ & ~(1 << WATERMARK_INVALIDATED)) | |
+ watermark_invalidated_mark_; |
} else { |
- flags_ = (flags_ & ~WATERMARK_INVALIDATED) | |
- (watermark_invalidated_mark_ ^ WATERMARK_INVALIDATED); |
+ flags_ = (flags_ & ~(1 << WATERMARK_INVALIDATED)) | |
+ (watermark_invalidated_mark_ ^ (1 << WATERMARK_INVALIDATED)); |
} |
ASSERT(IsWatermarkValid() == !value); |
@@ -242,15 +243,15 @@ |
bool Page::GetPageFlag(PageFlag flag) { |
- return (flags_ & flag) != 0; |
+ return (flags_ & (1 << flag)) != 0; |
} |
void Page::SetPageFlag(PageFlag flag, bool value) { |
if (value) { |
- flags_ |= flag; |
+ flags_ |= (1 << flag); |
} else { |
- flags_ &= ~flag; |
+ flags_ &= ~(1 << flag); |
} |
} |
@@ -289,7 +290,16 @@ |
SetPageFlag(IS_NORMAL_PAGE, !is_large_object_page); |
} |
+bool Page::IsPageExecutable() { |
+ return GetPageFlag(IS_EXECUTABLE); |
+} |
+ |
+void Page::SetIsPageExecutable(bool is_page_executable) { |
+ SetPageFlag(IS_EXECUTABLE, is_page_executable); |
+} |
+ |
+ |
// ----------------------------------------------------------------------------- |
// MemoryAllocator |