Chromium Code Reviews| Index: runtime/lib/double.dart |
| diff --git a/runtime/lib/double.dart b/runtime/lib/double.dart |
| index cbf955dc81a4d791d6cfd36ea6e780aefc2236a7..71fddca77c0c44e14ac7f5da7a434f27d0be24d5 100644 |
| --- a/runtime/lib/double.dart |
| +++ b/runtime/lib/double.dart |
| @@ -8,10 +8,10 @@ class _Double implements double { |
| Type get runtimeType => double; |
| - int get _identityHashCode { |
| - if (isNaN || isInfinite) return 0; |
| - return toInt(); |
| - } |
| + // Code is replicated to avoid unnecessary dispath overhead. |
|
sra1
2016/07/08 21:35:59
They could both call a common static method.
Since
bakster
2016/07/08 22:04:22
I'll add a todo in the code for now. A static only
|
| + int get hashCode => (isNaN || isInfinite) ? 0 : toInt(); |
| + int get _identityHashCode => (isNaN || isInfinite) ? 0 : toInt(); |
| + |
| double operator +(num other) { |
| return _add(other.toDouble()); |
| } |