Index: runtime/vm/object.cc |
=================================================================== |
--- runtime/vm/object.cc (revision 3627) |
+++ runtime/vm/object.cc (working copy) |
@@ -7511,6 +7511,51 @@ |
} |
+void ByteArray::Copy(uint8_t* dst, |
+ const ByteArray& src, |
+ intptr_t src_offset, |
+ intptr_t length) { |
+ ASSERT(src_offset + length <= src.Length()); |
cshapiro
2012/01/28 02:25:48
This assert is insufficient... for example
ASSE
Anders Johnsen
2012/01/30 21:15:28
Done.
|
+ { |
+ NoGCScope no_gc; |
+ memmove(dst, src.ByteAddr(src_offset), length); |
+ } |
+} |
+ |
+ |
+void ByteArray::Copy(const ByteArray& dst, |
+ intptr_t dst_offset, |
+ const uint8_t* src, |
+ intptr_t length) { |
+ ASSERT(dst_offset + length <= dst.Length()); |
cshapiro
2012/01/28 02:25:48
Same here.
Anders Johnsen
2012/01/30 21:15:28
Done.
|
+ { |
+ NoGCScope no_gc; |
+ memmove(dst.ByteAddr(dst_offset), src, length); |
+ } |
+} |
+ |
+ |
+void ByteArray::Copy(const ByteArray& dst, |
+ intptr_t dst_offset, |
+ const ByteArray& src, |
+ intptr_t src_offset, |
+ intptr_t length) { |
+ ASSERT(src_offset + length <= src.Length()); |
cshapiro
2012/01/28 02:25:48
Same here.
Anders Johnsen
2012/01/30 21:15:28
Done.
|
+ ASSERT(dst_offset + length <= dst.Length()); |
+ { |
+ NoGCScope no_gc; |
+ memmove(dst.ByteAddr(dst_offset), src.ByteAddr(src_offset), 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(); |