Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(536)

Unified Diff: runtime/vm/object.cc

Issue 14296006: Fast copy between TypedData and ExternalTypedData (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 8b7c8168e1ce11deba9e646a8852b5b9d980d43a..87ad90528b73ca9359935837eb5be7e8dfd6211a 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -12605,28 +12605,6 @@ const intptr_t TypedData::element_size[] = {
};
-void TypedData::Copy(const TypedData& dst,
- intptr_t dst_offset_in_bytes,
- 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);
- }
- }
-}
-
-
RawTypedData* TypedData::New(intptr_t class_id,
intptr_t len,
Heap::Space space) {
@@ -12664,28 +12642,6 @@ FinalizablePersistentHandle* ExternalTypedData::AddFinalizer(
}
-void ExternalTypedData::Copy(const ExternalTypedData& dst,
- intptr_t dst_offset_in_bytes,
- 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);
- }
- }
-}
-
-
RawExternalTypedData* ExternalTypedData::New(intptr_t class_id,
uint8_t* data,
intptr_t len,
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698