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

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

Issue 2070813002: Revert of [builtins] Introduce proper Float64Exp operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/third_party/fdlibm/fdlibm.js » ('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 fb8e083debff2cca7f0ad648aa9d49d5dadfdb72..47fe705400874f062ffee72541194ab3be4187d5 100644
--- a/src/runtime/runtime-maths.cc
+++ b/src/runtime/runtime-maths.cc
@@ -56,6 +56,17 @@
FixedFloat64Array* array = FixedFloat64Array::cast(result->elements());
double* y = static_cast<double*>(array->DataPtr());
return Smi::FromInt(fdlibm::rempio2(x, y));
+}
+
+
+RUNTIME_FUNCTION(Runtime_MathExpRT) {
+ HandleScope scope(isolate);
+ DCHECK(args.length() == 1);
+ isolate->counters()->math_exp_runtime()->Increment();
+
+ CONVERT_DOUBLE_ARG_CHECKED(x, 0);
+ lazily_initialize_fast_exp(isolate);
+ return *isolate->factory()->NewNumber(fast_exp(x, isolate));
}
« no previous file with comments | « src/runtime/runtime.h ('k') | src/third_party/fdlibm/fdlibm.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698