| 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 int get hashCode { | 8 int get _identityHashCode { |
| 9 if (isNaN || isInfinite) return 0; | 9 if (isNaN || isInfinite) return 0; |
| 10 return toInt(); | 10 return toInt(); |
| 11 } | 11 } |
| 12 double operator +(num other) { | 12 double operator +(num other) { |
| 13 return _add(other.toDouble()); | 13 return _add(other.toDouble()); |
| 14 } | 14 } |
| 15 double _add(double other) native "Double_add"; | 15 double _add(double other) native "Double_add"; |
| 16 | 16 |
| 17 double operator -(num other) { | 17 double operator -(num other) { |
| 18 return _sub(other.toDouble()); | 18 return _sub(other.toDouble()); |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 return EQUAL; | 226 return EQUAL; |
| 227 } | 227 } |
| 228 } else if (isNaN) { | 228 } else if (isNaN) { |
| 229 return other.isNaN ? EQUAL : GREATER; | 229 return other.isNaN ? EQUAL : GREATER; |
| 230 } else { | 230 } else { |
| 231 // Other is NaN. | 231 // Other is NaN. |
| 232 return LESS; | 232 return LESS; |
| 233 } | 233 } |
| 234 } | 234 } |
| 235 } | 235 } |
| OLD | NEW |