Index: runtime/vm/object.cc |
=================================================================== |
--- runtime/vm/object.cc (revision 3621) |
+++ runtime/vm/object.cc (working copy) |
@@ -7511,6 +7511,46 @@ |
} |
+void ByteArray::Copy(uint8_t* dst, |
+ const ByteArray& src, |
+ intptr_t src_byte_offset, |
+ intptr_t length) { |
+ ASSERT(src_byte_offset + length <= src.Length()); |
+ const uint8_t *src_addr = src.ByteAddr(src_byte_offset); |
cshapiro
2012/01/27 23:00:04
This should be wrapped in a NoGCScope.
Anders Johnsen
2012/01/27 23:42:39
Done.
|
+ memmove(dst, src_addr, length); |
+} |
+ |
+ |
+void ByteArray::Copy(const ByteArray& dst, |
+ intptr_t dst_byte_offset, |
+ const uint8_t* src, |
+ intptr_t length) { |
+ ASSERT(dst_byte_offset + length <= dst.Length()); |
+ uint8_t *dst_addr = dst.ByteAddr(dst_byte_offset); |
cshapiro
2012/01/27 23:00:04
Same here...
Anders Johnsen
2012/01/27 23:42:39
Done.
|
+ memmove(dst_addr, src, length); |
+} |
+ |
+ |
+void ByteArray::Copy(const ByteArray& dst, |
+ intptr_t dst_byte_offset, |
+ const ByteArray& src, |
+ intptr_t src_byte_offset, |
+ intptr_t length) { |
+ ASSERT(src_byte_offset + length <= src.Length()); |
+ ASSERT(dst_byte_offset + length <= dst.Length()); |
+ const uint8_t *src_addr = src.ByteAddr(src_byte_offset); |
+ uint8_t *dst_addr = dst.ByteAddr(dst_byte_offset); |
cshapiro
2012/01/27 23:00:04
...and here.
Anders Johnsen
2012/01/27 23:42:39
Done.
|
+ memmove(dst_addr, src_addr, length); |
+} |
+ |
+ |
+uint8_t* ByteArray::ByteAddr(intptr_t byte_offset) const { |
+ // ByteArray is an abstract class. |
+ UNREACHABLE(); |
+ return NULL; |
+} |
+ |
+ |
const char* ByteArray::ToCString() const { |
// ByteArray is an abstract class. |
UNREACHABLE(); |