Index: src/runtime/runtime-numbers.cc |
diff --git a/src/runtime/runtime-numbers.cc b/src/runtime/runtime-numbers.cc |
index 17c52e14f59111fcbcd48b69883bf717e2147d01..9090067b8fc4bc474291d10cb764a01c75cbd5b3 100644 |
--- a/src/runtime/runtime-numbers.cc |
+++ b/src/runtime/runtime-numbers.cc |
@@ -5,9 +5,9 @@ |
#include "src/v8.h" |
#include "src/arguments.h" |
+#include "src/base/bits.h" |
#include "src/bootstrapper.h" |
#include "src/codegen.h" |
-#include "src/misc-intrinsics.h" |
#include "src/runtime/runtime.h" |
#include "src/runtime/runtime-utils.h" |
@@ -526,11 +526,11 @@ RUNTIME_FUNCTION(Runtime_SmiLexicographicCompare) { |
// integer comes first in the lexicographic order. |
// From http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog10 |
- int x_log2 = IntegerLog2(x_scaled); |
+ int x_log2 = 31 - base::bits::CountLeadingZeros32(x_scaled); |
int x_log10 = ((x_log2 + 1) * 1233) >> 12; |
x_log10 -= x_scaled < kPowersOf10[x_log10]; |
- int y_log2 = IntegerLog2(y_scaled); |
+ int y_log2 = 31 - base::bits::CountLeadingZeros32(y_scaled); |
int y_log10 = ((y_log2 + 1) * 1233) >> 12; |
y_log10 -= y_scaled < kPowersOf10[y_log10]; |