OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 // Copyright 2009 The Go Authors. All rights reserved. | 5 // Copyright 2009 The Go Authors. All rights reserved. |
6 // Use of this source code is governed by a BSD-style | 6 // Use of this source code is governed by a BSD-style |
7 // license that can be found in the LICENSE file. | 7 // license that can be found in the LICENSE file. |
8 | 8 |
9 /* | 9 /* |
10 * Copyright (c) 2003-2005 Tom Wu | 10 * Copyright (c) 2003-2005 Tom Wu |
(...skipping 1318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1329 if (bx >= _DIGIT_BITS) { | 1329 if (bx >= _DIGIT_BITS) { |
1330 bx -= _DIGIT_BITS; | 1330 bx -= _DIGIT_BITS; |
1331 dx++; | 1331 dx++; |
1332 } | 1332 } |
1333 } | 1333 } |
1334 str._setAt(--cx, _IntegerImplementation._digits.codeUnitAt(ch)); | 1334 str._setAt(--cx, _IntegerImplementation._digits.codeUnitAt(ch)); |
1335 } while (cx > firstcx); | 1335 } while (cx > firstcx); |
1336 return str; | 1336 return str; |
1337 } | 1337 } |
1338 | 1338 |
| 1339 int _bitAndFromSmi(int other) => _bitAndFromInteger(other); |
| 1340 |
1339 int _bitAndFromInteger(int other) { | 1341 int _bitAndFromInteger(int other) { |
1340 return other._toBigint()._and(this)._toValidInt(); | 1342 return other._toBigint()._and(this)._toValidInt(); |
1341 } | 1343 } |
1342 int _bitOrFromInteger(int other) { | 1344 int _bitOrFromInteger(int other) { |
1343 return other._toBigint()._or(this)._toValidInt(); | 1345 return other._toBigint()._or(this)._toValidInt(); |
1344 } | 1346 } |
1345 int _bitXorFromInteger(int other) { | 1347 int _bitXorFromInteger(int other) { |
1346 return other._toBigint()._xor(this)._toValidInt(); | 1348 return other._toBigint()._xor(this)._toValidInt(); |
1347 } | 1349 } |
1348 int _addFromInteger(int other) { | 1350 int _addFromInteger(int other) { |
(...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2080 | 2082 |
2081 int _mul(Uint32List x_digits, int x_used, | 2083 int _mul(Uint32List x_digits, int x_used, |
2082 Uint32List y_digits, int y_used, | 2084 Uint32List y_digits, int y_used, |
2083 Uint32List r_digits) { | 2085 Uint32List r_digits) { |
2084 var r_used = _Bigint._mulDigits(x_digits, x_used, | 2086 var r_used = _Bigint._mulDigits(x_digits, x_used, |
2085 y_digits, y_used, | 2087 y_digits, y_used, |
2086 r_digits); | 2088 r_digits); |
2087 return _reduce(r_digits, r_used); | 2089 return _reduce(r_digits, r_used); |
2088 } | 2090 } |
2089 } | 2091 } |
OLD | NEW |