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

Unified Diff: runtime/lib/bigint.dart

Issue 1058523003: Move zero-ing code out of shift intrinsic (not needed if destination is new). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/method_recognizer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/bigint.dart
===================================================================
--- runtime/lib/bigint.dart (revision 44834)
+++ runtime/lib/bigint.dart (working copy)
@@ -271,10 +271,6 @@
c = (d & bm) << bs;
}
r_digits[ds] = c;
- i = ds;
- while (--i >= 0) {
- r_digits[i] = 0;
- }
}
// Return this << n.
@@ -302,6 +298,10 @@
var r_used = x_used + ds + 1;
assert(r_digits.length >= r_used + 2 + (r_used & 1)); // +2 for 64-bit.
_lsh(x_digits, x_used, n, r_digits);
+ var i = ds;
+ while (--i >= 0) {
+ r_digits[i] = 0;
+ }
if (r_digits[r_used - 1] == 0) {
r_used--; // Clamp result.
} else if (r_used.isOdd) {
« no previous file with comments | « no previous file | runtime/vm/method_recognizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698