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

Unified Diff: runtime/lib/typed_data.dart

Issue 197873005: Recognize _TypedListBase._cid native. Use Lists.copy instead of native _setRange if list is small. … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 9 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 | « no previous file | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/typed_data.dart
===================================================================
--- runtime/lib/typed_data.dart (revision 33621)
+++ runtime/lib/typed_data.dart (working copy)
@@ -548,7 +548,10 @@
if (from is _TypedListBase) {
if (this.elementSizeInBytes == from.elementSizeInBytes) {
- if (this.buffer._setRange(
+ if ((count < 10) && (from.buffer != this.buffer)) {
+ Lists.copy(from, skipCount, this, start, count);
+ return;
+ } else if (this.buffer._setRange(
start * elementSizeInBytes + this.offsetInBytes,
count * elementSizeInBytes,
from.buffer,
« no previous file with comments | « no previous file | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698