Version 3.17.3
Performance and stability improvements on all platforms.
git-svn-id: http://v8.googlecode.com/svn/trunk@13712 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/assembler.cc b/src/assembler.cc
index b4958f5..fdb6399 100644
--- a/src/assembler.cc
+++ b/src/assembler.cc
@@ -689,6 +689,21 @@
// Implementation of RelocInfo
+#ifdef DEBUG
+bool RelocInfo::RequiresRelocation(const CodeDesc& desc) {
+ // Ensure there are no code targets or embedded objects present in the
+ // deoptimization entries, they would require relocation after code
+ // generation.
+ int mode_mask = RelocInfo::kCodeTargetMask |
+ RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT) |
+ RelocInfo::ModeMask(RelocInfo::GLOBAL_PROPERTY_CELL) |
+ RelocInfo::kApplyMask;
+ RelocIterator it(desc, mode_mask);
+ return !it.done();
+}
+#endif
+
+
#ifdef ENABLE_DISASSEMBLER
const char* RelocInfo::RelocModeName(RelocInfo::Mode rmode) {
switch (rmode) {
@@ -1383,6 +1398,21 @@
}
+double power_helper(double x, double y) {
+ int y_int = static_cast<int>(y);
+ if (y == y_int) {
+ 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.
+ }
+ if (y == -0.5) {
+ return (isinf(x)) ? 0 : 1.0 / fast_sqrt(x + 0.0); // Convert -0 to +0.
+ }
+ return power_double_double(x, 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