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

Unified Diff: src/objects-inl.h

Issue 173115: Change some integer types to make the x64 Win32 platform happier. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 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
« no previous file with comments | « src/objects.h ('k') | src/platform-win32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
===================================================================
--- src/objects-inl.h (revision 2742)
+++ src/objects-inl.h (working copy)
@@ -814,15 +814,13 @@
Failure* Failure::Construct(Type type, int value) {
int info = (value << kFailureTypeTagSize) | type;
- // TODO(X64): Stop using Smi validation for non-smi checks, even if they
- // happen to be identical at the moment.
- ASSERT(Smi::IsValid(info)); // Same validation check as in Smi
+ ASSERT(((info << kFailureTagSize) >> kFailureTagSize) == info);
return reinterpret_cast<Failure*>(
(static_cast<intptr_t>(info) << kFailureTagSize) | kFailureTag);
}
-bool Smi::IsValid(int value) {
+bool Smi::IsValid(intptr_t value) {
#ifdef DEBUG
bool in_range = (value >= kMinValue) && (value <= kMaxValue);
#endif
@@ -937,12 +935,13 @@
Address MapWord::DecodeMapAddress(MapSpace* map_space) {
- int map_page_index = (value_ & kMapPageIndexMask) >> kMapPageIndexShift;
+ int map_page_index =
+ static_cast<int>((value_ & kMapPageIndexMask) >> kMapPageIndexShift);
ASSERT_MAP_PAGE_INDEX(map_page_index);
- int map_page_offset =
+ int map_page_offset = static_cast<int>(
((value_ & kMapPageOffsetMask) >> kMapPageOffsetShift)
- << kObjectAlignmentBits;
+ << kObjectAlignmentBits);
return (map_space->PageAddress(map_page_index) + map_page_offset);
}
« no previous file with comments | « src/objects.h ('k') | src/platform-win32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698