From bc03bd38050bacd899beffdbfa3aee7f161c75be Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Tue, 13 Nov 2018 22:56:54 +0000 Subject: [PATCH] Cleanup unused vars in VM patch files Change-Id: Ibc548921113d979df5b0ed8eb7f6ad48a553fc86 Reviewed-on: https://dart-review.googlesource.com/c/84121 Commit-Queue: Kevin Moore Reviewed-by: Lasse R.H. Nielsen --- pkg/build_integration/pubspec.yaml | 3 + pkg/vm/pubspec.yaml | 4 +- runtime/lib/async_patch.dart | 3 +- runtime/lib/bigint_patch.dart | 3 - runtime/lib/collection_patch.dart | 50 ++++---------- runtime/lib/compact_hash.dart | 3 - runtime/lib/convert_patch.dart | 1 - runtime/lib/date_patch.dart | 6 +- runtime/lib/developer.dart | 4 +- runtime/lib/function.dart | 4 +- runtime/lib/growable_array.dart | 1 - runtime/lib/isolate_patch.dart | 4 +- runtime/lib/lib_prefix.dart | 1 - runtime/lib/math_patch.dart | 2 +- runtime/lib/string_patch.dart | 12 ++-- runtime/lib/timer_impl.dart | 2 +- runtime/lib/timer_patch.dart | 4 +- runtime/lib/typed_data_patch.dart | 104 +++++++++-------------------- 18 files changed, 63 insertions(+), 148 deletions(-) diff --git a/pkg/build_integration/pubspec.yaml b/pkg/build_integration/pubspec.yaml index a8c5bef5c8d..b746b5c077f 100644 --- a/pkg/build_integration/pubspec.yaml +++ b/pkg/build_integration/pubspec.yaml @@ -5,5 +5,8 @@ description: > # This package is not intended to be published - yet publish_to: none +environment: + sdk: '>=2.0.0 <3.0.0' + dependencies: front_end: ^0.1.0 diff --git a/pkg/vm/pubspec.yaml b/pkg/vm/pubspec.yaml index c1ba6912f22..ef74ee068d2 100644 --- a/pkg/vm/pubspec.yaml +++ b/pkg/vm/pubspec.yaml @@ -6,8 +6,8 @@ description: VM specific Dart code and helper scripts dependencies: build_integration: path: ../build_integration - front_end: 0.1.6 - kernel: 0.3.6 + front_end: ^0.1.6 + kernel: ^0.3.6 dev_dependencies: args: ^1.4.4 diff --git a/runtime/lib/async_patch.dart b/runtime/lib/async_patch.dart index 0cd4bd8e05e..c293221674b 100644 --- a/runtime/lib/async_patch.dart +++ b/runtime/lib/async_patch.dart @@ -200,8 +200,7 @@ class _AsyncStarStreamController { // If stream is cancelled, tell caller to exit the async generator. if (!controller.hasListener) return true; isAdding = true; - var whenDoneAdding = - controller.addStream(stream as Stream, cancelOnError: false); + var whenDoneAdding = controller.addStream(stream, cancelOnError: false); whenDoneAdding.then((_) { isAdding = false; scheduleGenerator(); diff --git a/runtime/lib/bigint_patch.dart b/runtime/lib/bigint_patch.dart index 0ae7425e820..03419239bc7 100644 --- a/runtime/lib/bigint_patch.dart +++ b/runtime/lib/bigint_patch.dart @@ -2572,9 +2572,6 @@ class _BigIntMontgomeryReduction implements _BigIntReduction { // args[_rhoDigit.._rhoHighDigit] = // 1/args[_xDigit.._xHighDigit] mod _digitBase^2. static void _invDigitPair(Uint32List args) { - var two = _BigIntImpl.two; - var mask32 = _BigIntImpl._oneDigitMask; - var mask64 = _BigIntImpl._twoDigitMask; var xl = args[_xDigit]; // Lower 32-bit digit of x. var y = xl & 3; // y == 1/x mod 2^2 y = (y * (2 - (xl & 0xf) * y)) & 0xf; // y == 1/x mod 2^4 diff --git a/runtime/lib/collection_patch.dart b/runtime/lib/collection_patch.dart index 05cf6e1df15..664f619dff0 100644 --- a/runtime/lib/collection_patch.dart +++ b/runtime/lib/collection_patch.dart @@ -34,17 +34,11 @@ class HashMap { identical(identical, equals)) { return new _IdentityHashMap(); } - if (equals == null) { - equals = _defaultEquals; - } + equals ??= _defaultEquals; } } else { - if (hashCode == null) { - hashCode = _defaultHashCode; - } - if (equals == null) { - equals = _defaultEquals; - } + hashCode ??= _defaultHashCode; + equals ??= _defaultEquals; } return new _CustomHashMap(equals, hashCode, isValidKey); } @@ -536,17 +530,11 @@ class HashSet { identical(identical, equals)) { return new _IdentityHashSet(); } - if (equals == null) { - equals = _defaultEquals; - } + equals ??= _defaultEquals; } } else { - if (hashCode == null) { - hashCode = _defaultHashCode; - } - if (equals == null) { - equals = _defaultEquals; - } + hashCode ??= _defaultHashCode; + equals ??= _defaultEquals; } return new _CustomHashSet(equals, hashCode, isValidKey); } @@ -637,9 +625,7 @@ class _HashSet extends _HashSetBase implements HashSet { } void addAll(Iterable objects) { - int ctr = 0; for (E object in objects) { - ctr++; add(object); } } @@ -879,17 +865,11 @@ class LinkedHashMap { identical(identical, equals)) { return new _CompactLinkedIdentityHashMap(); } - if (equals == null) { - equals = _defaultEquals; - } + equals ??= _defaultEquals; } } else { - if (hashCode == null) { - hashCode = _defaultHashCode; - } - if (equals == null) { - equals = _defaultEquals; - } + hashCode ??= _defaultHashCode; + equals ??= _defaultEquals; } return new _CompactLinkedCustomHashMap(equals, hashCode, isValidKey); } @@ -916,17 +896,11 @@ class LinkedHashSet { identical(identical, equals)) { return new _CompactLinkedIdentityHashSet(); } - if (equals == null) { - equals = _defaultEquals; - } + equals ??= _defaultEquals; } } else { - if (hashCode == null) { - hashCode = _defaultHashCode; - } - if (equals == null) { - equals = _defaultEquals; - } + hashCode ??= _defaultHashCode; + equals ??= _defaultEquals; } return new _CompactLinkedCustomHashSet(equals, hashCode, isValidKey); } diff --git a/runtime/lib/compact_hash.dart b/runtime/lib/compact_hash.dart index c374ec6c801..20ddf7a7376 100644 --- a/runtime/lib/compact_hash.dart +++ b/runtime/lib/compact_hash.dart @@ -256,7 +256,6 @@ abstract class _LinkedHashMapMixin implements _HashBase { void operator []=(K key, V value) { final int size = _index.length; - final int sizeMask = size - 1; final int fullHash = _hashCode(key); final int hashPattern = _HashBase._hashPattern(fullHash, _hashMask, size); final int d = _findValueOrInsertPoint(key, fullHash, hashPattern, size); @@ -270,8 +269,6 @@ abstract class _LinkedHashMapMixin implements _HashBase { V putIfAbsent(K key, V ifAbsent()) { final int size = _index.length; - final int sizeMask = size - 1; - final int maxEntries = size >> 1; final int fullHash = _hashCode(key); final int hashPattern = _HashBase._hashPattern(fullHash, _hashMask, size); final int d = _findValueOrInsertPoint(key, fullHash, hashPattern, size); diff --git a/runtime/lib/convert_patch.dart b/runtime/lib/convert_patch.dart index 6ba84444c78..0802cbb2206 100644 --- a/runtime/lib/convert_patch.dart +++ b/runtime/lib/convert_patch.dart @@ -177,7 +177,6 @@ class _BuildJsonListener extends _JsonListener { } void arrayElement() { - List list = currentContainer; currentContainer.add(value); value = null; } diff --git a/runtime/lib/date_patch.dart b/runtime/lib/date_patch.dart index 7f811cf55eb..1899e0ca29a 100644 --- a/runtime/lib/date_patch.dart +++ b/runtime/lib/date_patch.dart @@ -57,7 +57,7 @@ class DateTime { @patch DateTime._now() : isUtc = false, - _value = _getCurrentMicros() {} + _value = _getCurrentMicros(); @patch String get timeZoneName { @@ -180,9 +180,7 @@ class DateTime { } get _parts { - if (__parts == null) { - __parts = _computeUpperPart(_localDateInUtcMicros); - } + __parts ??= _computeUpperPart(_localDateInUtcMicros); return __parts; } diff --git a/runtime/lib/developer.dart b/runtime/lib/developer.dart index 96577e159b7..12ad8b7c2e6 100644 --- a/runtime/lib/developer.dart +++ b/runtime/lib/developer.dart @@ -35,9 +35,7 @@ void log(String message, if (message is! String) { throw new ArgumentError.value(message, "message", "Must be a String"); } - if (time == null) { - time = new DateTime.now(); - } + time ??= new DateTime.now(); if (time is! DateTime) { throw new ArgumentError.value(time, "time", "Must be a DateTime"); } diff --git a/runtime/lib/function.dart b/runtime/lib/function.dart index 8a47f00cb36..ae3902a5cc4 100644 --- a/runtime/lib/function.dart +++ b/runtime/lib/function.dart @@ -9,9 +9,7 @@ class _Closure implements Function { bool operator ==(Object other) native "Closure_equals"; int get hashCode { - if (_hash == null) { - _hash = _computeHash(); - } + _hash ??= _computeHash(); return _hash; } diff --git a/runtime/lib/growable_array.dart b/runtime/lib/growable_array.dart index d23632fbf53..0dbe0083ad6 100644 --- a/runtime/lib/growable_array.dart +++ b/runtime/lib/growable_array.dart @@ -224,7 +224,6 @@ class _GrowableList extends ListBase { if (length == 1) return this[0]; if (length == 0) throw IterableElementError.noElement(); throw IterableElementError.tooMany(); - ; } // Shared array used as backing for new empty growable arrays. diff --git a/runtime/lib/isolate_patch.dart b/runtime/lib/isolate_patch.dart index 0767bb6b1c5..972d9af69ce 100644 --- a/runtime/lib/isolate_patch.dart +++ b/runtime/lib/isolate_patch.dart @@ -458,7 +458,7 @@ class Isolate { packageRootString, packageConfigString); return await _spawnCommon(readyPort); - } catch (e, st) { + } catch (e) { if (readyPort != null) { readyPort.close(); } @@ -632,7 +632,7 @@ class Isolate { static Uri _getCurrentRootUri() { try { return Uri.parse(_getCurrentRootUriStr()); - } catch (e, s) { + } catch (e) { return null; } } diff --git a/runtime/lib/lib_prefix.dart b/runtime/lib/lib_prefix.dart index 8b1fed1f6b4..c8959310550 100644 --- a/runtime/lib/lib_prefix.dart +++ b/runtime/lib/lib_prefix.dart @@ -54,7 +54,6 @@ _completeDeferredLoads() { // which have not completed, remember them for next time in // stillOutstandingLoadRequests. var stillOutstandingLoadRequests = new List(); - var completedLoadRequests = new List(); // Make a copy of the outstandingRequests because the call to _load below // may recursively trigger another call to |_completeDeferredLoads|, which diff --git a/runtime/lib/math_patch.dart b/runtime/lib/math_patch.dart index 73eb844ea0f..fb686743b25 100644 --- a/runtime/lib/math_patch.dart +++ b/runtime/lib/math_patch.dart @@ -245,7 +245,7 @@ class _Random implements Random { static const _POW2_27_D = 1.0 * (1 << 27); // Use a singleton Random object to get a new seed if no seed was passed. - static var _prng = new _Random._withState(_initialSeed()); + static final _prng = new _Random._withState(_initialSeed()); // This is a native to prevent 64-bit operations in Dart, which // fail with --throw_on_javascript_int_overflow. diff --git a/runtime/lib/string_patch.dart b/runtime/lib/string_patch.dart index fe749e4598b..103959b558c 100644 --- a/runtime/lib/string_patch.dart +++ b/runtime/lib/string_patch.dart @@ -124,7 +124,6 @@ abstract class _StringBase implements String { if (charCodes == null) throw new ArgumentError(charCodes); // TODO(srdjan): Also skip copying of wide typed arrays. final ccid = ClassID.getID(charCodes); - bool isOneByteString = false; if ((ccid != ClassID.cidArray) && (ccid != ClassID.cidGrowableObjectArray) && (ccid != ClassID.cidImmutableArray)) { @@ -139,9 +138,7 @@ abstract class _StringBase implements String { end = RangeError.checkValidRange(start, end, codeCount); final len = end - start; if (len == 0) return ""; - if (limit == null) { - limit = _scanCodeUnits(charCodes, start, end); - } + limit ??= _scanCodeUnits(charCodes, start, end); if (limit < 0) { throw new ArgumentError(charCodes); } @@ -368,7 +365,7 @@ abstract class _StringBase implements String { } String substring(int startIndex, [int endIndex]) { - if (endIndex == null) endIndex = this.length; + endIndex ??= this.length; if ((startIndex < 0) || (startIndex > this.length)) { throw new RangeError.value(startIndex); @@ -623,7 +620,6 @@ abstract class _StringBase implements String { int replacementLength = replacement.length; int startIndex = 0; if (replacementLength == 0) { - int count = 0; for (Match match in pattern.allMatches(this)) { length += _addReplaceSlice(matches, startIndex, match.start); startIndex = match.end; @@ -782,8 +778,8 @@ abstract class _StringBase implements String { if (pattern is! Pattern) { throw new ArgumentError("${pattern} is not a Pattern"); } - if (onMatch == null) onMatch = _matchString; - if (onNonMatch == null) onNonMatch = _stringIdentity; + onMatch ??= _matchString; + onNonMatch ??= _stringIdentity; if (pattern is String) { String stringPattern = pattern; if (stringPattern.isEmpty) { diff --git a/runtime/lib/timer_impl.dart b/runtime/lib/timer_impl.dart index 89cb6cd9966..01db53f1824 100644 --- a/runtime/lib/timer_impl.dart +++ b/runtime/lib/timer_impl.dart @@ -124,7 +124,7 @@ class _Timer implements Timer { // Timers are ordered by wakeup time. Timers with a timeout value of > 0 do // end up on the TimerHeap. Timers with a timeout of 0 are queued in a list. - static _TimerHeap _heap = new _TimerHeap(); + static final _heap = new _TimerHeap(); static _Timer _firstZeroTimer; static _Timer _lastZeroTimer; diff --git a/runtime/lib/timer_patch.dart b/runtime/lib/timer_patch.dart index 3104ecbdd53..88940ff0348 100644 --- a/runtime/lib/timer_patch.dart +++ b/runtime/lib/timer_patch.dart @@ -26,9 +26,7 @@ class Timer { static Timer _createPeriodicTimer( Duration duration, void callback(Timer timer)) { // TODO(iposva): Remove _TimerFactory and use VMLibraryHooks exclusively. - if (_TimerFactory._factory == null) { - _TimerFactory._factory = VMLibraryHooks.timerFactory; - } + _TimerFactory._factory ??= VMLibraryHooks.timerFactory; if (_TimerFactory._factory == null) { throw new UnsupportedError("Timer interface not supported."); } diff --git a/runtime/lib/typed_data_patch.dart b/runtime/lib/typed_data_patch.dart index 7387c96c762..9c5f7d6e123 100644 --- a/runtime/lib/typed_data_patch.dart +++ b/runtime/lib/typed_data_patch.dart @@ -165,7 +165,7 @@ abstract class _IntListMixin implements List { } void shuffle([Random random]) { - if (random == null) random = new Random(); + random ??= new Random(); var i = this.length; while (i > 1) { int pos = random.nextInt(i); @@ -282,7 +282,6 @@ abstract class _IntListMixin implements List { int reduce(int combine(int value, int element)) { var len = this.length; if (len == 0) throw IterableElementError.noElement(); - var i = 0; var value = this[0]; for (var i = 1; i < len; ++i) { value = combine(value, this[i]); @@ -330,7 +329,6 @@ abstract class _IntListMixin implements List { } int lastWhere(bool test(int element), {int orElse()}) { - var result = null; var len = this.length; for (var i = len - 1; i >= 0; --i) { var element = this[i]; @@ -518,7 +516,7 @@ abstract class _DoubleListMixin implements List { } void shuffle([Random random]) { - if (random == null) random = new Random(); + random ??= new Random(); var i = this.length; while (i > 1) { int pos = random.nextInt(i); @@ -637,7 +635,6 @@ abstract class _DoubleListMixin implements List { double reduce(double combine(double value, double element)) { var len = this.length; if (len == 0) throw IterableElementError.noElement(); - var i = 0; var value = this[0]; for (var i = 1; i < len; ++i) { value = combine(value, this[i]); @@ -686,7 +683,6 @@ abstract class _DoubleListMixin implements List { } double lastWhere(bool test(double element), {double orElse()}) { - var result = null; var len = this.length; for (var i = len - 1; i >= 0; --i) { var element = this[i]; @@ -874,7 +870,7 @@ abstract class _Float32x4ListMixin implements List { } void shuffle([Random random]) { - if (random == null) random = new Random(); + random ??= new Random(); var i = this.length; while (i > 1) { int pos = random.nextInt(i); @@ -994,7 +990,6 @@ abstract class _Float32x4ListMixin implements List { Float32x4 reduce(Float32x4 combine(Float32x4 value, Float32x4 element)) { var len = this.length; if (len == 0) throw IterableElementError.noElement(); - var i = 0; var value = this[0]; for (var i = 1; i < len; ++i) { value = combine(value, this[i]); @@ -1043,7 +1038,6 @@ abstract class _Float32x4ListMixin implements List { } Float32x4 lastWhere(bool test(Float32x4 element), {Float32x4 orElse()}) { - var result = null; var len = this.length; for (var i = len - 1; i >= 0; --i) { var element = this[i]; @@ -1234,7 +1228,7 @@ abstract class _Int32x4ListMixin implements List { } void shuffle([Random random]) { - if (random == null) random = new Random(); + random ??= new Random(); var i = this.length; while (i > 1) { int pos = random.nextInt(i); @@ -1353,7 +1347,6 @@ abstract class _Int32x4ListMixin implements List { Int32x4 reduce(Int32x4 combine(Int32x4 value, Int32x4 element)) { var len = this.length; if (len == 0) throw IterableElementError.noElement(); - var i = 0; var value = this[0]; for (var i = 1; i < len; ++i) { value = combine(value, this[i]); @@ -1402,7 +1395,6 @@ abstract class _Int32x4ListMixin implements List { } Int32x4 lastWhere(bool test(Int32x4 element), {Int32x4 orElse()}) { - var result = null; var len = this.length; for (var i = len - 1; i >= 0; --i) { var element = this[i]; @@ -1593,7 +1585,7 @@ abstract class _Float64x2ListMixin implements List { } void shuffle([Random random]) { - if (random == null) random = new Random(); + random ??= new Random(); var i = this.length; while (i > 1) { int pos = random.nextInt(i); @@ -1713,7 +1705,6 @@ abstract class _Float64x2ListMixin implements List { Float64x2 reduce(Float64x2 combine(Float64x2 value, Float64x2 element)) { var len = this.length; if (len == 0) throw IterableElementError.noElement(); - var i = 0; var value = this[0]; for (var i = 1; i < len; ++i) { value = combine(value, this[i]); @@ -1762,7 +1753,6 @@ abstract class _Float64x2ListMixin implements List { } Float64x2 lastWhere(bool test(Float64x2 element), {Float64x2 orElse()}) { - var result = null; var len = this.length; for (var i = len - 1; i >= 0; --i) { var element = this[i]; @@ -1913,118 +1903,88 @@ class _ByteBuffer implements ByteBuffer { (other is _ByteBuffer) && identical(_data, other._data); ByteData asByteData([int offsetInBytes = 0, int length]) { - if (length == null) { - length = this.lengthInBytes - offsetInBytes; - } + length ??= this.lengthInBytes - offsetInBytes; return new _ByteDataView(this._data, offsetInBytes, length); } Int8List asInt8List([int offsetInBytes = 0, int length]) { - if (length == null) { - length = this.lengthInBytes - offsetInBytes; - } + length ??= this.lengthInBytes - offsetInBytes; return new _Int8ArrayView(this, offsetInBytes, length); } Uint8List asUint8List([int offsetInBytes = 0, int length]) { - if (length == null) { - length = this.lengthInBytes - offsetInBytes; - } + length ??= this.lengthInBytes - offsetInBytes; return new _Uint8ArrayView(this, offsetInBytes, length); } Uint8ClampedList asUint8ClampedList([int offsetInBytes = 0, int length]) { - if (length == null) { - length = this.lengthInBytes - offsetInBytes; - } + length ??= this.lengthInBytes - offsetInBytes; return new _Uint8ClampedArrayView(this, offsetInBytes, length); } Int16List asInt16List([int offsetInBytes = 0, int length]) { - if (length == null) { - length = - (this.lengthInBytes - offsetInBytes) ~/ Int16List.bytesPerElement; - } + length ??= + (this.lengthInBytes - offsetInBytes) ~/ Int16List.bytesPerElement; return new _Int16ArrayView(this, offsetInBytes, length); } Uint16List asUint16List([int offsetInBytes = 0, int length]) { - if (length == null) { - length = - (this.lengthInBytes - offsetInBytes) ~/ Uint16List.bytesPerElement; - } + length ??= + (this.lengthInBytes - offsetInBytes) ~/ Uint16List.bytesPerElement; return new _Uint16ArrayView(this, offsetInBytes, length); } Int32List asInt32List([int offsetInBytes = 0, int length]) { - if (length == null) { - length = - (this.lengthInBytes - offsetInBytes) ~/ Int32List.bytesPerElement; - } + length ??= + (this.lengthInBytes - offsetInBytes) ~/ Int32List.bytesPerElement; return new _Int32ArrayView(this, offsetInBytes, length); } Uint32List asUint32List([int offsetInBytes = 0, int length]) { - if (length == null) { - length = - (this.lengthInBytes - offsetInBytes) ~/ Uint32List.bytesPerElement; - } + length ??= + (this.lengthInBytes - offsetInBytes) ~/ Uint32List.bytesPerElement; return new _Uint32ArrayView(this, offsetInBytes, length); } Int64List asInt64List([int offsetInBytes = 0, int length]) { - if (length == null) { - length = - (this.lengthInBytes - offsetInBytes) ~/ Int64List.bytesPerElement; - } + length ??= + (this.lengthInBytes - offsetInBytes) ~/ Int64List.bytesPerElement; return new _Int64ArrayView(this, offsetInBytes, length); } Uint64List asUint64List([int offsetInBytes = 0, int length]) { - if (length == null) { - length = - (this.lengthInBytes - offsetInBytes) ~/ Uint64List.bytesPerElement; - } + length ??= + (this.lengthInBytes - offsetInBytes) ~/ Uint64List.bytesPerElement; return new _Uint64ArrayView(this, offsetInBytes, length); } Float32List asFloat32List([int offsetInBytes = 0, int length]) { - if (length == null) { - length = - (this.lengthInBytes - offsetInBytes) ~/ Float32List.bytesPerElement; - } + length ??= + (this.lengthInBytes - offsetInBytes) ~/ Float32List.bytesPerElement; return new _Float32ArrayView(this, offsetInBytes, length); } Float64List asFloat64List([int offsetInBytes = 0, int length]) { - if (length == null) { - length = - (this.lengthInBytes - offsetInBytes) ~/ Float64List.bytesPerElement; - } + length ??= + (this.lengthInBytes - offsetInBytes) ~/ Float64List.bytesPerElement; return new _Float64ArrayView(this, offsetInBytes, length); } Float32x4List asFloat32x4List([int offsetInBytes = 0, int length]) { - if (length == null) { - length = - (this.lengthInBytes - offsetInBytes) ~/ Float32x4List.bytesPerElement; - } + length ??= + (this.lengthInBytes - offsetInBytes) ~/ Float32x4List.bytesPerElement; return new _Float32x4ArrayView(this, offsetInBytes, length); } Int32x4List asInt32x4List([int offsetInBytes = 0, int length]) { - if (length == null) { - length = - (this.lengthInBytes - offsetInBytes) ~/ Int32x4List.bytesPerElement; - } + length ??= + (this.lengthInBytes - offsetInBytes) ~/ Int32x4List.bytesPerElement; return new _Int32x4ArrayView(this, offsetInBytes, length); } Float64x2List asFloat64x2List([int offsetInBytes = 0, int length]) { - if (length == null) { - length = - (this.lengthInBytes - offsetInBytes) ~/ Float64x2List.bytesPerElement; - } + length ??= + (this.lengthInBytes - offsetInBytes) ~/ Float64x2List.bytesPerElement; return new _Float64x2ArrayView(this, offsetInBytes, length); } } @@ -3572,7 +3532,7 @@ abstract class _TypedListView extends _TypedListBase implements TypedData { _TypedListView(_ByteBuffer _buffer, int _offset, int _length) : _typedData = _buffer._data, offsetInBytes = _offset, - length = _length {} + length = _length; // Method(s) implementing the TypedData interface.