OLD | NEW |
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 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 if (!_setRange(start, length, from, startFrom)) { | 550 if (!_setRange(start, length, from, startFrom)) { |
551 IterableMixinWorkaround.setRangeList(this, start, | 551 IterableMixinWorkaround.setRangeList(this, start, |
552 length, from, startFrom); | 552 length, from, startFrom); |
553 } | 553 } |
554 } | 554 } |
555 | 555 |
556 | 556 |
557 // Method(s) implementing Object interface. | 557 // Method(s) implementing Object interface. |
558 | 558 |
559 String toString() { | 559 String toString() { |
560 return Collections.collectionToString(this); | 560 return ToString.iterableToString(this); |
561 } | 561 } |
562 | 562 |
563 | 563 |
564 // Internal utility methods. | 564 // Internal utility methods. |
565 | 565 |
566 bool _setRange(int start, int length, List from, startFrom) | 566 bool _setRange(int start, int length, List from, startFrom) |
567 native "TypedData_setRange"; | 567 native "TypedData_setRange"; |
568 } | 568 } |
569 | 569 |
570 | 570 |
(...skipping 2574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3145 return value; | 3145 return value; |
3146 } | 3146 } |
3147 return object; | 3147 return object; |
3148 } | 3148 } |
3149 | 3149 |
3150 | 3150 |
3151 void _throwRangeError(int index, int length) { | 3151 void _throwRangeError(int index, int length) { |
3152 String message = "$index must be in the range [0..$length)"; | 3152 String message = "$index must be in the range [0..$length)"; |
3153 throw new RangeError(message); | 3153 throw new RangeError(message); |
3154 } | 3154 } |
OLD | NEW |