| 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 class _Double implements double { | 5 class _Double implements double { |
| 6 factory _Double.fromInteger(int value) | 6 factory _Double.fromInteger(int value) |
| 7 native "Double_doubleFromInteger"; | 7 native "Double_doubleFromInteger"; |
| 8 |
| 9 Type get runtimeType => double; |
| 10 |
| 8 int get _identityHashCode { | 11 int get _identityHashCode { |
| 9 if (isNaN || isInfinite) return 0; | 12 if (isNaN || isInfinite) return 0; |
| 10 return toInt(); | 13 return toInt(); |
| 11 } | 14 } |
| 12 double operator +(num other) { | 15 double operator +(num other) { |
| 13 return _add(other.toDouble()); | 16 return _add(other.toDouble()); |
| 14 } | 17 } |
| 15 double _add(double other) native "Double_add"; | 18 double _add(double other) native "Double_add"; |
| 16 | 19 |
| 17 double operator -(num other) { | 20 double operator -(num other) { |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 return EQUAL; | 229 return EQUAL; |
| 227 } | 230 } |
| 228 } else if (isNaN) { | 231 } else if (isNaN) { |
| 229 return other.isNaN ? EQUAL : GREATER; | 232 return other.isNaN ? EQUAL : GREATER; |
| 230 } else { | 233 } else { |
| 231 // Other is NaN. | 234 // Other is NaN. |
| 232 return LESS; | 235 return LESS; |
| 233 } | 236 } |
| 234 } | 237 } |
| 235 } | 238 } |
| OLD | NEW |