Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(454)

Side by Side Diff: runtime/lib/double.dart

Issue 473673004: Avoid UTF-8 decoding in num.toString. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/lib/corelib_sources.gypi ('k') | runtime/lib/integers.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 extends _Num implements double {
6 factory _Double.fromInteger(int value) 6 factory _Double.fromInteger(int value)
7 native "Double_doubleFromInteger"; 7 native "Double_doubleFromInteger";
8 8
9 Type get runtimeType => double; 9 Type get runtimeType => double;
10 10
11 int get _identityHashCode { 11 int get _identityHashCode {
12 if (isNaN || isInfinite) return 0; 12 if (isNaN || isInfinite) return 0;
13 return toInt(); 13 return toInt();
14 } 14 }
15 double operator +(num other) { 15 double operator +(num other) {
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 return EQUAL; 236 return EQUAL;
237 } 237 }
238 } else if (isNaN) { 238 } else if (isNaN) {
239 return other.isNaN ? EQUAL : GREATER; 239 return other.isNaN ? EQUAL : GREATER;
240 } else { 240 } else {
241 // Other is NaN. 241 // Other is NaN.
242 return LESS; 242 return LESS;
243 } 243 }
244 } 244 }
245 } 245 }
OLDNEW
« no previous file with comments | « runtime/lib/corelib_sources.gypi ('k') | runtime/lib/integers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698