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

Unified Diff: src/spaces.h

Issue 7277038: make gc branch compile on Win32. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Created 9 years, 6 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
Index: src/spaces.h
diff --git a/src/spaces.h b/src/spaces.h
index b16d26024ca6af19efa5af9feb74eba10089b872..24aaaa03045f8f7ab0c71f4abade04907af3de9b 100644
--- a/src/spaces.h
+++ b/src/spaces.h
@@ -303,7 +303,7 @@ class MemoryChunk {
Address body() { return address() + kBodyOffset; }
- int body_size() { return size() - kBodyOffset; }
+ int body_size() { return static_cast<int>(size() - kBodyOffset); }
enum MemoryChunkFlags {
IS_EXECUTABLE,
@@ -311,18 +311,19 @@ class MemoryChunk {
};
void SetFlag(int flag) {
- flags_ |= 1 << flag;
+ flags_ |= static_cast<uintptr_t>(1) << flag;
}
void ClearFlag(int flag) {
- flags_ &= ~(1 << flag);
+ flags_ &= ~(static_cast<uintptr_t>(1) << flag);
}
bool IsFlagSet(int flag) {
- return (flags_ & (1 << flag)) != 0;
+ return (flags_ & (static_cast<uintptr_t>(1) << flag)) != 0;
}
- static const intptr_t kAlignment = (1 << kPageSizeBits);
+ static const intptr_t kAlignment =
+ (static_cast<uintptr_t>(1) << kPageSizeBits);
static const intptr_t kAlignmentMask = kAlignment - 1;

Powered by Google App Engine
This is Rietveld 408576698