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

Unified Diff: src/runtime.cc

Issue 429603003: Check for negative zero in floor when compiling with MSVC. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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/hydrogen-instructions.cc ('k') | src/utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index ba6f33c5313ed589930c4808fb00553383aeca3b..518e96a99bfc0c1cf6f636793a5784d5e0373a5a 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -42,6 +42,7 @@
#include "src/string-search.h"
#include "src/stub-cache.h"
#include "src/uri.h"
+#include "src/utils.h"
#include "src/v8threads.h"
#include "src/vm-state-inl.h"
@@ -7712,7 +7713,7 @@ RUNTIME_FUNCTION(Runtime_MathFloorRT) {
isolate->counters()->math_floor()->Increment();
CONVERT_DOUBLE_ARG_CHECKED(x, 0);
- return *isolate->factory()->NewNumber(std::floor(x));
+ return *isolate->factory()->NewNumber(Floor(x));
}
@@ -7797,7 +7798,7 @@ RUNTIME_FUNCTION(Runtime_RoundNumber) {
if (sign && value >= -0.5) return isolate->heap()->minus_zero_value();
// Do not call NumberFromDouble() to avoid extra checks.
- return *isolate->factory()->NewNumber(std::floor(value + 0.5));
+ return *isolate->factory()->NewNumber(Floor(value + 0.5));
}
@@ -9522,9 +9523,9 @@ RUNTIME_FUNCTION(Runtime_DateCurrentTime) {
double millis;
if (FLAG_verify_predictable) {
millis = 1388534400000.0; // Jan 1 2014 00:00:00 GMT+0000
- millis += std::floor(isolate->heap()->synthetic_time());
+ millis += Floor(isolate->heap()->synthetic_time());
} else {
- millis = std::floor(base::OS::TimeCurrentMillis());
+ millis = Floor(base::OS::TimeCurrentMillis());
}
return *isolate->factory()->NewNumber(millis);
}
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698