Chromium Code Reviews| Index: runtime/vm/object.cc |
| diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc |
| index 8b7c8168e1ce11deba9e646a8852b5b9d980d43a..40c9a8388cb8e45d15e17299af4ae9185830f916 100644 |
| --- a/runtime/vm/object.cc |
| +++ b/runtime/vm/object.cc |
| @@ -12610,20 +12610,8 @@ void TypedData::Copy(const TypedData& dst, |
| const TypedData& src, |
| intptr_t src_offset_in_bytes, |
| intptr_t length_in_bytes) { |
| - ASSERT(Utils::RangeCheck(src_offset_in_bytes, |
| - length_in_bytes, |
| - src.LengthInBytes())); |
| - ASSERT(Utils::RangeCheck(dst_offset_in_bytes, |
| - length_in_bytes, |
| - dst.LengthInBytes())); |
| - { |
| - NoGCScope no_gc; |
| - if (length_in_bytes > 0) { |
| - memmove(dst.DataAddr(dst_offset_in_bytes), |
| - src.DataAddr(src_offset_in_bytes), |
| - length_in_bytes); |
| - } |
| - } |
| + TypedArrayCopyData<TypedData, TypedData>( |
| + dst, dst_offset_in_bytes, src, src_offset_in_bytes, length_in_bytes); |
|
siva
2013/04/19 17:38:40
This code can be removed as it is already set up i
kustermann
2013/04/19 19:21:54
Done.
|
| } |
| @@ -12669,20 +12657,8 @@ void ExternalTypedData::Copy(const ExternalTypedData& dst, |
| const ExternalTypedData& src, |
| intptr_t src_offset_in_bytes, |
| intptr_t length_in_bytes) { |
| - ASSERT(Utils::RangeCheck(src_offset_in_bytes, |
| - length_in_bytes, |
| - src.LengthInBytes())); |
| - ASSERT(Utils::RangeCheck(dst_offset_in_bytes, |
| - length_in_bytes, |
| - dst.LengthInBytes())); |
| - { |
| - NoGCScope no_gc; |
| - if (length_in_bytes > 0) { |
| - memmove(dst.DataAddr(dst_offset_in_bytes), |
| - src.DataAddr(src_offset_in_bytes), |
| - length_in_bytes); |
| - } |
| - } |
| + TypedArrayCopyData<ExternalTypedData, ExternalTypedData>( |
| + dst, dst_offset_in_bytes, src, src_offset_in_bytes, length_in_bytes); |
| } |
|
siva
2013/04/19 17:38:40
Get rid of this Copy function.
kustermann
2013/04/19 19:21:54
Done.
|