Chromium Code Reviews| Index: runtime/vm/object.h |
| =================================================================== |
| --- runtime/vm/object.h (revision 3706) |
| +++ runtime/vm/object.h (working copy) |
| @@ -3249,7 +3249,25 @@ |
| public: |
| virtual intptr_t Length() const; |
| + static void Copy(uint8_t* dst, |
|
Ivan Posva
2012/02/01 01:12:41
The inconsistency of arguments in these three func
Anders Johnsen
2012/02/01 02:12:11
If you refer to the "lack" of either src_offset or
|
| + const ByteArray& src, |
| + intptr_t src_offset, |
| + intptr_t length); |
| + |
| + static void Copy(const ByteArray& dst, |
| + intptr_t dst_offset, |
| + const uint8_t* src, |
| + intptr_t length); |
| + |
| + static void Copy(const ByteArray& dst, |
| + intptr_t dst_offset, |
| + const ByteArray& src, |
| + intptr_t src_offset, |
| + intptr_t length); |
| + |
| private: |
| + virtual uint8_t* ByteAddr(intptr_t byte_offset) const; |
| + |
| HEAP_OBJECT_IMPLEMENTATION(ByteArray, Instance); |
| friend class Class; |
| }; |
| @@ -3313,6 +3331,10 @@ |
| Heap::Space space = Heap::kNew); |
| private: |
| + uint8_t* ByteAddr(intptr_t byte_offset) const { |
| + return Addr<uint8_t>(byte_offset); |
| + } |
| + |
| template<typename T> |
| T* Addr(intptr_t byte_offset) const { |
| intptr_t limit = byte_offset + sizeof(T); |
| @@ -3373,6 +3395,10 @@ |
| Heap::Space space = Heap::kNew); |
| private: |
| + uint8_t* ByteAddr(intptr_t byte_offset) const { |
| + return Addr<uint8_t>(byte_offset); |
| + } |
| + |
| template<typename T> |
| T* Addr(intptr_t byte_offset) const { |
| intptr_t limit = byte_offset + sizeof(T); |