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

Unified Diff: src/runtime/runtime-numbers.cc

Issue 639123009: Classes: Add basic support for properties (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: git rebase Created 6 years, 2 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 | « src/runtime/runtime-maths.cc ('k') | src/runtime/runtime-object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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];
« no previous file with comments | « src/runtime/runtime-maths.cc ('k') | src/runtime/runtime-object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698