| 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 // patch classes for Int8List ..... Float64List and ByteData implementations. | 5 // patch classes for Int8List ..... Float64List and ByteData implementations. |
| 6 | 6 |
| 7 patch class Int8List { | 7 patch class Int8List { |
| 8 /* patch */ factory Int8List(int length) { | 8 /* patch */ factory Int8List(int length) { |
| 9 return new _Int8Array(length); | 9 return new _Int8Array(length); |
| 10 } | 10 } |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 [int offsetInBytes = 0, int length]) { | 233 [int offsetInBytes = 0, int length]) { |
| 234 return new _Float32x4ArrayView(buffer, offsetInBytes, length); | 234 return new _Float32x4ArrayView(buffer, offsetInBytes, length); |
| 235 } | 235 } |
| 236 } | 236 } |
| 237 | 237 |
| 238 | 238 |
| 239 patch class Float32x4 { | 239 patch class Float32x4 { |
| 240 /* patch */ factory Float32x4(double x, double y, double z, double w) { | 240 /* patch */ factory Float32x4(double x, double y, double z, double w) { |
| 241 return new _Float32x4(x, y, z, w); | 241 return new _Float32x4(x, y, z, w); |
| 242 } | 242 } |
| 243 /* patch */ factory Float32x4.splat(double v) { |
| 244 return new _Float32x4.splat(v); |
| 245 } |
| 243 /* patch */ factory Float32x4.zero() { | 246 /* patch */ factory Float32x4.zero() { |
| 244 return new _Float32x4.zero(); | 247 return new _Float32x4.zero(); |
| 245 } | 248 } |
| 246 } | 249 } |
| 247 | 250 |
| 248 | 251 |
| 249 patch class Uint32x4 { | 252 patch class Uint32x4 { |
| 250 /* patch */ factory Uint32x4(int x, int y, int z, int w) { | 253 /* patch */ factory Uint32x4(int x, int y, int z, int w) { |
| 251 return new _Uint32x4(x, y, z, w); | 254 return new _Uint32x4(x, y, z, w); |
| 252 } | 255 } |
| (...skipping 1770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2023 } | 2026 } |
| 2024 | 2027 |
| 2025 static _ExternalFloat32x4Array _new(int length) native | 2028 static _ExternalFloat32x4Array _new(int length) native |
| 2026 "ExternalTypedData_Float32x4Array_new"; | 2029 "ExternalTypedData_Float32x4Array_new"; |
| 2027 } | 2030 } |
| 2028 | 2031 |
| 2029 | 2032 |
| 2030 class _Float32x4 implements Float32x4 { | 2033 class _Float32x4 implements Float32x4 { |
| 2031 factory _Float32x4(double x, double y, double z, double w) | 2034 factory _Float32x4(double x, double y, double z, double w) |
| 2032 native "Float32x4_fromDoubles"; | 2035 native "Float32x4_fromDoubles"; |
| 2036 factory _Float32x4.splat(double v) native "Float32x4_splat"; |
| 2033 factory _Float32x4.zero() native "Float32x4_zero"; | 2037 factory _Float32x4.zero() native "Float32x4_zero"; |
| 2034 Float32x4 operator +(Float32x4 other) { | 2038 Float32x4 operator +(Float32x4 other) { |
| 2035 return _add(other); | 2039 return _add(other); |
| 2036 } | 2040 } |
| 2037 Float32x4 _add(Float32x4 other) native "Float32x4_add"; | 2041 Float32x4 _add(Float32x4 other) native "Float32x4_add"; |
| 2038 Float32x4 operator -() { | 2042 Float32x4 operator -() { |
| 2039 return _negate(); | 2043 return _negate(); |
| 2040 } | 2044 } |
| 2041 Float32x4 _negate() native "Float32x4_negate"; | 2045 Float32x4 _negate() native "Float32x4_negate"; |
| 2042 Float32x4 operator -(Float32x4 other) { | 2046 Float32x4 operator -(Float32x4 other) { |
| (...skipping 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3197 return value; | 3201 return value; |
| 3198 } | 3202 } |
| 3199 return object; | 3203 return object; |
| 3200 } | 3204 } |
| 3201 | 3205 |
| 3202 | 3206 |
| 3203 void _throwRangeError(int index, int length) { | 3207 void _throwRangeError(int index, int length) { |
| 3204 String message = "$index must be in the range [0..$length)"; | 3208 String message = "$index must be in the range [0..$length)"; |
| 3205 throw new RangeError(message); | 3209 throw new RangeError(message); |
| 3206 } | 3210 } |
| OLD | NEW |