Index: runtime/vm/object.h |
=================================================================== |
--- runtime/vm/object.h (revision 3621) |
+++ runtime/vm/object.h (working copy) |
@@ -3250,7 +3250,25 @@ |
public: |
virtual intptr_t Length() const; |
+ static void Copy(uint8_t* dst, |
+ const ByteArray& src, |
+ intptr_t src_byte_offset, |
cshapiro
2012/01/27 23:00:04
You can probably shorten src_byte_offset to just s
Anders Johnsen
2012/01/27 23:42:39
Done.
|
+ intptr_t length); |
+ |
+ static void Copy(const ByteArray& dst, |
+ intptr_t dst_byte_offset, |
+ const uint8_t* src, |
+ intptr_t length); |
+ |
+ static void Copy(const ByteArray& dst, |
+ intptr_t dst_byte_offset, |
+ const ByteArray& src, |
+ intptr_t src_byte_offset, |
+ intptr_t length); |
+ |
private: |
+ virtual uint8_t* ByteAddr(intptr_t byte_offset) const; |
+ |
HEAP_OBJECT_IMPLEMENTATION(ByteArray, Instance); |
friend class Class; |
}; |
@@ -3314,6 +3332,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); |
@@ -3374,6 +3396,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); |