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); |
} |