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

Unified Diff: src/objects.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
« no previous file with comments | « src/checks.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 1e38383fc7792017665dae7adf37a15805033498..02b6964bfbfa7d857afa8712611f8295fd295e90 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -795,9 +795,10 @@ class Smi: public Object {
void SmiVerify();
#endif
+ static const int kSmiPrecission = 31;
// Min and max limits for Smi values.
- static const int kMinValue = -(1 << (kBitsPerPointer - (kSmiTagSize + 1)));
- static const int kMaxValue = (1 << (kBitsPerPointer - (kSmiTagSize + 1))) - 1;
+ static const int kMinValue = -(1 << (kSmiPrecission - (kSmiTagSize)));
+ static const int kMaxValue = (1 << (kSmiPrecission - (kSmiTagSize))) - 1;
Dean McNamee 2009/05/04 13:04:14 I would call this kSmiNumBits, precision (spelling
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(Smi);
@@ -2324,8 +2325,8 @@ class Code: public HeapObject {
// the layout of the code object into account.
int ExecutableSize() {
// Check that the assumptions about the layout of the code object holds.
- ASSERT_EQ(reinterpret_cast<unsigned int>(instruction_start()) -
- reinterpret_cast<unsigned int>(address()),
+ ASSERT_EQ(reinterpret_cast<uintptr_t>(instruction_start()) -
+ reinterpret_cast<uintptr_t>(address()),
Dean McNamee 2009/05/04 13:04:14 Do we really need this, both should be returning p
Code::kHeaderSize);
return instruction_size() + Code::kHeaderSize;
}
« no previous file with comments | « src/checks.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698