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

Unified Diff: src/assembler.cc

Issue 5862002: Version 3.0.2. (Closed)
Patch Set: Created 10 years 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
« ChangeLog ('K') | « src/assembler.h ('k') | src/ast.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/assembler.cc
diff --git a/src/assembler.cc b/src/assembler.cc
index 3b44efa9c02fd1140a834e9d868c3c6dfa905d7b..d71a35a4a54dc3c891a200237686b756abda0c73 100644
--- a/src/assembler.cc
+++ b/src/assembler.cc
@@ -66,7 +66,6 @@ namespace internal {
const double DoubleConstant::min_int = kMinInt;
const double DoubleConstant::one_half = 0.5;
-const double DoubleConstant::negative_infinity = -V8_INFINITY;
// -----------------------------------------------------------------------------
@@ -723,12 +722,6 @@ ExternalReference ExternalReference::address_of_one_half() {
}
-ExternalReference ExternalReference::address_of_negative_infinity() {
- return ExternalReference(reinterpret_cast<void*>(
- const_cast<double*>(&DoubleConstant::negative_infinity)));
-}
-
-
#ifndef V8_INTERPRETED_REGEXP
ExternalReference ExternalReference::re_check_stack_guard_state() {
@@ -800,51 +793,6 @@ static double mod_two_doubles(double x, double y) {
}
-// Helper function to compute x^y, where y is known to be an
-// integer. Uses binary decomposition to limit the number of
-// multiplications; see the discussion in "Hacker's Delight" by Henry
-// S. Warren, Jr., figure 11-6, page 213.
-double power_double_int(double x, int y) {
- double m = (y < 0) ? 1 / x : x;
- unsigned n = (y < 0) ? -y : y;
- double p = 1;
- while (n != 0) {
- if ((n & 1) != 0) p *= m;
- m *= m;
- if ((n & 2) != 0) p *= m;
- m *= m;
- n >>= 2;
- }
- return p;
-}
-
-
-double power_double_double(double x, double y) {
- int y_int = static_cast<int>(y);
- if (y == y_int) {
- return power_double_int(x, y_int); // Returns 1.0 for exponent 0.
- }
- if (!isinf(x)) {
- if (y == 0.5) return sqrt(x);
- if (y == -0.5) return 1.0 / sqrt(x);
- }
- if (isnan(y) || ((x == 1 || x == -1) && isinf(y))) {
- return OS::nan_value();
- }
- return pow(x, y);
-}
-
-
-ExternalReference ExternalReference::power_double_double_function() {
- return ExternalReference(Redirect(FUNCTION_ADDR(power_double_double)));
-}
-
-
-ExternalReference ExternalReference::power_double_int_function() {
- return ExternalReference(Redirect(FUNCTION_ADDR(power_double_int)));
-}
-
-
static int native_compare_doubles(double y, double x) {
if (x == y) return EQUAL;
return x < y ? LESS : GREATER;
« ChangeLog ('K') | « src/assembler.h ('k') | src/ast.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698