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

Unified Diff: src/spaces-inl.h

Issue 3161015: Tracks the usage of executable memory allocated by V8 and exposes the value t... (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: '' Created 10 years, 4 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
« src/spaces.cc ('K') | « src/spaces.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« src/spaces.cc ('K') | « src/spaces.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698