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

Side by Side Diff: sdk/lib/core/int.dart

Issue 851763002: Revert modPow introduction since dart2js does not like it. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 11 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/integers.dart ('k') | no next file » | 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 part of dart.core; 5 part of dart.core;
6 6
7 /** 7 /**
8 * An arbitrarily large integer. 8 * An arbitrarily large integer.
9 * 9 *
10 * **Note:** When compiling to JavaScript, integers are 10 * **Note:** When compiling to JavaScript, integers are
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 * Shift the bits of this integer to the right by [shiftAmount]. 96 * Shift the bits of this integer to the right by [shiftAmount].
97 * 97 *
98 * Shifting to the right makes the number smaller and drops the least 98 * Shifting to the right makes the number smaller and drops the least
99 * significant bits, effectively doing an integer division by 99 * significant bits, effectively doing an integer division by
100 *`pow(2, shiftIndex)`. 100 *`pow(2, shiftIndex)`.
101 * 101 *
102 * It is an error of [shiftAmount] is negative. 102 * It is an error of [shiftAmount] is negative.
103 */ 103 */
104 int operator >>(int shiftAmount); 104 int operator >>(int shiftAmount);
105 105
106 /** Returns this integer to the power of [exponent] modulo [modulus]. */
107 int modPow(int exponent, int modulus);
108
109 /** Returns true if and only if this integer is even. */ 106 /** Returns true if and only if this integer is even. */
110 bool get isEven; 107 bool get isEven;
111 108
112 /** Returns true if and only if this integer is odd. */ 109 /** Returns true if and only if this integer is odd. */
113 bool get isOdd; 110 bool get isOdd;
114 111
115 /** 112 /**
116 * Returns the minimum number of bits required to store this integer. 113 * Returns the minimum number of bits required to store this integer.
117 * 114 *
118 * The number of bits excludes the sign bit, which gives the natural length 115 * The number of bits excludes the sign bit, which gives the natural length
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 * value is used instead. If no [onError] is provided, a [FormatException] 269 * value is used instead. If no [onError] is provided, a [FormatException]
273 * is thrown. 270 * is thrown.
274 * 271 *
275 * The [onError] function is only invoked if [source] is a [String]. It is 272 * The [onError] function is only invoked if [source] is a [String]. It is
276 * not invoked if the [source] is, for example, `null`. 273 * not invoked if the [source] is, for example, `null`.
277 */ 274 */
278 external static int parse(String source, 275 external static int parse(String source,
279 { int radix, 276 { int radix,
280 int onError(String source) }); 277 int onError(String source) });
281 } 278 }
OLDNEW
« no previous file with comments | « runtime/lib/integers.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698