| 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 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 573 this[i] = temp_buffer[i - start]; | 573 this[i] = temp_buffer[i - start]; |
| 574 } | 574 } |
| 575 return; | 575 return; |
| 576 } | 576 } |
| 577 } | 577 } |
| 578 IterableMixinWorkaround.setRangeList(this, start, | 578 IterableMixinWorkaround.setRangeList(this, start, |
| 579 end, from, skipCount); | 579 end, from, skipCount); |
| 580 } | 580 } |
| 581 | 581 |
| 582 void setAll(int index, Iterable iterable) { | 582 void setAll(int index, Iterable iterable) { |
| 583 IterableMixinWorkaround.setAllList(this, index, iterable); | 583 final end = iterable.length + index; |
| 584 setRange(index, end, iterable); |
| 584 } | 585 } |
| 585 | 586 |
| 586 void fillRange(int start, int end, [fillValue]) { | 587 void fillRange(int start, int end, [fillValue]) { |
| 587 IterableMixinWorkaround.fillRangeList(this, start, end, fillValue); | 588 IterableMixinWorkaround.fillRangeList(this, start, end, fillValue); |
| 588 } | 589 } |
| 589 | 590 |
| 590 | 591 |
| 591 // Method(s) implementing Object interface. | 592 // Method(s) implementing Object interface. |
| 592 | 593 |
| 593 String toString() { | 594 String toString() { |
| (...skipping 2805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3399 return value; | 3400 return value; |
| 3400 } | 3401 } |
| 3401 return object; | 3402 return object; |
| 3402 } | 3403 } |
| 3403 | 3404 |
| 3404 | 3405 |
| 3405 void _throwRangeError(int index, int length) { | 3406 void _throwRangeError(int index, int length) { |
| 3406 String message = "$index must be in the range [0..$length)"; | 3407 String message = "$index must be in the range [0..$length)"; |
| 3407 throw new RangeError(message); | 3408 throw new RangeError(message); |
| 3408 } | 3409 } |
| OLD | NEW |