Chromium Code Reviews| Index: runtime/vm/object.h |
| =================================================================== |
| --- runtime/vm/object.h (revision 1990) |
| +++ runtime/vm/object.h (working copy) |
| @@ -2463,6 +2463,12 @@ |
| bool IsSymbol() const; |
| + virtual bool IsExternal() const { return false; } |
| + virtual void* GetPeer() const { |
| + UNREACHABLE(); |
| + return NULL; |
| + } |
| + |
| static RawString* New(const char* str, Heap::Space space = Heap::kNew); |
| static RawString* New(const uint8_t* characters, |
| intptr_t len, |
| @@ -2743,6 +2749,11 @@ |
| return RoundedAllocationSize(sizeof(RawExternalOneByteString)); |
| } |
| + virtual bool IsExternal() const { return true; } |
| + virtual void* GetPeer() const { |
| + return raw_ptr()->external_data_->peer_; |
|
siva
2011/12/02 01:53:01
Not sure what the official C++ style guide says bu
turnidge
2011/12/05 17:54:28
Done.
|
| + } |
| + |
| static RawExternalOneByteString* New(const uint8_t* characters, |
| intptr_t len, |
| void* peer, |
| @@ -2780,6 +2791,11 @@ |
| return RoundedAllocationSize(sizeof(RawExternalTwoByteString)); |
| } |
| + virtual bool IsExternal() const { return true; } |
| + virtual void* GetPeer() const { |
| + return raw_ptr()->external_data_->peer_; |
| + } |
| + |
| static RawExternalTwoByteString* New(const uint16_t* characters, |
| intptr_t len, |
| void* peer, |
| @@ -2817,6 +2833,11 @@ |
| return RoundedAllocationSize(sizeof(RawExternalFourByteString)); |
| } |
| + virtual bool IsExternal() const { return true; } |
| + virtual void* GetPeer() const { |
| + return raw_ptr()->external_data_->peer_; |
| + } |
| + |
| static RawExternalFourByteString* New(const uint32_t* characters, |
| intptr_t len, |
| void* peer, |