R=mstarzinger@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/
13454019
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14167
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
void Bignum::SubtractTimes(const Bignum& other, int factor) {
+#ifdef DEBUG
+ Bignum a, b;
+ a.AssignBignum(*this);
+ b.AssignBignum(other);
+ b.MultiplyByUInt32(factor);
+ a.SubtractBignum(b);
+#endif
ASSERT(exponent_ <= other.exponent_);
if (factor < 3) {
for (int i = 0; i < factor; ++i) {
Chunk difference = bigits_[i] - borrow;
bigits_[i] = difference & kBigitMask;
borrow = difference >> (kChunkSize - 1);
- ++i;
}
Clamp();
+ ASSERT(Bignum::Equal(a, *this));
}