| 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 import "dart:_internal"; | 7 import "dart:_internal"; |
| 8 import 'dart:math' show Random; | 8 import 'dart:math' show Random; |
| 9 | 9 |
| 10 patch class Int8List { | 10 patch class Int8List { |
| (...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 setRange(index, end, iterable); | 582 setRange(index, end, iterable); |
| 583 } | 583 } |
| 584 | 584 |
| 585 void fillRange(int start, int end, [fillValue]) { | 585 void fillRange(int start, int end, [fillValue]) { |
| 586 IterableMixinWorkaround.fillRangeList(this, start, end, fillValue); | 586 IterableMixinWorkaround.fillRangeList(this, start, end, fillValue); |
| 587 } | 587 } |
| 588 | 588 |
| 589 | 589 |
| 590 // Method(s) implementing Object interface. | 590 // Method(s) implementing Object interface. |
| 591 | 591 |
| 592 String toString() { | 592 String toString() => ListBase.listToString(this); |
| 593 return IterableMixinWorkaround.toStringIterable(this, '[', ']'); | |
| 594 } | |
| 595 | 593 |
| 596 | 594 |
| 597 // Internal utility methods. | 595 // Internal utility methods. |
| 598 | 596 |
| 599 // Returns true if operation succeeds. | 597 // Returns true if operation succeeds. |
| 600 // 'fromCid' and 'toCid' may be cid-s of the views and therefore may not | 598 // 'fromCid' and 'toCid' may be cid-s of the views and therefore may not |
| 601 // match the cids of 'this' and 'from'. | 599 // match the cids of 'this' and 'from'. |
| 602 // Uses toCid and fromCid to decide if clamping is necessary. | 600 // Uses toCid and fromCid to decide if clamping is necessary. |
| 603 // Element size of toCid and fromCid must match (test at caller). | 601 // Element size of toCid and fromCid must match (test at caller). |
| 604 bool _setRange(int startInBytes, int lengthInBytes, | 602 bool _setRange(int startInBytes, int lengthInBytes, |
| (...skipping 3027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3632 return value; | 3630 return value; |
| 3633 } | 3631 } |
| 3634 return object; | 3632 return object; |
| 3635 } | 3633 } |
| 3636 | 3634 |
| 3637 | 3635 |
| 3638 void _throwRangeError(int index, int length) { | 3636 void _throwRangeError(int index, int length) { |
| 3639 String message = "$index must be in the range [0..$length)"; | 3637 String message = "$index must be in the range [0..$length)"; |
| 3640 throw new RangeError(message); | 3638 throw new RangeError(message); |
| 3641 } | 3639 } |
| OLD | NEW |