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

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

Issue 2103733003: [turbofan] Introduce Float64Pow and NumberPow operators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE on ARM64 bug fix. 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') | src/x64/code-stubs-x64.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 1a923bfa68f62b774fd800300698fdc3f7b31b1f..88ee6e9694effb3248660906d02f40ff4b46cff6 100644
--- a/src/runtime/runtime-maths.cc
+++ b/src/runtime/runtime-maths.cc
@@ -35,48 +35,6 @@ RUNTIME_FUNCTION(Runtime_DoubleLo) {
}
-// Slow version of Math.pow. We check for fast paths for special cases.
-// Used if VFP3 is not available.
-RUNTIME_FUNCTION(Runtime_MathPow) {
- HandleScope scope(isolate);
- DCHECK(args.length() == 2);
- isolate->counters()->math_pow_runtime()->Increment();
-
- CONVERT_DOUBLE_ARG_CHECKED(x, 0);
-
- // If the second argument is a smi, it is much faster to call the
- // custom powi() function than the generic pow().
- if (args[1]->IsSmi()) {
- int y = args.smi_at(1);
- return *isolate->factory()->NewNumber(power_double_int(x, y));
- }
-
- CONVERT_DOUBLE_ARG_CHECKED(y, 1);
- double result = power_helper(isolate, x, y);
- if (std::isnan(result)) return isolate->heap()->nan_value();
- return *isolate->factory()->NewNumber(result);
-}
-
-
-// Fast version of Math.pow if we know that y is not an integer and y is not
-// -0.5 or 0.5. Used as slow case from full codegen.
-RUNTIME_FUNCTION(Runtime_MathPowRT) {
- HandleScope scope(isolate);
- DCHECK(args.length() == 2);
- isolate->counters()->math_pow_runtime()->Increment();
-
- CONVERT_DOUBLE_ARG_CHECKED(x, 0);
- CONVERT_DOUBLE_ARG_CHECKED(y, 1);
- if (y == 0) {
- return Smi::FromInt(1);
- } else {
- double result = power_double_double(x, y);
- if (std::isnan(result)) return isolate->heap()->nan_value();
- return *isolate->factory()->NewNumber(result);
- }
-}
-
-
RUNTIME_FUNCTION(Runtime_GenerateRandomNumbers) {
HandleScope scope(isolate);
DCHECK(args.length() == 1);
« no previous file with comments | « src/runtime/runtime.h ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698