OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 import "dart:_internal"; | 5 import "dart:_internal" hide Symbol; |
6 import "dart:collection" show ListBase; | 6 import "dart:collection" show ListBase; |
7 import 'dart:math' show Random; | 7 import 'dart:math' show Random; |
8 | 8 |
9 @patch | 9 @patch |
10 class ByteData implements TypedData { | 10 class ByteData implements TypedData { |
11 @patch | 11 @patch |
12 factory ByteData(int length) { | 12 factory ByteData(int length) { |
13 var list = new Uint8List(length); | 13 var list = new Uint8List(length); |
14 return new _ByteDataView(list, 0, length); | 14 return new _ByteDataView(list, 0, length); |
15 } | 15 } |
(...skipping 3045 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3061 'BYTES_PER_ELEMENT ($alignment)'); | 3061 'BYTES_PER_ELEMENT ($alignment)'); |
3062 } | 3062 } |
3063 } | 3063 } |
3064 | 3064 |
3065 int _defaultIfNull(object, value) { | 3065 int _defaultIfNull(object, value) { |
3066 if (object == null) { | 3066 if (object == null) { |
3067 return value; | 3067 return value; |
3068 } | 3068 } |
3069 return object; | 3069 return object; |
3070 } | 3070 } |
OLD | NEW |