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

Side by Side Diff: runtime/lib/integers.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/double.dart ('k') | runtime/lib/num.cc » ('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 // TODO(srdjan): fix limitations. 5 // TODO(srdjan): fix limitations.
6 // - shift amount must be a Smi. 6 // - shift amount must be a Smi.
7 class _IntegerImplementation { 7 class _IntegerImplementation extends _Num {
8 factory _IntegerImplementation._uninstantiable() { 8 factory _IntegerImplementation._uninstantiable() {
9 throw new UnsupportedError( 9 throw new UnsupportedError(
10 "_IntegerImplementation can only be allocated by the VM"); 10 "_IntegerImplementation can only be allocated by the VM");
11 } 11 }
12 12
13 Type get runtimeType => int; 13 Type get runtimeType => int;
14 14
15 num operator +(num other) { 15 num operator +(num other) {
16 return other._addFromInteger(this); 16 return other._addFromInteger(this);
17 } 17 }
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 } else { 467 } else {
468 return 0; 468 return 0;
469 } 469 }
470 } 470 }
471 int _shlFromInt(int other) native "Bigint_shlFromInt"; 471 int _shlFromInt(int other) native "Bigint_shlFromInt";
472 472
473 int pow(int exponent) { 473 int pow(int exponent) {
474 throw "Bigint.pow not implemented"; 474 throw "Bigint.pow not implemented";
475 } 475 }
476 } 476 }
OLDNEW
« no previous file with comments | « runtime/lib/double.dart ('k') | runtime/lib/num.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698