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

Unified Diff: src/js/math.js

Issue 1731543004: [builtins] Migrate a bunch of Math builtins to C++. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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/counters.h ('k') | src/runtime/runtime.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 a698fd4285cac1adbc1396f84deab9ab6d29e97c..fbe783bf7758b36daaa86ae10ad502c5db72cc81 100644
--- a/src/js/math.js
+++ b/src/js/math.js
@@ -31,28 +31,13 @@ function MathAbs(x) {
return (x > 0) ? x : 0 - x;
}
-// ECMA 262 - 15.8.2.2
-function MathAcosJS(x) {
- return %_MathAcos(+x);
-}
-
-// ECMA 262 - 15.8.2.3
-function MathAsinJS(x) {
- return %_MathAsin(+x);
-}
-
-// ECMA 262 - 15.8.2.4
-function MathAtanJS(x) {
- return %_MathAtan(+x);
-}
-
// ECMA 262 - 15.8.2.5
// The naming of y and x matches the spec, as does the order in which
// ToNumber (valueOf) is called.
function MathAtan2JS(y, x) {
y = +y;
x = +x;
- return %_MathAtan2(y, x);
+ return %MathAtan2(y, x);
}
// ECMA 262 - 15.8.2.6
@@ -107,11 +92,6 @@ function MathSqrtJS(x) {
return %_MathSqrt(+x);
}
-// Non-standard extension.
-function MathImul(x, y) {
- return %NumberImul(TO_NUMBER(x), TO_NUMBER(y));
-}
-
// ES6 draft 09-27-13, section 20.2.2.28.
function MathSign(x) {
x = +x;
@@ -188,11 +168,6 @@ function MathHypot(x, y) { // Function length is 2.
return %_MathSqrt(sum) * max;
}
-// ES6 draft 09-27-13, section 20.2.2.16.
-function MathFroundJS(x) {
- return %MathFround(TO_NUMBER(x));
-}
-
// ES6 draft 07-18-14, section 20.2.2.11
function MathClz32JS(x) {
return %_MathClz32(x >>> 0);
@@ -246,9 +221,6 @@ utils.InstallConstants(GlobalMath, [
utils.InstallFunctions(GlobalMath, DONT_ENUM, [
"random", MathRandom,
"abs", MathAbs,
- "acos", MathAcosJS,
- "asin", MathAsinJS,
- "atan", MathAtanJS,
"ceil", MathCeil,
"exp", MathExp,
"floor", MathFloorJS,
@@ -257,22 +229,17 @@ utils.InstallFunctions(GlobalMath, DONT_ENUM, [
"sqrt", MathSqrtJS,
"atan2", MathAtan2JS,
"pow", MathPowJS,
- "imul", MathImul,
"sign", MathSign,
"trunc", MathTrunc,
"asinh", MathAsinh,
"acosh", MathAcosh,
"atanh", MathAtanh,
"hypot", MathHypot,
- "fround", MathFroundJS,
"clz32", MathClz32JS,
"cbrt", MathCbrt
]);
%SetForceInlineFlag(MathAbs);
-%SetForceInlineFlag(MathAcosJS);
-%SetForceInlineFlag(MathAsinJS);
-%SetForceInlineFlag(MathAtanJS);
%SetForceInlineFlag(MathAtan2JS);
%SetForceInlineFlag(MathCeil);
%SetForceInlineFlag(MathClz32JS);
« no previous file with comments | « src/counters.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698