| Index: runtime/lib/typed_data.dart
|
| diff --git a/runtime/lib/typed_data.dart b/runtime/lib/typed_data.dart
|
| index 633ad565f83b464c462ef9f9ebc64b9e4a097bb9..1b6c96b69019391ab5b7096fc5f11dcbad129ffd 100644
|
| --- a/runtime/lib/typed_data.dart
|
| +++ b/runtime/lib/typed_data.dart
|
| @@ -424,13 +424,13 @@ abstract class _TypedListBase {
|
| void setRange(int start, int end, Iterable from, [int skipCount = 0]) {
|
| // Check ranges.
|
| if ((start < 0) || (start > length)) {
|
| - throw _newRangeError(start, length + 1);
|
| + _throwRangeError(start, length + 1);
|
| }
|
| if ((end < 0) || (end > length)) {
|
| - throw _newRangeError(end, length + 1);
|
| + _throwRangeError(end, length + 1);
|
| }
|
| if (start > end) {
|
| - throw _newRangeError(start, end + 1);
|
| + _throwRangeError(start, end + 1);
|
| }
|
| if (skipCount < 0) {
|
| throw new ArgumentError(skipCount);
|
| @@ -844,14 +844,14 @@ class _Int8Array extends _TypedList with _IntListMixin implements Int8List {
|
|
|
| int operator[](int index) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| return _getInt8(index);
|
| }
|
|
|
| void operator[]=(int index, int value) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| _setInt8(index, _toInt8(value));
|
| }
|
| @@ -885,14 +885,14 @@ class _Uint8Array extends _TypedList with _IntListMixin implements Uint8List {
|
| // Methods implementing List interface.
|
| int operator[](int index) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| return _getUint8(index);
|
| }
|
|
|
| void operator[]=(int index, int value) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| _setUint8(index, _toUint8(value));
|
| }
|
| @@ -925,14 +925,14 @@ class _Uint8ClampedArray extends _TypedList with _IntListMixin implements Uint8C
|
|
|
| int operator[](int index) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| return _getUint8(index);
|
| }
|
|
|
| void operator[]=(int index, int value) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| _setUint8(index, _toClampedUint8(value));
|
| }
|
| @@ -967,14 +967,14 @@ class _Int16Array extends _TypedList with _IntListMixin implements Int16List {
|
|
|
| int operator[](int index) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| return _getIndexedInt16(index);
|
| }
|
|
|
| void operator[]=(int index, int value) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| _setIndexedInt16(index, _toInt16(value));
|
| }
|
| @@ -1017,14 +1017,14 @@ class _Uint16Array extends _TypedList with _IntListMixin implements Uint16List {
|
|
|
| int operator[](int index) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| return _getIndexedUint16(index);
|
| }
|
|
|
| void operator[]=(int index, int value) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| _setIndexedUint16(index, _toUint16(value));
|
| }
|
| @@ -1067,14 +1067,14 @@ class _Int32Array extends _TypedList with _IntListMixin implements Int32List {
|
|
|
| int operator[](int index) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| return _getIndexedInt32(index);
|
| }
|
|
|
| void operator[]=(int index, int value) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| _setIndexedInt32(index, _toInt32(value));
|
| }
|
| @@ -1117,14 +1117,14 @@ class _Uint32Array extends _TypedList with _IntListMixin implements Uint32List {
|
|
|
| int operator[](int index) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| return _getIndexedUint32(index);
|
| }
|
|
|
| void operator[]=(int index, int value) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| _setIndexedUint32(index, _toUint32(value));
|
| }
|
| @@ -1167,14 +1167,14 @@ class _Int64Array extends _TypedList with _IntListMixin implements Int64List {
|
|
|
| int operator[](int index) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| return _getIndexedInt64(index);
|
| }
|
|
|
| void operator[]=(int index, int value) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| _setIndexedInt64(index, _toInt64(value));
|
| }
|
| @@ -1217,14 +1217,14 @@ class _Uint64Array extends _TypedList with _IntListMixin implements Uint64List {
|
|
|
| int operator[](int index) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| return _getIndexedUint64(index);
|
| }
|
|
|
| void operator[]=(int index, int value) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| _setIndexedUint64(index, _toUint64(value));
|
| }
|
| @@ -1267,14 +1267,14 @@ class _Float32Array extends _TypedList with _DoubleListMixin implements Float32L
|
|
|
| double operator[](int index) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| return _getIndexedFloat32(index);
|
| }
|
|
|
| void operator[]=(int index, double value) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| _setIndexedFloat32(index, value);
|
| }
|
| @@ -1317,14 +1317,14 @@ class _Float64Array extends _TypedList with _DoubleListMixin implements Float64L
|
|
|
| double operator[](int index) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| return _getIndexedFloat64(index);
|
| }
|
|
|
| void operator[]=(int index, double value) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| _setIndexedFloat64(index, value);
|
| }
|
| @@ -1365,14 +1365,14 @@ class _Float32x4Array extends _TypedList with _Float32x4ListMixin implements Flo
|
|
|
| Float32x4 operator[](int index) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| return _getIndexedFloat32x4(index);
|
| }
|
|
|
| void operator[]=(int index, Float32x4 value) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| _setIndexedFloat32x4(index, value);
|
| }
|
| @@ -1413,14 +1413,14 @@ class _Int32x4Array extends _TypedList with _Int32x4ListMixin implements Int32x4
|
|
|
| Int32x4 operator[](int index) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| return _getIndexedInt32x4(index);
|
| }
|
|
|
| void operator[]=(int index, Int32x4 value) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| _setIndexedInt32x4(index, value);
|
| }
|
| @@ -1461,14 +1461,14 @@ class _Float64x2Array extends _TypedList with _Float64x2ListMixin implements Flo
|
|
|
| Float64x2 operator[](int index) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| return _getIndexedFloat64x2(index);
|
| }
|
|
|
| void operator[]=(int index, Float64x2 value) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| _setIndexedFloat64x2(index, value);
|
| }
|
| @@ -1510,14 +1510,14 @@ class _ExternalInt8Array extends _TypedList with _IntListMixin implements Int8Li
|
| // Method(s) implementing the List interface.
|
| int operator[](int index) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| return _getInt8(index);
|
| }
|
|
|
| void operator[]=(int index, int value) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| _setInt8(index, value);
|
| }
|
| @@ -1553,14 +1553,14 @@ class _ExternalUint8Array extends _TypedList with _IntListMixin implements Uint8
|
|
|
| int operator[](int index) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| return _getUint8(index);
|
| }
|
|
|
| void operator[]=(int index, int value) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| _setUint8(index, _toUint8(value));
|
| }
|
| @@ -1595,14 +1595,14 @@ class _ExternalUint8ClampedArray extends _TypedList with _IntListMixin implement
|
|
|
| int operator[](int index) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| return _getUint8(index);
|
| }
|
|
|
| void operator[]=(int index, int value) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| _setUint8(index, _toClampedUint8(value));
|
| }
|
| @@ -1638,14 +1638,14 @@ class _ExternalInt16Array extends _TypedList with _IntListMixin implements Int16
|
|
|
| int operator[](int index) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| return _getIndexedInt16(index);
|
| }
|
|
|
| void operator[]=(int index, int value) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| _setIndexedInt16(index, _toInt16(value));
|
| }
|
| @@ -1689,14 +1689,14 @@ class _ExternalUint16Array extends _TypedList with _IntListMixin implements Uint
|
|
|
| int operator[](int index) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| return _getIndexedUint16(index);
|
| }
|
|
|
| void operator[]=(int index, int value) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| _setIndexedUint16(index, _toUint16(value));
|
| }
|
| @@ -1740,14 +1740,14 @@ class _ExternalInt32Array extends _TypedList with _IntListMixin implements Int32
|
|
|
| int operator[](int index) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| return _getIndexedInt32(index);
|
| }
|
|
|
| void operator[]=(int index, int value) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| _setIndexedInt32(index, _toInt32(value));
|
| }
|
| @@ -1791,14 +1791,14 @@ class _ExternalUint32Array extends _TypedList with _IntListMixin implements Uint
|
|
|
| int operator[](int index) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| return _getIndexedUint32(index);
|
| }
|
|
|
| void operator[]=(int index, int value) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| _setIndexedUint32(index, _toUint32(value));
|
| }
|
| @@ -1842,14 +1842,14 @@ class _ExternalInt64Array extends _TypedList with _IntListMixin implements Int64
|
|
|
| int operator[](int index) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| return _getIndexedInt64(index);
|
| }
|
|
|
| void operator[]=(int index, int value) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| _setIndexedInt64(index, _toInt64(value));
|
| }
|
| @@ -1893,14 +1893,14 @@ class _ExternalUint64Array extends _TypedList with _IntListMixin implements Uint
|
|
|
| int operator[](int index) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| return _getIndexedUint64(index);
|
| }
|
|
|
| void operator[]=(int index, int value) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| _setIndexedUint64(index, _toUint64(value));
|
| }
|
| @@ -1944,14 +1944,14 @@ class _ExternalFloat32Array extends _TypedList with _DoubleListMixin implements
|
|
|
| double operator[](int index) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| return _getIndexedFloat32(index);
|
| }
|
|
|
| void operator[]=(int index, double value) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| _setIndexedFloat32(index, value);
|
| }
|
| @@ -1995,14 +1995,14 @@ class _ExternalFloat64Array extends _TypedList with _DoubleListMixin implements
|
|
|
| double operator[](int index) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| return _getIndexedFloat64(index);
|
| }
|
|
|
| void operator[]=(int index, double value) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| _setIndexedFloat64(index, value);
|
| }
|
| @@ -2046,14 +2046,14 @@ class _ExternalFloat32x4Array extends _TypedList with _Float32x4ListMixin implem
|
|
|
| Float32x4 operator[](int index) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| return _getIndexedFloat32x4(index);
|
| }
|
|
|
| void operator[]=(int index, Float32x4 value) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| _setIndexedFloat32x4(index, value);
|
| }
|
| @@ -2097,14 +2097,14 @@ class _ExternalInt32x4Array extends _TypedList with _Int32x4ListMixin implements
|
|
|
| Int32x4 operator[](int index) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| return _getIndexedInt32x4(index);
|
| }
|
|
|
| void operator[]=(int index, Int32x4 value) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| _setIndexedInt32x4(index, value);
|
| }
|
| @@ -2148,14 +2148,14 @@ class _ExternalFloat64x2Array extends _TypedList with _Float64x2ListMixin implem
|
|
|
| Float64x2 operator[](int index) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| return _getIndexedFloat64x2(index);
|
| }
|
|
|
| void operator[]=(int index, Float64x2 value) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| _setIndexedFloat64x2(index, value);
|
| }
|
| @@ -2476,7 +2476,7 @@ class _Int8ArrayView extends _TypedListView with _IntListMixin implements Int8Li
|
|
|
| int operator[](int index) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| return _typedData._getInt8(offsetInBytes +
|
| (index * Int8List.BYTES_PER_ELEMENT));
|
| @@ -2484,7 +2484,7 @@ class _Int8ArrayView extends _TypedListView with _IntListMixin implements Int8Li
|
|
|
| void operator[]=(int index, int value) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| _typedData._setInt8(offsetInBytes + (index * Int8List.BYTES_PER_ELEMENT),
|
| _toInt8(value));
|
| @@ -2523,7 +2523,7 @@ class _Uint8ArrayView extends _TypedListView with _IntListMixin implements Uint8
|
|
|
| int operator[](int index) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| return _typedData._getUint8(offsetInBytes +
|
| (index * Uint8List.BYTES_PER_ELEMENT));
|
| @@ -2531,7 +2531,7 @@ class _Uint8ArrayView extends _TypedListView with _IntListMixin implements Uint8
|
|
|
| void operator[]=(int index, int value) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| _typedData._setUint8(offsetInBytes + (index * Uint8List.BYTES_PER_ELEMENT),
|
| _toUint8(value));
|
| @@ -2571,7 +2571,7 @@ class _Uint8ClampedArrayView extends _TypedListView with _IntListMixin implement
|
|
|
| int operator[](int index) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| return _typedData._getUint8(offsetInBytes +
|
| (index * Uint8List.BYTES_PER_ELEMENT));
|
| @@ -2579,7 +2579,7 @@ class _Uint8ClampedArrayView extends _TypedListView with _IntListMixin implement
|
|
|
| void operator[]=(int index, int value) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| _typedData._setUint8(offsetInBytes + (index * Uint8List.BYTES_PER_ELEMENT),
|
| _toClampedUint8(value));
|
| @@ -2619,7 +2619,7 @@ class _Int16ArrayView extends _TypedListView with _IntListMixin implements Int16
|
|
|
| int operator[](int index) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| return _typedData._getInt16(offsetInBytes +
|
| (index * Int16List.BYTES_PER_ELEMENT));
|
| @@ -2627,7 +2627,7 @@ class _Int16ArrayView extends _TypedListView with _IntListMixin implements Int16
|
|
|
| void operator[]=(int index, int value) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| _typedData._setInt16(offsetInBytes + (index * Int16List.BYTES_PER_ELEMENT),
|
| _toInt16(value));
|
| @@ -2667,7 +2667,7 @@ class _Uint16ArrayView extends _TypedListView with _IntListMixin implements Uint
|
|
|
| int operator[](int index) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| return _typedData._getUint16(offsetInBytes +
|
| (index * Uint16List.BYTES_PER_ELEMENT));
|
| @@ -2675,7 +2675,7 @@ class _Uint16ArrayView extends _TypedListView with _IntListMixin implements Uint
|
|
|
| void operator[]=(int index, int value) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| _typedData._setUint16(offsetInBytes + (index * Uint16List.BYTES_PER_ELEMENT),
|
| _toUint16(value));
|
| @@ -2715,7 +2715,7 @@ class _Int32ArrayView extends _TypedListView with _IntListMixin implements Int32
|
|
|
| int operator[](int index) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| return _typedData._getInt32(offsetInBytes +
|
| (index * Int32List.BYTES_PER_ELEMENT));
|
| @@ -2723,7 +2723,7 @@ class _Int32ArrayView extends _TypedListView with _IntListMixin implements Int32
|
|
|
| void operator[]=(int index, int value) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| _typedData._setInt32(offsetInBytes + (index * Int32List.BYTES_PER_ELEMENT),
|
| _toInt32(value));
|
| @@ -2763,7 +2763,7 @@ class _Uint32ArrayView extends _TypedListView with _IntListMixin implements Uint
|
|
|
| int operator[](int index) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| return _typedData._getUint32(offsetInBytes +
|
| (index * Uint32List.BYTES_PER_ELEMENT));
|
| @@ -2771,7 +2771,7 @@ class _Uint32ArrayView extends _TypedListView with _IntListMixin implements Uint
|
|
|
| void operator[]=(int index, int value) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| _typedData._setUint32(offsetInBytes + (index * Uint32List.BYTES_PER_ELEMENT),
|
| _toUint32(value));
|
| @@ -2811,7 +2811,7 @@ class _Int64ArrayView extends _TypedListView with _IntListMixin implements Int64
|
|
|
| int operator[](int index) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| return _typedData._getInt64(offsetInBytes +
|
| (index * Int64List.BYTES_PER_ELEMENT));
|
| @@ -2819,7 +2819,7 @@ class _Int64ArrayView extends _TypedListView with _IntListMixin implements Int64
|
|
|
| void operator[]=(int index, int value) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| _typedData._setInt64(offsetInBytes + (index * Int64List.BYTES_PER_ELEMENT),
|
| _toInt64(value));
|
| @@ -2859,7 +2859,7 @@ class _Uint64ArrayView extends _TypedListView with _IntListMixin implements Uint
|
|
|
| int operator[](int index) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| return _typedData._getUint64(offsetInBytes +
|
| (index * Uint64List.BYTES_PER_ELEMENT));
|
| @@ -2867,7 +2867,7 @@ class _Uint64ArrayView extends _TypedListView with _IntListMixin implements Uint
|
|
|
| void operator[]=(int index, int value) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| _typedData._setUint64(offsetInBytes + (index * Uint64List.BYTES_PER_ELEMENT),
|
| _toUint64(value));
|
| @@ -2907,7 +2907,7 @@ class _Float32ArrayView extends _TypedListView with _DoubleListMixin implements
|
|
|
| double operator[](int index) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| return _typedData._getFloat32(offsetInBytes +
|
| (index * Float32List.BYTES_PER_ELEMENT));
|
| @@ -2915,7 +2915,7 @@ class _Float32ArrayView extends _TypedListView with _DoubleListMixin implements
|
|
|
| void operator[]=(int index, double value) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| _typedData._setFloat32(offsetInBytes +
|
| (index * Float32List.BYTES_PER_ELEMENT), value);
|
| @@ -2955,7 +2955,7 @@ class _Float64ArrayView extends _TypedListView with _DoubleListMixin implements
|
|
|
| double operator[](int index) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| return _typedData._getFloat64(offsetInBytes +
|
| (index * Float64List.BYTES_PER_ELEMENT));
|
| @@ -2963,7 +2963,7 @@ class _Float64ArrayView extends _TypedListView with _DoubleListMixin implements
|
|
|
| void operator[]=(int index, double value) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| _typedData._setFloat64(offsetInBytes +
|
| (index * Float64List.BYTES_PER_ELEMENT), value);
|
| @@ -3003,7 +3003,7 @@ class _Float32x4ArrayView extends _TypedListView with _Float32x4ListMixin implem
|
|
|
| Float32x4 operator[](int index) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| return _typedData._getFloat32x4(offsetInBytes +
|
| (index * Float32x4List.BYTES_PER_ELEMENT));
|
| @@ -3011,7 +3011,7 @@ class _Float32x4ArrayView extends _TypedListView with _Float32x4ListMixin implem
|
|
|
| void operator[]=(int index, Float32x4 value) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| _typedData._setFloat32x4(offsetInBytes +
|
| (index * Float32x4List.BYTES_PER_ELEMENT), value);
|
| @@ -3051,7 +3051,7 @@ class _Int32x4ArrayView extends _TypedListView with _Int32x4ListMixin implements
|
|
|
| Int32x4 operator[](int index) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| return _typedData._getInt32x4(offsetInBytes +
|
| (index * Int32x4List.BYTES_PER_ELEMENT));
|
| @@ -3059,7 +3059,7 @@ class _Int32x4ArrayView extends _TypedListView with _Int32x4ListMixin implements
|
|
|
| void operator[]=(int index, Int32x4 value) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| _typedData._setInt32x4(offsetInBytes +
|
| (index * Int32x4List.BYTES_PER_ELEMENT), value);
|
| @@ -3099,7 +3099,7 @@ class _Float64x2ArrayView extends _TypedListView with _Float64x2ListMixin implem
|
|
|
| Float64x2 operator[](int index) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| return _typedData._getFloat64x2(offsetInBytes +
|
| (index * Float64x2List.BYTES_PER_ELEMENT));
|
| @@ -3107,7 +3107,7 @@ class _Float64x2ArrayView extends _TypedListView with _Float64x2ListMixin implem
|
|
|
| void operator[]=(int index, Float64x2 value) {
|
| if (index < 0 || index >= length) {
|
| - throw _newRangeError(index, length);
|
| + _throwRangeError(index, length);
|
| }
|
| _typedData._setFloat64x2(offsetInBytes +
|
| (index * Float64x2List.BYTES_PER_ELEMENT), value);
|
| @@ -3160,33 +3160,33 @@ class _ByteDataView implements ByteData {
|
|
|
| int getInt8(int byteOffset) {
|
| if (byteOffset < 0 || byteOffset >= length) {
|
| - throw _newRangeError(byteOffset, length);
|
| + _throwRangeError(byteOffset, length);
|
| }
|
| return _typedData._getInt8(_offset + byteOffset);
|
| }
|
| void setInt8(int byteOffset, int value) {
|
| if (byteOffset < 0 || byteOffset >= length) {
|
| - throw _newRangeError(byteOffset, length);
|
| + _throwRangeError(byteOffset, length);
|
| }
|
| _typedData._setInt8(_offset + byteOffset, _toInt8(value));
|
| }
|
|
|
| int getUint8(int byteOffset) {
|
| if (byteOffset < 0 || byteOffset >= length) {
|
| - throw _newRangeError(byteOffset, length);
|
| + _throwRangeError(byteOffset, length);
|
| }
|
| return _typedData._getUint8(_offset + byteOffset);
|
| }
|
| void setUint8(int byteOffset, int value) {
|
| if (byteOffset < 0 || byteOffset >= length) {
|
| - throw _newRangeError(byteOffset, length);
|
| + _throwRangeError(byteOffset, length);
|
| }
|
| _typedData._setUint8(_offset + byteOffset, _toUint8(value));
|
| }
|
|
|
| int getInt16(int byteOffset, [Endianness endian = Endianness.BIG_ENDIAN]) {
|
| if (byteOffset < 0 || byteOffset + 1 >= length) {
|
| - throw _newRangeError(byteOffset + 1, length);
|
| + _throwRangeError(byteOffset + 1, length);
|
| }
|
| var result = _typedData._getInt16(_offset + byteOffset);
|
| if (identical(endian, Endianness.HOST_ENDIAN)) {
|
| @@ -3198,7 +3198,7 @@ class _ByteDataView implements ByteData {
|
| int value,
|
| [Endianness endian = Endianness.BIG_ENDIAN]) {
|
| if (byteOffset < 0 || byteOffset + 1 >= length) {
|
| - throw _newRangeError(byteOffset + 1, length);
|
| + _throwRangeError(byteOffset + 1, length);
|
| }
|
| var set_value = _toInt16(value);
|
| if (!identical(endian, Endianness.HOST_ENDIAN)) {
|
| @@ -3209,7 +3209,7 @@ class _ByteDataView implements ByteData {
|
|
|
| int getUint16(int byteOffset, [Endianness endian = Endianness.BIG_ENDIAN]) {
|
| if (byteOffset < 0 || byteOffset + 1 >= length) {
|
| - throw _newRangeError(byteOffset + 1, length);
|
| + _throwRangeError(byteOffset + 1, length);
|
| }
|
| var result = _typedData._getUint16(_offset + byteOffset);
|
| if (identical(endian, Endianness.HOST_ENDIAN)) {
|
| @@ -3221,7 +3221,7 @@ class _ByteDataView implements ByteData {
|
| int value,
|
| [Endianness endian = Endianness.BIG_ENDIAN]) {
|
| if (byteOffset < 0 || byteOffset + 1 >= length) {
|
| - throw _newRangeError(byteOffset + 1, length);
|
| + _throwRangeError(byteOffset + 1, length);
|
| }
|
| var set_value = _toUint16(value);
|
| if (!identical(endian, Endianness.HOST_ENDIAN)) {
|
| @@ -3232,7 +3232,7 @@ class _ByteDataView implements ByteData {
|
|
|
| int getInt32(int byteOffset, [Endianness endian = Endianness.BIG_ENDIAN]) {
|
| if (byteOffset < 0 || byteOffset + 3 >= length) {
|
| - throw _newRangeError(byteOffset + 3, length);
|
| + _throwRangeError(byteOffset + 3, length);
|
| }
|
| var result = _typedData._getInt32(_offset + byteOffset);
|
| if (identical(endian, Endianness.HOST_ENDIAN)) {
|
| @@ -3244,7 +3244,7 @@ class _ByteDataView implements ByteData {
|
| int value,
|
| [Endianness endian = Endianness.BIG_ENDIAN]) {
|
| if (byteOffset < 0 || byteOffset + 3 >= length) {
|
| - throw _newRangeError(byteOffset + 3, length);
|
| + _throwRangeError(byteOffset + 3, length);
|
| }
|
| var set_value = _toInt32(value);
|
| if (!identical(endian, Endianness.HOST_ENDIAN)) {
|
| @@ -3255,7 +3255,7 @@ class _ByteDataView implements ByteData {
|
|
|
| int getUint32(int byteOffset, [Endianness endian = Endianness.BIG_ENDIAN]) {
|
| if (byteOffset < 0 || byteOffset + 3 >= length) {
|
| - throw _newRangeError(byteOffset + 3, length);
|
| + _throwRangeError(byteOffset + 3, length);
|
| }
|
| var result = _typedData._getUint32(_offset + byteOffset);
|
| if (identical(endian, Endianness.HOST_ENDIAN)) {
|
| @@ -3267,7 +3267,7 @@ class _ByteDataView implements ByteData {
|
| int value,
|
| [Endianness endian = Endianness.BIG_ENDIAN]) {
|
| if (byteOffset < 0 || byteOffset + 3 >= length) {
|
| - throw _newRangeError(byteOffset + 3, length);
|
| + _throwRangeError(byteOffset + 3, length);
|
| }
|
| var set_value = _toUint32(value);
|
| if (!identical(endian, Endianness.HOST_ENDIAN)) {
|
| @@ -3278,7 +3278,7 @@ class _ByteDataView implements ByteData {
|
|
|
| int getInt64(int byteOffset, [Endianness endian = Endianness.BIG_ENDIAN]) {
|
| if (byteOffset < 0 || byteOffset + 7 >= length) {
|
| - throw _newRangeError(byteOffset + 7, length);
|
| + _throwRangeError(byteOffset + 7, length);
|
| }
|
| var result = _typedData._getInt64(_offset + byteOffset);
|
| if (identical(endian, Endianness.HOST_ENDIAN)) {
|
| @@ -3290,7 +3290,7 @@ class _ByteDataView implements ByteData {
|
| int value,
|
| [Endianness endian = Endianness.BIG_ENDIAN]) {
|
| if (byteOffset < 0 || byteOffset + 7 >= length) {
|
| - throw _newRangeError(byteOffset + 7, length);
|
| + _throwRangeError(byteOffset + 7, length);
|
| }
|
| var set_value = _toInt64(value);
|
| if (!identical(endian, Endianness.HOST_ENDIAN)) {
|
| @@ -3301,7 +3301,7 @@ class _ByteDataView implements ByteData {
|
|
|
| int getUint64(int byteOffset, [Endianness endian = Endianness.BIG_ENDIAN]) {
|
| if (byteOffset < 0 || byteOffset + 7 >= length) {
|
| - throw _newRangeError(byteOffset + 7, length);
|
| + _throwRangeError(byteOffset + 7, length);
|
| }
|
| var result = _typedData._getUint64(_offset + byteOffset);
|
| if (identical(endian, Endianness.HOST_ENDIAN)) {
|
| @@ -3313,7 +3313,7 @@ class _ByteDataView implements ByteData {
|
| int value,
|
| [Endianness endian = Endianness.BIG_ENDIAN]) {
|
| if (byteOffset < 0 || byteOffset + 7 >= length) {
|
| - throw _newRangeError(byteOffset + 7, length);
|
| + _throwRangeError(byteOffset + 7, length);
|
| }
|
| var set_value = _toUint64(value);
|
| if (!identical(endian, Endianness.HOST_ENDIAN)) {
|
| @@ -3325,7 +3325,7 @@ class _ByteDataView implements ByteData {
|
| double getFloat32(int byteOffset,
|
| [Endianness endian = Endianness.BIG_ENDIAN]) {
|
| if (byteOffset < 0 || byteOffset + 3 >= length) {
|
| - throw _newRangeError(byteOffset + 3, length);
|
| + _throwRangeError(byteOffset + 3, length);
|
| }
|
| var result = _typedData._getFloat32(_offset + byteOffset);
|
| if (identical(endian, Endianness.HOST_ENDIAN)) {
|
| @@ -3337,7 +3337,7 @@ class _ByteDataView implements ByteData {
|
| double value,
|
| [Endianness endian = Endianness.BIG_ENDIAN]) {
|
| if (byteOffset < 0 || byteOffset + 3 >= length) {
|
| - throw _newRangeError(byteOffset + 3, length);
|
| + _throwRangeError(byteOffset + 3, length);
|
| }
|
| var set_value = value;
|
| if (!identical(endian, Endianness.HOST_ENDIAN)) {
|
| @@ -3349,7 +3349,7 @@ class _ByteDataView implements ByteData {
|
| double getFloat64(int byteOffset,
|
| [Endianness endian = Endianness.BIG_ENDIAN]) {
|
| if (byteOffset < 0 || byteOffset + 7 >= length) {
|
| - throw _newRangeError(byteOffset + 7, length);
|
| + _throwRangeError(byteOffset + 7, length);
|
| }
|
| var result = _typedData._getFloat64(_offset + byteOffset);
|
| if (identical(endian, Endianness.HOST_ENDIAN)) {
|
| @@ -3361,7 +3361,7 @@ class _ByteDataView implements ByteData {
|
| double value,
|
| [Endianness endian = Endianness.BIG_ENDIAN]) {
|
| if (byteOffset < 0 || byteOffset + 7 >= length) {
|
| - throw _newRangeError(byteOffset + 7, length);
|
| + _throwRangeError(byteOffset + 7, length);
|
| }
|
| var set_value = value;
|
| if (!identical(endian, Endianness.HOST_ENDIAN)) {
|
| @@ -3373,7 +3373,7 @@ class _ByteDataView implements ByteData {
|
| Float32x4 getFloat32x4(int byteOffset,
|
| [Endianness endian = Endianness.BIG_ENDIAN]) {
|
| if (byteOffset < 0 || byteOffset + 3 >= length) {
|
| - throw _newRangeError(byteOffset + 3, length);
|
| + _throwRangeError(byteOffset + 3, length);
|
| }
|
| // TODO(johnmccutchan) : Need to resolve this for endianity.
|
| return _typedData._getFloat32x4(_offset + byteOffset);
|
| @@ -3382,7 +3382,7 @@ class _ByteDataView implements ByteData {
|
| Float32x4 value,
|
| [Endianness endian = Endianness.BIG_ENDIAN]) {
|
| if (byteOffset < 0 || byteOffset + 3 >= length) {
|
| - throw _newRangeError(byteOffset + 3, length);
|
| + _throwRangeError(byteOffset + 3, length);
|
| }
|
| // TODO(johnmccutchan) : Need to resolve this for endianity.
|
| _typedData._setFloat32x4(_offset + byteOffset, value);
|
| @@ -3500,7 +3500,7 @@ int _defaultIfNull(object, value) {
|
| }
|
|
|
|
|
| -void _newRangeError(int index, int length) {
|
| +void _throwRangeError(int index, int length) {
|
| String message = "$index must be in the range [0..$length)";
|
| - return new RangeError(message);
|
| + throw new RangeError(message);
|
| }
|
|
|