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

Unified Diff: src/third_party/fdlibm/fdlibm.js

Issue 1065863003: Use array literals instead of array constructor in native javascript. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase and fix Created 5 years, 8 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/symbol.js ('k') | src/typedarray.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/third_party/fdlibm/fdlibm.js
diff --git a/src/third_party/fdlibm/fdlibm.js b/src/third_party/fdlibm/fdlibm.js
index e0373922c3674e6a7029f593b56112b03b3013c5..8560b5a004e422d81051f8c178557a3904043d04 100644
--- a/src/third_party/fdlibm/fdlibm.js
+++ b/src/third_party/fdlibm/fdlibm.js
@@ -33,7 +33,6 @@ var rempio2result;
%CheckIsBootstrapping();
var GlobalMath = global.Math;
-var GlobalArray = global.Array;
//-------------------------------------------------------------------
@@ -887,12 +886,12 @@ function MathLog10(x) {
if (hx >= 0x7ff00000) return x;
k += (hx >> 20) - 1023;
- i = (k & 0x80000000) >> 31;
+ var i = (k & 0x80000000) >> 31;
hx = (hx & 0x000fffff) | ((0x3ff - i) << 20);
- y = k + i;
+ var y = k + i;
x = %_ConstructDouble(hx, lx);
- z = y * LOG10_2LO + IVLN10 * %_MathLogRT(x);
+ var z = y * LOG10_2LO + IVLN10 * %_MathLogRT(x);
return z + y * LOG10_2HI;
}
@@ -1013,7 +1012,7 @@ function MathLog2(x) {
//-------------------------------------------------------------------
-InstallFunctions(GlobalMath, DONT_ENUM, GlobalArray(
+InstallFunctions(GlobalMath, DONT_ENUM, [
"cos", MathCos,
"sin", MathSin,
"tan", MathTan,
@@ -1023,7 +1022,7 @@ InstallFunctions(GlobalMath, DONT_ENUM, GlobalArray(
"log2", MathLog2,
"log1p", MathLog1p,
"expm1", MathExpm1
-));
+]);
%SetInlineBuiltinFlag(MathSin);
%SetInlineBuiltinFlag(MathCos);
« no previous file with comments | « src/symbol.js ('k') | src/typedarray.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698