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

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

Issue 2065503002: [builtins] Introduce proper Float64Atan and Float64Atan2 operators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: [WIP] Fix GCC/Win32. Created 4 years, 6 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.h ('k') | test/cctest/compiler/test-run-machops.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-maths.cc
diff --git a/src/runtime/runtime-maths.cc b/src/runtime/runtime-maths.cc
index b66219af47419f4e64efc460f9a30029629e7c99..47fe705400874f062ffee72541194ab3be4187d5 100644
--- a/src/runtime/runtime-maths.cc
+++ b/src/runtime/runtime-maths.cc
@@ -59,31 +59,6 @@ RUNTIME_FUNCTION(Runtime_RemPiO2) {
}
-static const double kPiDividedBy4 = 0.78539816339744830962;
-
-
-RUNTIME_FUNCTION(Runtime_MathAtan2) {
- HandleScope scope(isolate);
- DCHECK(args.length() == 2);
- isolate->counters()->math_atan2_runtime()->Increment();
- CONVERT_DOUBLE_ARG_CHECKED(x, 0);
- CONVERT_DOUBLE_ARG_CHECKED(y, 1);
- double result;
- if (std::isinf(x) && std::isinf(y)) {
- // Make sure that the result in case of two infinite arguments
- // is a multiple of Pi / 4. The sign of the result is determined
- // by the first argument (x) and the sign of the second argument
- // determines the multiplier: one or three.
- int multiplier = (x < 0) ? -1 : 1;
- if (y < 0) multiplier *= 3;
- result = multiplier * kPiDividedBy4;
- } else {
- result = std::atan2(x, y);
- }
- return *isolate->factory()->NewNumber(result);
-}
-
-
RUNTIME_FUNCTION(Runtime_MathExpRT) {
HandleScope scope(isolate);
DCHECK(args.length() == 1);
« no previous file with comments | « src/runtime/runtime.h ('k') | test/cctest/compiler/test-run-machops.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698