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

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: Addressed review comments 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
« no previous file with comments | « src/platform-win32.cc ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/spaces.h
diff --git a/src/spaces.h b/src/spaces.h
index a49dd5303cd04cc11e170f08b4271d986ecf27ca..69602bb882c721410ec6c9c610e2f924d55e4634 100644
--- a/src/spaces.h
+++ b/src/spaces.h
@@ -379,11 +379,11 @@ 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);
}
void SetFlagTo(int flag, bool value) {
@@ -395,7 +395,7 @@ class MemoryChunk {
}
bool IsFlagSet(int flag) {
- return (flags_ & (1 << flag)) != 0;
+ return (flags_ & (static_cast<uintptr_t>(1) << flag)) != 0;
}
// Set or clear multiple flags at a time. The flags in the mask
@@ -421,7 +421,8 @@ class MemoryChunk {
MemoryChunk::FromAddress(address)->IncrementLiveBytes(by);
}
- 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;
« no previous file with comments | « src/platform-win32.cc ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698