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.transferable(int length) { | 10 /* patch */ factory Int8List.transferable(int length) { |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 var len = this.length; | 226 var len = this.length; |
227 for (var i = 0; i < len; i++) { | 227 for (var i = 0; i < len; i++) { |
228 f(this[i]); | 228 f(this[i]); |
229 } | 229 } |
230 } | 230 } |
231 | 231 |
232 Iterable map(f(int element)) { | 232 Iterable map(f(int element)) { |
233 return IterableMixinWorkaround.mapList(this, f); | 233 return IterableMixinWorkaround.mapList(this, f); |
234 } | 234 } |
235 | 235 |
| 236 List mappedBy(f(int element)) { |
| 237 return IterableMixinWorkaround.mappedByList(this, f); |
| 238 } |
| 239 |
236 String join([String separator]) { | 240 String join([String separator]) { |
237 return IterableMixinWorkaround.join(this, separator); | 241 return IterableMixinWorkaround.join(this, separator); |
238 } | 242 } |
239 | 243 |
240 dynamic reduce(dynamic initialValue, | 244 dynamic reduce(dynamic initialValue, |
241 dynamic combine(dynamic initialValue, element)) { | 245 dynamic combine(dynamic initialValue, element)) { |
242 return IterableMixinWorkaround.reduce(this, initialValue, combine); | 246 return IterableMixinWorkaround.reduce(this, initialValue, combine); |
243 } | 247 } |
244 | 248 |
245 Collection where(bool f(int element)) { | 249 Collection where(bool f(int element)) { |
(...skipping 2427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2673 ByteArray asByteArray([int start = 0, int length]) { | 2677 ByteArray asByteArray([int start = 0, int length]) { |
2674 if (length == null) { | 2678 if (length == null) { |
2675 length = this.lengthInBytes(); | 2679 length = this.lengthInBytes(); |
2676 } | 2680 } |
2677 _rangeCheck(this.length, start, length); | 2681 _rangeCheck(this.length, start, length); |
2678 return _array.subByteArray(_offset + start, length); | 2682 return _array.subByteArray(_offset + start, length); |
2679 } | 2683 } |
2680 | 2684 |
2681 static const int _BYTES_PER_ELEMENT = 8; | 2685 static const int _BYTES_PER_ELEMENT = 8; |
2682 } | 2686 } |
OLD | NEW |