| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 patch class Int8List { | 5 patch class Int8List { |
| 6 /* patch */ factory Int8List(int length) { | 6 /* patch */ factory Int8List(int length) { |
| 7 return new _Int8Array(length); | 7 return new _Int8Array(length); |
| 8 } | 8 } |
| 9 | 9 |
| 10 /* patch */ factory Int8List.view(ByteArray array, | 10 /* patch */ factory Int8List.view(ByteArray array, |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 void clear() { | 199 void clear() { |
| 200 throw new UnsupportedError( | 200 throw new UnsupportedError( |
| 201 "Cannot remove from a non-extendable array"); | 201 "Cannot remove from a non-extendable array"); |
| 202 } | 202 } |
| 203 | 203 |
| 204 int removeLast() { | 204 int removeLast() { |
| 205 throw new UnsupportedError( | 205 throw new UnsupportedError( |
| 206 "Cannot remove from a non-extendable array"); | 206 "Cannot remove from a non-extendable array"); |
| 207 } | 207 } |
| 208 | 208 |
| 209 last() { | 209 get last { |
| 210 return this[length - 1]; | 210 return this[length - 1]; |
| 211 } | 211 } |
| 212 | 212 |
| 213 void removeRange(int start, int length) { | 213 void removeRange(int start, int length) { |
| 214 throw new UnsupportedError( | 214 throw new UnsupportedError( |
| 215 "Cannot remove from a non-extendable array"); | 215 "Cannot remove from a non-extendable array"); |
| 216 } | 216 } |
| 217 | 217 |
| 218 void insertRange(int start, int length, [initialValue]) { | 218 void insertRange(int start, int length, [initialValue]) { |
| 219 throw new UnsupportedError( | 219 throw new UnsupportedError( |
| (...skipping 1457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1677 void clear() { | 1677 void clear() { |
| 1678 throw new UnsupportedError( | 1678 throw new UnsupportedError( |
| 1679 "Cannot remove from a non-extendable array"); | 1679 "Cannot remove from a non-extendable array"); |
| 1680 } | 1680 } |
| 1681 | 1681 |
| 1682 int removeLast() { | 1682 int removeLast() { |
| 1683 throw new UnsupportedError( | 1683 throw new UnsupportedError( |
| 1684 "Cannot remove from a non-extendable array"); | 1684 "Cannot remove from a non-extendable array"); |
| 1685 } | 1685 } |
| 1686 | 1686 |
| 1687 last() { | 1687 get last { |
| 1688 return this[length - 1]; | 1688 return this[length - 1]; |
| 1689 } | 1689 } |
| 1690 | 1690 |
| 1691 void removeRange(int start, int length) { | 1691 void removeRange(int start, int length) { |
| 1692 throw new UnsupportedError( | 1692 throw new UnsupportedError( |
| 1693 "Cannot remove from a non-extendable array"); | 1693 "Cannot remove from a non-extendable array"); |
| 1694 } | 1694 } |
| 1695 | 1695 |
| 1696 void insertRange(int start, int length, [initialValue]) { | 1696 void insertRange(int start, int length, [initialValue]) { |
| 1697 throw new UnsupportedError( | 1697 throw new UnsupportedError( |
| (...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2411 } | 2411 } |
| 2412 _rangeCheck(this.length, start, length); | 2412 _rangeCheck(this.length, start, length); |
| 2413 return _array.subByteArray(_offset + start, length); | 2413 return _array.subByteArray(_offset + start, length); |
| 2414 } | 2414 } |
| 2415 | 2415 |
| 2416 static const int _BYTES_PER_ELEMENT = 8; | 2416 static const int _BYTES_PER_ELEMENT = 8; |
| 2417 final ByteArray _array; | 2417 final ByteArray _array; |
| 2418 final int _offset; | 2418 final int _offset; |
| 2419 final int _length; | 2419 final int _length; |
| 2420 } | 2420 } |
| OLD | NEW |