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

Unified Diff: src/objects-inl.h

Issue 100337: Changed some int casts to intptr_t. (Closed)
Patch Set: Created 11 years, 8 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/objects.h ('K') | « src/objects.h ('k') | src/spaces.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index c1d01824be5aba6244ec0b3355f4363a9210118f..58e4f7c666bec9af375ad458fc6d8bd5d08afc58 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -683,7 +683,7 @@ Object** HeapObject::RawField(HeapObject* obj, int byte_offset) {
int Smi::value() {
- return reinterpret_cast<int>(this) >> kSmiTagSize;
+ return static_cast<int>(reinterpret_cast<intptr_t>(this) >> kSmiTagSize);
}
@@ -739,7 +739,7 @@ Failure* Failure::OutOfMemoryException() {
int Failure::value() const {
- return reinterpret_cast<int>(this) >> kFailureTagSize;
+ return static_cast<int>(reinterpret_cast<intptr_t>(this) >> kFailureTagSize);
}
@@ -757,7 +757,8 @@ Failure* Failure::RetryAfterGC(int requested_bytes) {
Failure* Failure::Construct(Type type, int value) {
int info = (value << kFailureTypeTagSize) | type;
ASSERT(Smi::IsValid(info)); // Same validation check as in Smi
- return reinterpret_cast<Failure*>((info << kFailureTagSize) | kFailureTag);
+ return reinterpret_cast<Failure*>(
+ static_cast<intptr_t>((info << kFailureTagSize) | kFailureTag));
}
« src/objects.h ('K') | « src/objects.h ('k') | src/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698