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

Side by Side Diff: runtime/lib/typeddata.dart

Issue 14468004: Fix missing concurrency check in [].forEach. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added comment about iteration order of lists. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // patch classes for Int8List ..... Float64List and ByteData implementations. 5 // patch classes for Int8List ..... Float64List and ByteData implementations.
6 6
7 patch class Int8List { 7 patch class Int8List {
8 /* patch */ factory Int8List(int length) { 8 /* patch */ factory Int8List(int length) {
9 return new _Int8Array(length); 9 return new _Int8Array(length);
10 } 10 }
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 void removeRange(int start, int end) { 454 void removeRange(int start, int end) {
455 throw new UnsupportedError( 455 throw new UnsupportedError(
456 "Cannot remove from a non-extendable array"); 456 "Cannot remove from a non-extendable array");
457 } 457 }
458 458
459 void replaceRange(int start, int end, Iterable iterable) { 459 void replaceRange(int start, int end, Iterable iterable) {
460 throw new UnsupportedError( 460 throw new UnsupportedError(
461 "Cannot remove from a non-extendable array"); 461 "Cannot remove from a non-extendable array");
462 } 462 }
463 463
464 List toList() { 464 List toList({bool growable: true}) {
465 return new List.from(this); 465 return new List.from(this, growable: growable);
466 } 466 }
467 467
468 Set toSet() { 468 Set toSet() {
469 return new Set.from(this); 469 return new Set.from(this);
470 } 470 }
471 471
472 List sublist(int start, [int end]) { 472 List sublist(int start, [int end]) {
473 if (end == null) end = length; 473 if (end == null) end = length;
474 int length = end - start; 474 int length = end - start;
475 _rangeCheck(this.length, start, length); 475 _rangeCheck(this.length, start, length);
(...skipping 2721 matching lines...) Expand 10 before | Expand all | Expand 10 after
3197 return value; 3197 return value;
3198 } 3198 }
3199 return object; 3199 return object;
3200 } 3200 }
3201 3201
3202 3202
3203 void _throwRangeError(int index, int length) { 3203 void _throwRangeError(int index, int length) {
3204 String message = "$index must be in the range [0..$length)"; 3204 String message = "$index must be in the range [0..$length)";
3205 throw new RangeError(message); 3205 throw new RangeError(message);
3206 } 3206 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698