| 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 /** | 5 /** |
| 6 * A random-access sequence of bytes that also provides random access to | 6 * A random-access sequence of bytes that also provides random access to |
| 7 * the fixed-width integers and floating point numbers represented by | 7 * the fixed-width integers and floating point numbers represented by |
| 8 * those bytes. Byte arrays may be used to pack and unpack data from | 8 * those bytes. Byte arrays may be used to pack and unpack data from |
| 9 * external sources (such as networks or files systems), and to process | 9 * external sources (such as networks or files systems), and to process |
| 10 * large quantities of numerical data more efficiently than would be possible | 10 * large quantities of numerical data more efficiently than would be possible |
| (...skipping 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1061 } | 1061 } |
| 1062 | 1062 |
| 1063 int bytesPerElement() { | 1063 int bytesPerElement() { |
| 1064 return _BYTES_PER_ELEMENT; | 1064 return _BYTES_PER_ELEMENT; |
| 1065 } | 1065 } |
| 1066 | 1066 |
| 1067 int lengthInBytes() { | 1067 int lengthInBytes() { |
| 1068 return _length() * _BYTES_PER_ELEMENT; | 1068 return _length() * _BYTES_PER_ELEMENT; |
| 1069 } | 1069 } |
| 1070 | 1070 |
| 1071 static final int _BYTES_PER_ELEMENT = 1; | 1071 static const int _BYTES_PER_ELEMENT = 1; |
| 1072 | 1072 |
| 1073 static _Int8Array _new(int length) native "Int8Array_new"; | 1073 static _Int8Array _new(int length) native "Int8Array_new"; |
| 1074 | 1074 |
| 1075 int _getIndexed(int index) native "Int8Array_getIndexed"; | 1075 int _getIndexed(int index) native "Int8Array_getIndexed"; |
| 1076 int _setIndexed(int index, int value) native "Int8Array_setIndexed"; | 1076 int _setIndexed(int index, int value) native "Int8Array_setIndexed"; |
| 1077 } | 1077 } |
| 1078 | 1078 |
| 1079 | 1079 |
| 1080 class _Uint8Array extends _ByteArrayBase implements Uint8List { | 1080 class _Uint8Array extends _ByteArrayBase implements Uint8List { |
| 1081 factory _Uint8Array(int length) { | 1081 factory _Uint8Array(int length) { |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1124 } | 1124 } |
| 1125 | 1125 |
| 1126 int bytesPerElement() { | 1126 int bytesPerElement() { |
| 1127 return _BYTES_PER_ELEMENT; | 1127 return _BYTES_PER_ELEMENT; |
| 1128 } | 1128 } |
| 1129 | 1129 |
| 1130 int lengthInBytes() { | 1130 int lengthInBytes() { |
| 1131 return _length() * _BYTES_PER_ELEMENT; | 1131 return _length() * _BYTES_PER_ELEMENT; |
| 1132 } | 1132 } |
| 1133 | 1133 |
| 1134 static final int _BYTES_PER_ELEMENT = 1; | 1134 static const int _BYTES_PER_ELEMENT = 1; |
| 1135 | 1135 |
| 1136 static _Uint8Array _new(int length) native "Uint8Array_new"; | 1136 static _Uint8Array _new(int length) native "Uint8Array_new"; |
| 1137 | 1137 |
| 1138 int _getIndexed(int index) native "Uint8Array_getIndexed"; | 1138 int _getIndexed(int index) native "Uint8Array_getIndexed"; |
| 1139 int _setIndexed(int index, int value) native "Uint8Array_setIndexed"; | 1139 int _setIndexed(int index, int value) native "Uint8Array_setIndexed"; |
| 1140 } | 1140 } |
| 1141 | 1141 |
| 1142 | 1142 |
| 1143 class _Int16Array extends _ByteArrayBase implements Int16List { | 1143 class _Int16Array extends _ByteArrayBase implements Int16List { |
| 1144 factory _Int16Array(int length) { | 1144 factory _Int16Array(int length) { |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1187 } | 1187 } |
| 1188 | 1188 |
| 1189 int bytesPerElement() { | 1189 int bytesPerElement() { |
| 1190 return _BYTES_PER_ELEMENT; | 1190 return _BYTES_PER_ELEMENT; |
| 1191 } | 1191 } |
| 1192 | 1192 |
| 1193 int lengthInBytes() { | 1193 int lengthInBytes() { |
| 1194 return _length() * _BYTES_PER_ELEMENT; | 1194 return _length() * _BYTES_PER_ELEMENT; |
| 1195 } | 1195 } |
| 1196 | 1196 |
| 1197 static final int _BYTES_PER_ELEMENT = 2; | 1197 static const int _BYTES_PER_ELEMENT = 2; |
| 1198 | 1198 |
| 1199 static _Int16Array _new(int length) native "Int16Array_new"; | 1199 static _Int16Array _new(int length) native "Int16Array_new"; |
| 1200 | 1200 |
| 1201 int _getIndexed(int index) native "Int16Array_getIndexed"; | 1201 int _getIndexed(int index) native "Int16Array_getIndexed"; |
| 1202 int _setIndexed(int index, int value) native "Int16Array_setIndexed"; | 1202 int _setIndexed(int index, int value) native "Int16Array_setIndexed"; |
| 1203 } | 1203 } |
| 1204 | 1204 |
| 1205 | 1205 |
| 1206 class _Uint16Array extends _ByteArrayBase implements Uint16List { | 1206 class _Uint16Array extends _ByteArrayBase implements Uint16List { |
| 1207 factory _Uint16Array(int length) { | 1207 factory _Uint16Array(int length) { |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1250 } | 1250 } |
| 1251 | 1251 |
| 1252 int bytesPerElement() { | 1252 int bytesPerElement() { |
| 1253 return _BYTES_PER_ELEMENT; | 1253 return _BYTES_PER_ELEMENT; |
| 1254 } | 1254 } |
| 1255 | 1255 |
| 1256 int lengthInBytes() { | 1256 int lengthInBytes() { |
| 1257 return _length() * _BYTES_PER_ELEMENT; | 1257 return _length() * _BYTES_PER_ELEMENT; |
| 1258 } | 1258 } |
| 1259 | 1259 |
| 1260 static final int _BYTES_PER_ELEMENT = 2; | 1260 static const int _BYTES_PER_ELEMENT = 2; |
| 1261 | 1261 |
| 1262 static _Uint16Array _new(int length) native "Uint16Array_new"; | 1262 static _Uint16Array _new(int length) native "Uint16Array_new"; |
| 1263 | 1263 |
| 1264 int _getIndexed(int index) native "Uint16Array_getIndexed"; | 1264 int _getIndexed(int index) native "Uint16Array_getIndexed"; |
| 1265 int _setIndexed(int index, int value) native "Uint16Array_setIndexed"; | 1265 int _setIndexed(int index, int value) native "Uint16Array_setIndexed"; |
| 1266 } | 1266 } |
| 1267 | 1267 |
| 1268 | 1268 |
| 1269 class _Int32Array extends _ByteArrayBase implements Int32List { | 1269 class _Int32Array extends _ByteArrayBase implements Int32List { |
| 1270 factory _Int32Array(int length) { | 1270 factory _Int32Array(int length) { |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1313 } | 1313 } |
| 1314 | 1314 |
| 1315 int bytesPerElement() { | 1315 int bytesPerElement() { |
| 1316 return _BYTES_PER_ELEMENT; | 1316 return _BYTES_PER_ELEMENT; |
| 1317 } | 1317 } |
| 1318 | 1318 |
| 1319 int lengthInBytes() { | 1319 int lengthInBytes() { |
| 1320 return _length() * _BYTES_PER_ELEMENT; | 1320 return _length() * _BYTES_PER_ELEMENT; |
| 1321 } | 1321 } |
| 1322 | 1322 |
| 1323 static final int _BYTES_PER_ELEMENT = 4; | 1323 static const int _BYTES_PER_ELEMENT = 4; |
| 1324 | 1324 |
| 1325 static _Int32Array _new(int length) native "Int32Array_new"; | 1325 static _Int32Array _new(int length) native "Int32Array_new"; |
| 1326 | 1326 |
| 1327 int _getIndexed(int index) native "Int32Array_getIndexed"; | 1327 int _getIndexed(int index) native "Int32Array_getIndexed"; |
| 1328 int _setIndexed(int index, int value) native "Int32Array_setIndexed"; | 1328 int _setIndexed(int index, int value) native "Int32Array_setIndexed"; |
| 1329 } | 1329 } |
| 1330 | 1330 |
| 1331 | 1331 |
| 1332 class _Uint32Array extends _ByteArrayBase implements Uint32List { | 1332 class _Uint32Array extends _ByteArrayBase implements Uint32List { |
| 1333 factory _Uint32Array(int length) { | 1333 factory _Uint32Array(int length) { |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1376 } | 1376 } |
| 1377 | 1377 |
| 1378 int bytesPerElement() { | 1378 int bytesPerElement() { |
| 1379 return _BYTES_PER_ELEMENT; | 1379 return _BYTES_PER_ELEMENT; |
| 1380 } | 1380 } |
| 1381 | 1381 |
| 1382 int lengthInBytes() { | 1382 int lengthInBytes() { |
| 1383 return _length() * _BYTES_PER_ELEMENT; | 1383 return _length() * _BYTES_PER_ELEMENT; |
| 1384 } | 1384 } |
| 1385 | 1385 |
| 1386 static final int _BYTES_PER_ELEMENT = 4; | 1386 static const int _BYTES_PER_ELEMENT = 4; |
| 1387 | 1387 |
| 1388 static _Uint32Array _new(int length) native "Uint32Array_new"; | 1388 static _Uint32Array _new(int length) native "Uint32Array_new"; |
| 1389 | 1389 |
| 1390 int _getIndexed(int index) native "Uint32Array_getIndexed"; | 1390 int _getIndexed(int index) native "Uint32Array_getIndexed"; |
| 1391 int _setIndexed(int index, int value) native "Uint32Array_setIndexed"; | 1391 int _setIndexed(int index, int value) native "Uint32Array_setIndexed"; |
| 1392 } | 1392 } |
| 1393 | 1393 |
| 1394 | 1394 |
| 1395 class _Int64Array extends _ByteArrayBase implements Int64List { | 1395 class _Int64Array extends _ByteArrayBase implements Int64List { |
| 1396 factory _Int64Array(int length) { | 1396 factory _Int64Array(int length) { |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1439 } | 1439 } |
| 1440 | 1440 |
| 1441 int bytesPerElement() { | 1441 int bytesPerElement() { |
| 1442 return _BYTES_PER_ELEMENT; | 1442 return _BYTES_PER_ELEMENT; |
| 1443 } | 1443 } |
| 1444 | 1444 |
| 1445 int lengthInBytes() { | 1445 int lengthInBytes() { |
| 1446 return _length() * _BYTES_PER_ELEMENT; | 1446 return _length() * _BYTES_PER_ELEMENT; |
| 1447 } | 1447 } |
| 1448 | 1448 |
| 1449 static final int _BYTES_PER_ELEMENT = 8; | 1449 static const int _BYTES_PER_ELEMENT = 8; |
| 1450 | 1450 |
| 1451 static _Int64Array _new(int length) native "Int64Array_new"; | 1451 static _Int64Array _new(int length) native "Int64Array_new"; |
| 1452 | 1452 |
| 1453 int _getIndexed(int index) native "Int64Array_getIndexed"; | 1453 int _getIndexed(int index) native "Int64Array_getIndexed"; |
| 1454 int _setIndexed(int index, int value) native "Int64Array_setIndexed"; | 1454 int _setIndexed(int index, int value) native "Int64Array_setIndexed"; |
| 1455 } | 1455 } |
| 1456 | 1456 |
| 1457 | 1457 |
| 1458 class _Uint64Array extends _ByteArrayBase implements Uint64List { | 1458 class _Uint64Array extends _ByteArrayBase implements Uint64List { |
| 1459 factory _Uint64Array(int length) { | 1459 factory _Uint64Array(int length) { |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1502 } | 1502 } |
| 1503 | 1503 |
| 1504 int bytesPerElement() { | 1504 int bytesPerElement() { |
| 1505 return _BYTES_PER_ELEMENT; | 1505 return _BYTES_PER_ELEMENT; |
| 1506 } | 1506 } |
| 1507 | 1507 |
| 1508 int lengthInBytes() { | 1508 int lengthInBytes() { |
| 1509 return _length() * _BYTES_PER_ELEMENT; | 1509 return _length() * _BYTES_PER_ELEMENT; |
| 1510 } | 1510 } |
| 1511 | 1511 |
| 1512 static final int _BYTES_PER_ELEMENT = 8; | 1512 static const int _BYTES_PER_ELEMENT = 8; |
| 1513 | 1513 |
| 1514 static _Uint64Array _new(int length) native "Uint64Array_new"; | 1514 static _Uint64Array _new(int length) native "Uint64Array_new"; |
| 1515 | 1515 |
| 1516 int _getIndexed(int index) native "Uint64Array_getIndexed"; | 1516 int _getIndexed(int index) native "Uint64Array_getIndexed"; |
| 1517 int _setIndexed(int index, int value) native "Uint64Array_setIndexed"; | 1517 int _setIndexed(int index, int value) native "Uint64Array_setIndexed"; |
| 1518 } | 1518 } |
| 1519 | 1519 |
| 1520 | 1520 |
| 1521 class _Float32Array extends _ByteArrayBase implements Float32List { | 1521 class _Float32Array extends _ByteArrayBase implements Float32List { |
| 1522 factory _Float32Array(int length) { | 1522 factory _Float32Array(int length) { |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1565 } | 1565 } |
| 1566 | 1566 |
| 1567 int bytesPerElement() { | 1567 int bytesPerElement() { |
| 1568 return _BYTES_PER_ELEMENT; | 1568 return _BYTES_PER_ELEMENT; |
| 1569 } | 1569 } |
| 1570 | 1570 |
| 1571 int lengthInBytes() { | 1571 int lengthInBytes() { |
| 1572 return _length() * _BYTES_PER_ELEMENT; | 1572 return _length() * _BYTES_PER_ELEMENT; |
| 1573 } | 1573 } |
| 1574 | 1574 |
| 1575 static final int _BYTES_PER_ELEMENT = 4; | 1575 static const int _BYTES_PER_ELEMENT = 4; |
| 1576 | 1576 |
| 1577 static _Float32Array _new(int length) native "Float32Array_new"; | 1577 static _Float32Array _new(int length) native "Float32Array_new"; |
| 1578 | 1578 |
| 1579 double _getIndexed(int index) native "Float32Array_getIndexed"; | 1579 double _getIndexed(int index) native "Float32Array_getIndexed"; |
| 1580 int _setIndexed(int index, double value) native "Float32Array_setIndexed"; | 1580 int _setIndexed(int index, double value) native "Float32Array_setIndexed"; |
| 1581 } | 1581 } |
| 1582 | 1582 |
| 1583 | 1583 |
| 1584 class _Float64Array extends _ByteArrayBase implements Float64List { | 1584 class _Float64Array extends _ByteArrayBase implements Float64List { |
| 1585 factory _Float64Array(int length) { | 1585 factory _Float64Array(int length) { |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1628 } | 1628 } |
| 1629 | 1629 |
| 1630 int bytesPerElement() { | 1630 int bytesPerElement() { |
| 1631 return _BYTES_PER_ELEMENT; | 1631 return _BYTES_PER_ELEMENT; |
| 1632 } | 1632 } |
| 1633 | 1633 |
| 1634 int lengthInBytes() { | 1634 int lengthInBytes() { |
| 1635 return _length() * _BYTES_PER_ELEMENT; | 1635 return _length() * _BYTES_PER_ELEMENT; |
| 1636 } | 1636 } |
| 1637 | 1637 |
| 1638 static final int _BYTES_PER_ELEMENT = 8; | 1638 static const int _BYTES_PER_ELEMENT = 8; |
| 1639 | 1639 |
| 1640 static _Float64Array _new(int length) native "Float64Array_new"; | 1640 static _Float64Array _new(int length) native "Float64Array_new"; |
| 1641 | 1641 |
| 1642 double _getIndexed(int index) native "Float64Array_getIndexed"; | 1642 double _getIndexed(int index) native "Float64Array_getIndexed"; |
| 1643 int _setIndexed(int index, double value) native "Float64Array_setIndexed"; | 1643 int _setIndexed(int index, double value) native "Float64Array_setIndexed"; |
| 1644 } | 1644 } |
| 1645 | 1645 |
| 1646 | 1646 |
| 1647 class _ExternalInt8Array extends _ByteArrayBase implements Int8List { | 1647 class _ExternalInt8Array extends _ByteArrayBase implements Int8List { |
| 1648 int operator[](int index) { | 1648 int operator[](int index) { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1680 } | 1680 } |
| 1681 | 1681 |
| 1682 int bytesPerElement() { | 1682 int bytesPerElement() { |
| 1683 return _BYTES_PER_ELEMENT; | 1683 return _BYTES_PER_ELEMENT; |
| 1684 } | 1684 } |
| 1685 | 1685 |
| 1686 int lengthInBytes() { | 1686 int lengthInBytes() { |
| 1687 return _length() * _BYTES_PER_ELEMENT; | 1687 return _length() * _BYTES_PER_ELEMENT; |
| 1688 } | 1688 } |
| 1689 | 1689 |
| 1690 static final int _BYTES_PER_ELEMENT = 1; | 1690 static const int _BYTES_PER_ELEMENT = 1; |
| 1691 | 1691 |
| 1692 int _getIndexed(int index) native "ExternalInt8Array_getIndexed"; | 1692 int _getIndexed(int index) native "ExternalInt8Array_getIndexed"; |
| 1693 int _setIndexed(int index, int value) native "ExternalInt8Array_setIndexed"; | 1693 int _setIndexed(int index, int value) native "ExternalInt8Array_setIndexed"; |
| 1694 } | 1694 } |
| 1695 | 1695 |
| 1696 | 1696 |
| 1697 class _ExternalUint8Array extends _ByteArrayBase implements Uint8List { | 1697 class _ExternalUint8Array extends _ByteArrayBase implements Uint8List { |
| 1698 int operator[](int index) { | 1698 int operator[](int index) { |
| 1699 return _getIndexed(index); | 1699 return _getIndexed(index); |
| 1700 } | 1700 } |
| (...skipping 29 matching lines...) Expand all Loading... |
| 1730 } | 1730 } |
| 1731 | 1731 |
| 1732 int bytesPerElement() { | 1732 int bytesPerElement() { |
| 1733 return _BYTES_PER_ELEMENT; | 1733 return _BYTES_PER_ELEMENT; |
| 1734 } | 1734 } |
| 1735 | 1735 |
| 1736 int lengthInBytes() { | 1736 int lengthInBytes() { |
| 1737 return _length() * _BYTES_PER_ELEMENT; | 1737 return _length() * _BYTES_PER_ELEMENT; |
| 1738 } | 1738 } |
| 1739 | 1739 |
| 1740 static final int _BYTES_PER_ELEMENT = 1; | 1740 static const int _BYTES_PER_ELEMENT = 1; |
| 1741 | 1741 |
| 1742 int _getIndexed(int index) native "ExternalUint8Array_getIndexed"; | 1742 int _getIndexed(int index) native "ExternalUint8Array_getIndexed"; |
| 1743 int _setIndexed(int index, int value) native "ExternalUint8Array_setIndexed"; | 1743 int _setIndexed(int index, int value) native "ExternalUint8Array_setIndexed"; |
| 1744 } | 1744 } |
| 1745 | 1745 |
| 1746 | 1746 |
| 1747 class _ExternalInt16Array extends _ByteArrayBase implements Int16List { | 1747 class _ExternalInt16Array extends _ByteArrayBase implements Int16List { |
| 1748 int operator[](int index) { | 1748 int operator[](int index) { |
| 1749 return _getIndexed(index); | 1749 return _getIndexed(index); |
| 1750 } | 1750 } |
| (...skipping 29 matching lines...) Expand all Loading... |
| 1780 } | 1780 } |
| 1781 | 1781 |
| 1782 int bytesPerElement() { | 1782 int bytesPerElement() { |
| 1783 return _BYTES_PER_ELEMENT; | 1783 return _BYTES_PER_ELEMENT; |
| 1784 } | 1784 } |
| 1785 | 1785 |
| 1786 int lengthInBytes() { | 1786 int lengthInBytes() { |
| 1787 return _length() * _BYTES_PER_ELEMENT; | 1787 return _length() * _BYTES_PER_ELEMENT; |
| 1788 } | 1788 } |
| 1789 | 1789 |
| 1790 static final int _BYTES_PER_ELEMENT = 2; | 1790 static const int _BYTES_PER_ELEMENT = 2; |
| 1791 | 1791 |
| 1792 int _getIndexed(int index) native "ExternalInt16Array_getIndexed"; | 1792 int _getIndexed(int index) native "ExternalInt16Array_getIndexed"; |
| 1793 int _setIndexed(int index, int value) native "ExternalInt16Array_setIndexed"; | 1793 int _setIndexed(int index, int value) native "ExternalInt16Array_setIndexed"; |
| 1794 } | 1794 } |
| 1795 | 1795 |
| 1796 | 1796 |
| 1797 class _ExternalUint16Array extends _ByteArrayBase implements Uint16List { | 1797 class _ExternalUint16Array extends _ByteArrayBase implements Uint16List { |
| 1798 int operator[](int index) { | 1798 int operator[](int index) { |
| 1799 return _getIndexed(index); | 1799 return _getIndexed(index); |
| 1800 } | 1800 } |
| (...skipping 29 matching lines...) Expand all Loading... |
| 1830 } | 1830 } |
| 1831 | 1831 |
| 1832 int bytesPerElement() { | 1832 int bytesPerElement() { |
| 1833 return _BYTES_PER_ELEMENT; | 1833 return _BYTES_PER_ELEMENT; |
| 1834 } | 1834 } |
| 1835 | 1835 |
| 1836 int lengthInBytes() { | 1836 int lengthInBytes() { |
| 1837 return _length() * _BYTES_PER_ELEMENT; | 1837 return _length() * _BYTES_PER_ELEMENT; |
| 1838 } | 1838 } |
| 1839 | 1839 |
| 1840 static final int _BYTES_PER_ELEMENT = 2; | 1840 static const int _BYTES_PER_ELEMENT = 2; |
| 1841 | 1841 |
| 1842 int _getIndexed(int index) | 1842 int _getIndexed(int index) |
| 1843 native "ExternalUint16Array_getIndexed"; | 1843 native "ExternalUint16Array_getIndexed"; |
| 1844 int _setIndexed(int index, int value) | 1844 int _setIndexed(int index, int value) |
| 1845 native "ExternalUint16Array_setIndexed"; | 1845 native "ExternalUint16Array_setIndexed"; |
| 1846 } | 1846 } |
| 1847 | 1847 |
| 1848 | 1848 |
| 1849 class _ExternalInt32Array extends _ByteArrayBase implements Int32List { | 1849 class _ExternalInt32Array extends _ByteArrayBase implements Int32List { |
| 1850 int operator[](int index) { | 1850 int operator[](int index) { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1882 } | 1882 } |
| 1883 | 1883 |
| 1884 int bytesPerElement() { | 1884 int bytesPerElement() { |
| 1885 return _BYTES_PER_ELEMENT; | 1885 return _BYTES_PER_ELEMENT; |
| 1886 } | 1886 } |
| 1887 | 1887 |
| 1888 int lengthInBytes() { | 1888 int lengthInBytes() { |
| 1889 return _length() * _BYTES_PER_ELEMENT; | 1889 return _length() * _BYTES_PER_ELEMENT; |
| 1890 } | 1890 } |
| 1891 | 1891 |
| 1892 static final int _BYTES_PER_ELEMENT = 4; | 1892 static const int _BYTES_PER_ELEMENT = 4; |
| 1893 | 1893 |
| 1894 int _getIndexed(int index) | 1894 int _getIndexed(int index) |
| 1895 native "ExternalInt32Array_getIndexed"; | 1895 native "ExternalInt32Array_getIndexed"; |
| 1896 int _setIndexed(int index, int value) | 1896 int _setIndexed(int index, int value) |
| 1897 native "ExternalInt32Array_setIndexed"; | 1897 native "ExternalInt32Array_setIndexed"; |
| 1898 } | 1898 } |
| 1899 | 1899 |
| 1900 | 1900 |
| 1901 class _ExternalUint32Array extends _ByteArrayBase implements Uint32List { | 1901 class _ExternalUint32Array extends _ByteArrayBase implements Uint32List { |
| 1902 int operator[](int index) { | 1902 int operator[](int index) { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1934 } | 1934 } |
| 1935 | 1935 |
| 1936 int bytesPerElement() { | 1936 int bytesPerElement() { |
| 1937 return _BYTES_PER_ELEMENT; | 1937 return _BYTES_PER_ELEMENT; |
| 1938 } | 1938 } |
| 1939 | 1939 |
| 1940 int lengthInBytes() { | 1940 int lengthInBytes() { |
| 1941 return _length() * _BYTES_PER_ELEMENT; | 1941 return _length() * _BYTES_PER_ELEMENT; |
| 1942 } | 1942 } |
| 1943 | 1943 |
| 1944 static final int _BYTES_PER_ELEMENT = 4; | 1944 static const int _BYTES_PER_ELEMENT = 4; |
| 1945 | 1945 |
| 1946 int _getIndexed(int index) | 1946 int _getIndexed(int index) |
| 1947 native "ExternalUint32Array_getIndexed"; | 1947 native "ExternalUint32Array_getIndexed"; |
| 1948 int _setIndexed(int index, int value) | 1948 int _setIndexed(int index, int value) |
| 1949 native "ExternalUint32Array_setIndexed"; | 1949 native "ExternalUint32Array_setIndexed"; |
| 1950 } | 1950 } |
| 1951 | 1951 |
| 1952 | 1952 |
| 1953 class _ExternalInt64Array extends _ByteArrayBase implements Int64List { | 1953 class _ExternalInt64Array extends _ByteArrayBase implements Int64List { |
| 1954 int operator[](int index) { | 1954 int operator[](int index) { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1986 } | 1986 } |
| 1987 | 1987 |
| 1988 int bytesPerElement() { | 1988 int bytesPerElement() { |
| 1989 return _BYTES_PER_ELEMENT; | 1989 return _BYTES_PER_ELEMENT; |
| 1990 } | 1990 } |
| 1991 | 1991 |
| 1992 int lengthInBytes() { | 1992 int lengthInBytes() { |
| 1993 return _length() * _BYTES_PER_ELEMENT; | 1993 return _length() * _BYTES_PER_ELEMENT; |
| 1994 } | 1994 } |
| 1995 | 1995 |
| 1996 static final int _BYTES_PER_ELEMENT = 8; | 1996 static const int _BYTES_PER_ELEMENT = 8; |
| 1997 | 1997 |
| 1998 int _getIndexed(int index) | 1998 int _getIndexed(int index) |
| 1999 native "ExternalInt64Array_getIndexed"; | 1999 native "ExternalInt64Array_getIndexed"; |
| 2000 int _setIndexed(int index, int value) | 2000 int _setIndexed(int index, int value) |
| 2001 native "ExternalInt64Array_setIndexed"; | 2001 native "ExternalInt64Array_setIndexed"; |
| 2002 } | 2002 } |
| 2003 | 2003 |
| 2004 | 2004 |
| 2005 class _ExternalUint64Array extends _ByteArrayBase implements Uint64List { | 2005 class _ExternalUint64Array extends _ByteArrayBase implements Uint64List { |
| 2006 int operator[](int index) { | 2006 int operator[](int index) { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2038 } | 2038 } |
| 2039 | 2039 |
| 2040 int bytesPerElement() { | 2040 int bytesPerElement() { |
| 2041 return _BYTES_PER_ELEMENT; | 2041 return _BYTES_PER_ELEMENT; |
| 2042 } | 2042 } |
| 2043 | 2043 |
| 2044 int lengthInBytes() { | 2044 int lengthInBytes() { |
| 2045 return _length() * _BYTES_PER_ELEMENT; | 2045 return _length() * _BYTES_PER_ELEMENT; |
| 2046 } | 2046 } |
| 2047 | 2047 |
| 2048 static final int _BYTES_PER_ELEMENT = 8; | 2048 static const int _BYTES_PER_ELEMENT = 8; |
| 2049 | 2049 |
| 2050 int _getIndexed(int index) | 2050 int _getIndexed(int index) |
| 2051 native "ExternalUint64Array_getIndexed"; | 2051 native "ExternalUint64Array_getIndexed"; |
| 2052 int _setIndexed(int index, int value) | 2052 int _setIndexed(int index, int value) |
| 2053 native "ExternalUint64Array_setIndexed"; | 2053 native "ExternalUint64Array_setIndexed"; |
| 2054 } | 2054 } |
| 2055 | 2055 |
| 2056 | 2056 |
| 2057 class _ExternalFloat32Array extends _ByteArrayBase implements Float32List { | 2057 class _ExternalFloat32Array extends _ByteArrayBase implements Float32List { |
| 2058 double operator[](int index) { | 2058 double operator[](int index) { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2090 } | 2090 } |
| 2091 | 2091 |
| 2092 int bytesPerElement() { | 2092 int bytesPerElement() { |
| 2093 return _BYTES_PER_ELEMENT; | 2093 return _BYTES_PER_ELEMENT; |
| 2094 } | 2094 } |
| 2095 | 2095 |
| 2096 int lengthInBytes() { | 2096 int lengthInBytes() { |
| 2097 return _length() * _BYTES_PER_ELEMENT; | 2097 return _length() * _BYTES_PER_ELEMENT; |
| 2098 } | 2098 } |
| 2099 | 2099 |
| 2100 static final int _BYTES_PER_ELEMENT = 4; | 2100 static const int _BYTES_PER_ELEMENT = 4; |
| 2101 | 2101 |
| 2102 double _getIndexed(int index) | 2102 double _getIndexed(int index) |
| 2103 native "ExternalFloat32Array_getIndexed"; | 2103 native "ExternalFloat32Array_getIndexed"; |
| 2104 int _setIndexed(int index, double value) | 2104 int _setIndexed(int index, double value) |
| 2105 native "ExternalFloat32Array_setIndexed"; | 2105 native "ExternalFloat32Array_setIndexed"; |
| 2106 } | 2106 } |
| 2107 | 2107 |
| 2108 | 2108 |
| 2109 class _ExternalFloat64Array extends _ByteArrayBase implements Float64List { | 2109 class _ExternalFloat64Array extends _ByteArrayBase implements Float64List { |
| 2110 double operator[](int index) { | 2110 double operator[](int index) { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2142 } | 2142 } |
| 2143 | 2143 |
| 2144 int bytesPerElement() { | 2144 int bytesPerElement() { |
| 2145 return _BYTES_PER_ELEMENT; | 2145 return _BYTES_PER_ELEMENT; |
| 2146 } | 2146 } |
| 2147 | 2147 |
| 2148 int lengthInBytes() { | 2148 int lengthInBytes() { |
| 2149 return _length() * _BYTES_PER_ELEMENT; | 2149 return _length() * _BYTES_PER_ELEMENT; |
| 2150 } | 2150 } |
| 2151 | 2151 |
| 2152 static final int _BYTES_PER_ELEMENT = 8; | 2152 static const int _BYTES_PER_ELEMENT = 8; |
| 2153 | 2153 |
| 2154 double _getIndexed(int index) | 2154 double _getIndexed(int index) |
| 2155 native "ExternalFloat64Array_getIndexed"; | 2155 native "ExternalFloat64Array_getIndexed"; |
| 2156 int _setIndexed(int index, double value) | 2156 int _setIndexed(int index, double value) |
| 2157 native "ExternalFloat64Array_setIndexed"; | 2157 native "ExternalFloat64Array_setIndexed"; |
| 2158 } | 2158 } |
| 2159 | 2159 |
| 2160 | 2160 |
| 2161 class _ByteArrayIterator<E> implements Iterator<E> { | 2161 class _ByteArrayIterator<E> implements Iterator<E> { |
| 2162 _ByteArrayIterator(List array) | 2162 _ByteArrayIterator(List array) |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2433 } | 2433 } |
| 2434 | 2434 |
| 2435 ByteArray asByteArray([int start = 0, int length]) { | 2435 ByteArray asByteArray([int start = 0, int length]) { |
| 2436 if (length == null) { | 2436 if (length == null) { |
| 2437 length = this.lengthInBytes(); | 2437 length = this.lengthInBytes(); |
| 2438 } | 2438 } |
| 2439 _rangeCheck(this.length, start, length); | 2439 _rangeCheck(this.length, start, length); |
| 2440 return _array.subByteArray(_offset + start, length); | 2440 return _array.subByteArray(_offset + start, length); |
| 2441 } | 2441 } |
| 2442 | 2442 |
| 2443 static final int _BYTES_PER_ELEMENT = 1; | 2443 static const int _BYTES_PER_ELEMENT = 1; |
| 2444 final ByteArray _array; | 2444 final ByteArray _array; |
| 2445 final int _offset; | 2445 final int _offset; |
| 2446 final int _length; | 2446 final int _length; |
| 2447 } | 2447 } |
| 2448 | 2448 |
| 2449 | 2449 |
| 2450 class _Uint8ArrayView extends _ByteArrayViewBase implements Uint8List { | 2450 class _Uint8ArrayView extends _ByteArrayViewBase implements Uint8List { |
| 2451 _Uint8ArrayView(ByteArray array, [int offsetInBytes = 0, int length]) | 2451 _Uint8ArrayView(ByteArray array, [int offsetInBytes = 0, int length]) |
| 2452 : _array = array, | 2452 : _array = array, |
| 2453 _offset = _requireInteger(offsetInBytes), | 2453 _offset = _requireInteger(offsetInBytes), |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2505 } | 2505 } |
| 2506 | 2506 |
| 2507 ByteArray asByteArray([int start = 0, int length]) { | 2507 ByteArray asByteArray([int start = 0, int length]) { |
| 2508 if (length == null) { | 2508 if (length == null) { |
| 2509 length = this.lengthInBytes(); | 2509 length = this.lengthInBytes(); |
| 2510 } | 2510 } |
| 2511 _rangeCheck(this.length, start, length); | 2511 _rangeCheck(this.length, start, length); |
| 2512 return _array.subByteArray(_offset + start, length); | 2512 return _array.subByteArray(_offset + start, length); |
| 2513 } | 2513 } |
| 2514 | 2514 |
| 2515 static final int _BYTES_PER_ELEMENT = 1; | 2515 static const int _BYTES_PER_ELEMENT = 1; |
| 2516 final ByteArray _array; | 2516 final ByteArray _array; |
| 2517 final int _offset; | 2517 final int _offset; |
| 2518 final int _length; | 2518 final int _length; |
| 2519 } | 2519 } |
| 2520 | 2520 |
| 2521 | 2521 |
| 2522 class _Int16ArrayView extends _ByteArrayViewBase implements Int16List { | 2522 class _Int16ArrayView extends _ByteArrayViewBase implements Int16List { |
| 2523 _Int16ArrayView(ByteArray array, [int offsetInBytes = 0, int length]) | 2523 _Int16ArrayView(ByteArray array, [int offsetInBytes = 0, int length]) |
| 2524 : _array = array, | 2524 : _array = array, |
| 2525 _offset = _requireInteger(offsetInBytes), | 2525 _offset = _requireInteger(offsetInBytes), |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2577 } | 2577 } |
| 2578 | 2578 |
| 2579 ByteArray asByteArray([int start = 0, int length]) { | 2579 ByteArray asByteArray([int start = 0, int length]) { |
| 2580 if (length == null) { | 2580 if (length == null) { |
| 2581 length = this.lengthInBytes(); | 2581 length = this.lengthInBytes(); |
| 2582 } | 2582 } |
| 2583 _rangeCheck(this.length, start, length); | 2583 _rangeCheck(this.length, start, length); |
| 2584 return _array.subByteArray(_offset + start, length); | 2584 return _array.subByteArray(_offset + start, length); |
| 2585 } | 2585 } |
| 2586 | 2586 |
| 2587 static final int _BYTES_PER_ELEMENT = 2; | 2587 static const int _BYTES_PER_ELEMENT = 2; |
| 2588 final ByteArray _array; | 2588 final ByteArray _array; |
| 2589 final int _offset; | 2589 final int _offset; |
| 2590 final int _length; | 2590 final int _length; |
| 2591 } | 2591 } |
| 2592 | 2592 |
| 2593 | 2593 |
| 2594 class _Uint16ArrayView extends _ByteArrayViewBase implements Uint16List { | 2594 class _Uint16ArrayView extends _ByteArrayViewBase implements Uint16List { |
| 2595 _Uint16ArrayView(ByteArray array, [int offsetInBytes = 0, int length]) | 2595 _Uint16ArrayView(ByteArray array, [int offsetInBytes = 0, int length]) |
| 2596 : _array = array, | 2596 : _array = array, |
| 2597 _offset = _requireInteger(offsetInBytes), | 2597 _offset = _requireInteger(offsetInBytes), |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2649 } | 2649 } |
| 2650 | 2650 |
| 2651 ByteArray asByteArray([int start = 0, int length]) { | 2651 ByteArray asByteArray([int start = 0, int length]) { |
| 2652 if (length == null) { | 2652 if (length == null) { |
| 2653 length = this.lengthInBytes(); | 2653 length = this.lengthInBytes(); |
| 2654 } | 2654 } |
| 2655 _rangeCheck(this.length, start, length); | 2655 _rangeCheck(this.length, start, length); |
| 2656 return _array.subByteArray(_offset + start, length); | 2656 return _array.subByteArray(_offset + start, length); |
| 2657 } | 2657 } |
| 2658 | 2658 |
| 2659 static final int _BYTES_PER_ELEMENT = 2; | 2659 static const int _BYTES_PER_ELEMENT = 2; |
| 2660 final ByteArray _array; | 2660 final ByteArray _array; |
| 2661 final int _offset; | 2661 final int _offset; |
| 2662 final int _length; | 2662 final int _length; |
| 2663 } | 2663 } |
| 2664 | 2664 |
| 2665 | 2665 |
| 2666 class _Int32ArrayView extends _ByteArrayViewBase implements Int32List { | 2666 class _Int32ArrayView extends _ByteArrayViewBase implements Int32List { |
| 2667 _Int32ArrayView(ByteArray array, [int offsetInBytes = 0, int length]) | 2667 _Int32ArrayView(ByteArray array, [int offsetInBytes = 0, int length]) |
| 2668 : _array = array, | 2668 : _array = array, |
| 2669 _offset = _requireInteger(offsetInBytes), | 2669 _offset = _requireInteger(offsetInBytes), |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2721 } | 2721 } |
| 2722 | 2722 |
| 2723 ByteArray asByteArray([int start = 0, int length]) { | 2723 ByteArray asByteArray([int start = 0, int length]) { |
| 2724 if (length == null) { | 2724 if (length == null) { |
| 2725 length = this.lengthInBytes(); | 2725 length = this.lengthInBytes(); |
| 2726 } | 2726 } |
| 2727 _rangeCheck(this.length, start, length); | 2727 _rangeCheck(this.length, start, length); |
| 2728 return _array.subByteArray(_offset + start, length); | 2728 return _array.subByteArray(_offset + start, length); |
| 2729 } | 2729 } |
| 2730 | 2730 |
| 2731 static final int _BYTES_PER_ELEMENT = 4; | 2731 static const int _BYTES_PER_ELEMENT = 4; |
| 2732 final ByteArray _array; | 2732 final ByteArray _array; |
| 2733 final int _offset; | 2733 final int _offset; |
| 2734 final int _length; | 2734 final int _length; |
| 2735 } | 2735 } |
| 2736 | 2736 |
| 2737 | 2737 |
| 2738 class _Uint32ArrayView extends _ByteArrayViewBase implements Uint32List { | 2738 class _Uint32ArrayView extends _ByteArrayViewBase implements Uint32List { |
| 2739 _Uint32ArrayView(ByteArray array, [int offsetInBytes = 0, int length]) | 2739 _Uint32ArrayView(ByteArray array, [int offsetInBytes = 0, int length]) |
| 2740 : _array = array, | 2740 : _array = array, |
| 2741 _offset = _requireInteger(offsetInBytes), | 2741 _offset = _requireInteger(offsetInBytes), |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2793 } | 2793 } |
| 2794 | 2794 |
| 2795 ByteArray asByteArray([int start = 0, int length]) { | 2795 ByteArray asByteArray([int start = 0, int length]) { |
| 2796 if (length == null) { | 2796 if (length == null) { |
| 2797 length = this.lengthInBytes(); | 2797 length = this.lengthInBytes(); |
| 2798 } | 2798 } |
| 2799 _rangeCheck(this.length, start, length); | 2799 _rangeCheck(this.length, start, length); |
| 2800 return _array.subByteArray(_offset + start, length); | 2800 return _array.subByteArray(_offset + start, length); |
| 2801 } | 2801 } |
| 2802 | 2802 |
| 2803 static final int _BYTES_PER_ELEMENT = 4; | 2803 static const int _BYTES_PER_ELEMENT = 4; |
| 2804 final ByteArray _array; | 2804 final ByteArray _array; |
| 2805 final int _offset; | 2805 final int _offset; |
| 2806 final int _length; | 2806 final int _length; |
| 2807 } | 2807 } |
| 2808 | 2808 |
| 2809 | 2809 |
| 2810 class _Int64ArrayView extends _ByteArrayViewBase implements Int64List { | 2810 class _Int64ArrayView extends _ByteArrayViewBase implements Int64List { |
| 2811 _Int64ArrayView(ByteArray array, [int offsetInBytes = 0, int length]) | 2811 _Int64ArrayView(ByteArray array, [int offsetInBytes = 0, int length]) |
| 2812 : _array = array, | 2812 : _array = array, |
| 2813 _offset = _requireInteger(offsetInBytes), | 2813 _offset = _requireInteger(offsetInBytes), |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2865 } | 2865 } |
| 2866 | 2866 |
| 2867 ByteArray asByteArray([int start = 0, int length]) { | 2867 ByteArray asByteArray([int start = 0, int length]) { |
| 2868 if (length == null) { | 2868 if (length == null) { |
| 2869 length = this.lengthInBytes(); | 2869 length = this.lengthInBytes(); |
| 2870 } | 2870 } |
| 2871 _rangeCheck(this.length, start, length); | 2871 _rangeCheck(this.length, start, length); |
| 2872 return _array.subByteArray(_offset + start, length); | 2872 return _array.subByteArray(_offset + start, length); |
| 2873 } | 2873 } |
| 2874 | 2874 |
| 2875 static final int _BYTES_PER_ELEMENT = 8; | 2875 static const int _BYTES_PER_ELEMENT = 8; |
| 2876 final ByteArray _array; | 2876 final ByteArray _array; |
| 2877 final int _offset; | 2877 final int _offset; |
| 2878 final int _length; | 2878 final int _length; |
| 2879 } | 2879 } |
| 2880 | 2880 |
| 2881 | 2881 |
| 2882 class _Uint64ArrayView extends _ByteArrayViewBase implements Uint64List { | 2882 class _Uint64ArrayView extends _ByteArrayViewBase implements Uint64List { |
| 2883 _Uint64ArrayView(ByteArray array, [int offsetInBytes = 0, int length]) | 2883 _Uint64ArrayView(ByteArray array, [int offsetInBytes = 0, int length]) |
| 2884 : _array = array, | 2884 : _array = array, |
| 2885 _offset = _requireInteger(offsetInBytes), | 2885 _offset = _requireInteger(offsetInBytes), |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2937 } | 2937 } |
| 2938 | 2938 |
| 2939 ByteArray asByteArray([int start = 0, int length]) { | 2939 ByteArray asByteArray([int start = 0, int length]) { |
| 2940 if (length == null) { | 2940 if (length == null) { |
| 2941 length = this.lengthInBytes(); | 2941 length = this.lengthInBytes(); |
| 2942 } | 2942 } |
| 2943 _rangeCheck(this.length, start, length); | 2943 _rangeCheck(this.length, start, length); |
| 2944 return _array.subByteArray(_offset + start, length); | 2944 return _array.subByteArray(_offset + start, length); |
| 2945 } | 2945 } |
| 2946 | 2946 |
| 2947 static final int _BYTES_PER_ELEMENT = 8; | 2947 static const int _BYTES_PER_ELEMENT = 8; |
| 2948 final ByteArray _array; | 2948 final ByteArray _array; |
| 2949 final int _offset; | 2949 final int _offset; |
| 2950 final int _length; | 2950 final int _length; |
| 2951 } | 2951 } |
| 2952 | 2952 |
| 2953 | 2953 |
| 2954 class _Float32ArrayView extends _ByteArrayViewBase implements Float32List { | 2954 class _Float32ArrayView extends _ByteArrayViewBase implements Float32List { |
| 2955 _Float32ArrayView(ByteArray array, [int offsetInBytes = 0, int length]) | 2955 _Float32ArrayView(ByteArray array, [int offsetInBytes = 0, int length]) |
| 2956 : _array = array, | 2956 : _array = array, |
| 2957 _offset = _requireInteger(offsetInBytes), | 2957 _offset = _requireInteger(offsetInBytes), |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3009 } | 3009 } |
| 3010 | 3010 |
| 3011 ByteArray asByteArray([int start = 0, int length]) { | 3011 ByteArray asByteArray([int start = 0, int length]) { |
| 3012 if (length == null) { | 3012 if (length == null) { |
| 3013 length = this.lengthInBytes(); | 3013 length = this.lengthInBytes(); |
| 3014 } | 3014 } |
| 3015 _rangeCheck(this.length, start, length); | 3015 _rangeCheck(this.length, start, length); |
| 3016 return _array.subByteArray(_offset + start, length); | 3016 return _array.subByteArray(_offset + start, length); |
| 3017 } | 3017 } |
| 3018 | 3018 |
| 3019 static final int _BYTES_PER_ELEMENT = 4; | 3019 static const int _BYTES_PER_ELEMENT = 4; |
| 3020 final ByteArray _array; | 3020 final ByteArray _array; |
| 3021 final int _offset; | 3021 final int _offset; |
| 3022 final int _length; | 3022 final int _length; |
| 3023 } | 3023 } |
| 3024 | 3024 |
| 3025 | 3025 |
| 3026 class _Float64ArrayView extends _ByteArrayViewBase implements Float64List { | 3026 class _Float64ArrayView extends _ByteArrayViewBase implements Float64List { |
| 3027 _Float64ArrayView(ByteArray array, [int offsetInBytes = 0, int length]) | 3027 _Float64ArrayView(ByteArray array, [int offsetInBytes = 0, int length]) |
| 3028 : _array = array, | 3028 : _array = array, |
| 3029 _offset = _requireInteger(offsetInBytes), | 3029 _offset = _requireInteger(offsetInBytes), |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3081 } | 3081 } |
| 3082 | 3082 |
| 3083 ByteArray asByteArray([int start = 0, int length]) { | 3083 ByteArray asByteArray([int start = 0, int length]) { |
| 3084 if (length == null) { | 3084 if (length == null) { |
| 3085 length = this.lengthInBytes(); | 3085 length = this.lengthInBytes(); |
| 3086 } | 3086 } |
| 3087 _rangeCheck(this.length, start, length); | 3087 _rangeCheck(this.length, start, length); |
| 3088 return _array.subByteArray(_offset + start, length); | 3088 return _array.subByteArray(_offset + start, length); |
| 3089 } | 3089 } |
| 3090 | 3090 |
| 3091 static final int _BYTES_PER_ELEMENT = 8; | 3091 static const int _BYTES_PER_ELEMENT = 8; |
| 3092 final ByteArray _array; | 3092 final ByteArray _array; |
| 3093 final int _offset; | 3093 final int _offset; |
| 3094 final int _length; | 3094 final int _length; |
| 3095 } | 3095 } |
| OLD | NEW |