| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 class Int8List { | 5 patch class Int8List { |
| 6 /* patch */ factory Int8List(int length) { | 6 /* patch */ factory Int8List(int length) { |
| 7 return new _Int8Array(length); | 7 return new _Int8Array(length); |
| 8 } | 8 } |
| 9 | 9 |
| 10 /* patch */ factory Int8List.view(ByteArray array, | 10 /* patch */ factory Int8List.view(ByteArray array, |
| (...skipping 1470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1481 native "ExternalFloat64Array_setIndexed"; | 1481 native "ExternalFloat64Array_setIndexed"; |
| 1482 } | 1482 } |
| 1483 | 1483 |
| 1484 | 1484 |
| 1485 class _ByteArrayIterator<E> implements Iterator<E> { | 1485 class _ByteArrayIterator<E> implements Iterator<E> { |
| 1486 _ByteArrayIterator(List array) | 1486 _ByteArrayIterator(List array) |
| 1487 : _array = array, _length = array.length, _pos = 0 { | 1487 : _array = array, _length = array.length, _pos = 0 { |
| 1488 assert(array is _ByteArrayBase || array is _ByteArrayViewBase); | 1488 assert(array is _ByteArrayBase || array is _ByteArrayViewBase); |
| 1489 } | 1489 } |
| 1490 | 1490 |
| 1491 bool hasNext() { | 1491 bool get hasNext { |
| 1492 return _length > _pos; | 1492 return _length > _pos; |
| 1493 } | 1493 } |
| 1494 | 1494 |
| 1495 E next() { | 1495 E next() { |
| 1496 if (!hasNext()) { | 1496 if (!hasNext) { |
| 1497 throw const NoMoreElementsException(); | 1497 throw const NoMoreElementsException(); |
| 1498 } | 1498 } |
| 1499 return _array[_pos++]; | 1499 return _array[_pos++]; |
| 1500 } | 1500 } |
| 1501 | 1501 |
| 1502 final List<E> _array; | 1502 final List<E> _array; |
| 1503 final int _length; | 1503 final int _length; |
| 1504 int _pos; | 1504 int _pos; |
| 1505 } | 1505 } |
| 1506 | 1506 |
| (...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2411 } | 2411 } |
| 2412 _rangeCheck(this.length, start, length); | 2412 _rangeCheck(this.length, start, length); |
| 2413 return _array.subByteArray(_offset + start, length); | 2413 return _array.subByteArray(_offset + start, length); |
| 2414 } | 2414 } |
| 2415 | 2415 |
| 2416 static const int _BYTES_PER_ELEMENT = 8; | 2416 static const int _BYTES_PER_ELEMENT = 8; |
| 2417 final ByteArray _array; | 2417 final ByteArray _array; |
| 2418 final int _offset; | 2418 final int _offset; |
| 2419 final int _length; | 2419 final int _length; |
| 2420 } | 2420 } |
| OLD | NEW |