Version 3.18.2
OS::MemMove/OS::MemCopy: Don't call through to generated code when size == 0 to avoid prefetching invalid memory (Chromium issue 233500)
Removed heap snapshot size limit. (Chromium issue 232305)
Performance and stability improvements on all platforms.
git-svn-id: http://v8.googlecode.com/svn/trunk@14368 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/assembler.cc b/src/assembler.cc
index 5bde8c5..84d720b 100644
--- a/src/assembler.cc
+++ b/src/assembler.cc
@@ -34,7 +34,7 @@
#include "assembler.h"
-#include <math.h> // For cos, log, pow, sin, tan, etc.
+#include <cmath>
#include "api.h"
#include "builtins.h"
#include "counters.h"
@@ -1459,10 +1459,11 @@
return power_double_int(x, y_int); // Returns 1 if exponent is 0.
}
if (y == 0.5) {
- return (isinf(x)) ? V8_INFINITY : fast_sqrt(x + 0.0); // Convert -0 to +0.
+ return (std::isinf(x)) ? V8_INFINITY
+ : fast_sqrt(x + 0.0); // Convert -0 to +0.
}
if (y == -0.5) {
- return (isinf(x)) ? 0 : 1.0 / fast_sqrt(x + 0.0); // Convert -0 to +0.
+ return (std::isinf(x)) ? 0 : 1.0 / fast_sqrt(x + 0.0); // Convert -0 to +0.
}
return power_double_double(x, y);
}
@@ -1492,7 +1493,7 @@
(!defined(__MINGW64_VERSION_RC) || __MINGW64_VERSION_RC < 1)
// MinGW64 has a custom implementation for pow. This handles certain
// special cases that are different.
- if ((x == 0.0 || isinf(x)) && isfinite(y)) {
+ if ((x == 0.0 || std::isinf(x)) && std::isfinite(y)) {
double f;
if (modf(y, &f) != 0.0) return ((x == 0.0) ^ (y > 0)) ? V8_INFINITY : 0;
}
@@ -1505,7 +1506,9 @@
// The checks for special cases can be dropped in ia32 because it has already
// been done in generated code before bailing out here.
- if (isnan(y) || ((x == 1 || x == -1) && isinf(y))) return OS::nan_value();
+ if (std::isnan(y) || ((x == 1 || x == -1) && std::isinf(y))) {
+ return OS::nan_value();
+ }
return pow(x, y);
}