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

Unified Diff: src/js/math.js

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/ia32/codegen-ia32.cc ('k') | src/mips/codegen-mips.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/math.js
diff --git a/src/js/math.js b/src/js/math.js
index abb1251e3de113e831cdcd4b0efd511d4633c17f..9224010ca640636616d6c0acaf4b135cbbbb6165 100644
--- a/src/js/math.js
+++ b/src/js/math.js
@@ -27,6 +27,11 @@
function MathAbs(x) {
x = +x;
return (x > 0) ? x : 0 - x;
+}
+
+// ECMA 262 - 15.8.2.8
+function MathExp(x) {
+ return %MathExpRT(TO_NUMBER(x));
}
// ECMA 262 - 15.8.2.13
@@ -179,6 +184,7 @@
utils.InstallFunctions(GlobalMath, DONT_ENUM, [
"random", MathRandom,
"abs", MathAbs,
+ "exp", MathExp,
"pow", MathPowJS,
"sign", MathSign,
"asinh", MathAsinh,
@@ -197,6 +203,7 @@
utils.Export(function(to) {
to.MathAbs = MathAbs;
+ to.MathExp = MathExp;
to.IntRandom = MathRandomRaw;
});
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | src/mips/codegen-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698