| Index: src/runtime/runtime-numbers.cc
|
| diff --git a/src/runtime/runtime-numbers.cc b/src/runtime/runtime-numbers.cc
|
| index 17c52e14f59111fcbcd48b69883bf717e2147d01..bc0bb3656dccc9c61cd5cc8cfe81e262d3fc7d58 100644
|
| --- a/src/runtime/runtime-numbers.cc
|
| +++ b/src/runtime/runtime-numbers.cc
|
| @@ -5,10 +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"
|
|
|
|
|
| @@ -194,7 +193,7 @@ RUNTIME_FUNCTION(Runtime_StringToNumber) {
|
| }
|
|
|
| return *isolate->factory()->NewNumber(
|
| - StringToDouble(isolate->unicode_cache(), *subject, flags));
|
| + StringToDouble(isolate->unicode_cache(), subject, flags));
|
| }
|
|
|
|
|
| @@ -230,8 +229,7 @@ RUNTIME_FUNCTION(Runtime_StringParseFloat) {
|
| DCHECK(args.length() == 1);
|
| CONVERT_ARG_HANDLE_CHECKED(String, subject, 0);
|
|
|
| - subject = String::Flatten(subject);
|
| - double value = StringToDouble(isolate->unicode_cache(), *subject,
|
| + double value = StringToDouble(isolate->unicode_cache(), subject,
|
| ALLOW_TRAILING_JUNK, base::OS::nan_value());
|
|
|
| return *isolate->factory()->NewNumber(value);
|
| @@ -526,11 +524,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];
|
|
|
|
|