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

Unified Diff: runtime/vm/bigint_operations.cc

Issue 9959095: Rename variables in Bigint file. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/bigint_operations.cc
diff --git a/runtime/vm/bigint_operations.cc b/runtime/vm/bigint_operations.cc
index cbc88a9a19a8c6dce4ca5e1d5048e85163953a9e..d453a2a4d68041a129cf41cd5247abe9250baf88 100644
--- a/runtime/vm/bigint_operations.cc
+++ b/runtime/vm/bigint_operations.cc
@@ -355,12 +355,12 @@ const char* BigintOperations::ToDecimalCString(
// We divide the input into pieces of ~27 bits which can be efficiently
// handled.
- const intptr_t kDivisorValue = 100000000;
- const int kPowerOfTen = 8;
- ASSERT(pow(10.0, kPowerOfTen) == kDivisorValue);
- ASSERT(static_cast<Chunk>(kDivisorValue) < kDigitMaxValue);
- ASSERT(Smi::IsValid(kDivisorValue));
- const Bigint& divisor = Bigint::Handle(NewFromInt64(kDivisorValue));
+ const intptr_t kChunkDivisor = 100000000;
+ const int kChunkDigits = 8;
+ ASSERT(pow(10.0, kChunkDigits) == kChunkDivisor);
+ ASSERT(static_cast<Chunk>(kChunkDivisor) < kDigitMaxValue);
+ ASSERT(Smi::IsValid(kChunkDivisor));
+ const Bigint& divisor = Bigint::Handle(NewFromInt64(kChunkDivisor));
// Rest contains the remaining bigint that needs to be printed.
Bigint& rest = Bigint::Handle(bigint.raw());
@@ -372,7 +372,7 @@ const char* BigintOperations::ToDecimalCString(
intptr_t part = (remainder.Length() == 1)
? static_cast<intptr_t>(remainder.GetChunkAt(0))
: 0;
- for (int i = 0; i < kPowerOfTen; i++) {
+ for (int i = 0; i < kChunkDigits; i++) {
result[result_pos++] = '0' + (part % 10);
part /= 10;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698