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

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

Issue 13956006: Remove insertRange. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebuild DOM (unrelated CL) and update status files. 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
« no previous file with comments | « runtime/lib/growable_array.dart ('k') | runtime/tests/vm/dart/byte_array_optimized_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 if (length > 0) return this[length - 1]; 530 if (length > 0) return this[length - 1];
531 throw new StateError("No elements"); 531 throw new StateError("No elements");
532 } 532 }
533 533
534 int get single { 534 int get single {
535 if (length == 1) return this[0]; 535 if (length == 1) return this[0];
536 if (length == 0) throw new StateError("No elements"); 536 if (length == 0) throw new StateError("No elements");
537 throw new StateError("More than one element"); 537 throw new StateError("More than one element");
538 } 538 }
539 539
540 void removeRange(int start, int length) { 540 void removeRange(int start, int end) {
541 throw new UnsupportedError( 541 throw new UnsupportedError(
542 "Cannot remove from a non-extendable array"); 542 "Cannot remove from a non-extendable array");
543 } 543 }
544 544
545 void insertRange(int start, int length, [initialValue]) {
546 throw new UnsupportedError(
547 "Cannot add to a non-extendable array");
548 }
549
550 List toList() { 545 List toList() {
551 return new List.from(this); 546 return new List.from(this);
552 } 547 }
553 548
554 Set toSet() { 549 Set toSet() {
555 return new Set.from(this); 550 return new Set.from(this);
556 } 551 }
557 552
558 List sublist(int start, [int end]) { 553 List sublist(int start, [int end]) {
559 if (end == null) end = length; 554 if (end == null) end = length;
(...skipping 2607 matching lines...) Expand 10 before | Expand all | Expand 10 after
3167 return value; 3162 return value;
3168 } 3163 }
3169 return object; 3164 return object;
3170 } 3165 }
3171 3166
3172 3167
3173 void _throwRangeError(int index, int length) { 3168 void _throwRangeError(int index, int length) {
3174 String message = "$index must be in the range [0..$length)"; 3169 String message = "$index must be in the range [0..$length)";
3175 throw new RangeError(message); 3170 throw new RangeError(message);
3176 } 3171 }
OLDNEW
« no previous file with comments | « runtime/lib/growable_array.dart ('k') | runtime/tests/vm/dart/byte_array_optimized_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698