Chromium Code Reviews| Index: vm/object.h |
| =================================================================== |
| --- vm/object.h (revision 6600) |
| +++ vm/object.h (working copy) |
| @@ -25,6 +25,7 @@ |
| class clazz; |
| CLASS_LIST(DEFINE_FORWARD_DECLARATION) |
| #undef DEFINE_FORWARD_DECLARATION |
| +class Api; |
| class Assembler; |
| class Code; |
| class LocalScope; |
| @@ -2737,10 +2738,17 @@ |
| return reinterpret_cast<intptr_t>(New(value)); |
| } |
| - static bool IsValid(intptr_t value); |
| - static bool IsValid64(int64_t value); |
| + static bool IsValid(intptr_t value) { |
| + return (value >= kMinValue) && (value <= kMaxValue); |
| + } |
| + static bool IsValid64(int64_t value) { |
| + return (value >= kMinValue) && (value <= kMaxValue); |
| + } |
| + |
| private: |
| + friend class Api; // For ValueFromRaw |
|
cshapiro
2012/04/16 20:32:45
Co-locate this with the other friend classes below
|
| + |
| static intptr_t ValueFromRaw(uword raw_value) { |
| intptr_t value = raw_value; |
| ASSERT((value & kSmiTagMask) == kSmiTag); |