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

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

Issue 1913663002: vm: Generate 'and' instruction for Smi values. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: xxx Created 4 years, 6 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
« no previous file with comments | « no previous file | runtime/lib/integers.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) 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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | runtime/lib/integers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698