Index: src/third_party/fdlibm/fdlibm.js |
diff --git a/src/third_party/fdlibm/fdlibm.js b/src/third_party/fdlibm/fdlibm.js |
index 360712a9d3ea1e5a798877752c6cb874a8b54af0..e0373922c3674e6a7029f593b56112b03b3013c5 100644 |
--- a/src/third_party/fdlibm/fdlibm.js |
+++ b/src/third_party/fdlibm/fdlibm.js |
@@ -30,6 +30,13 @@ var rempio2result; |
"use strict"; |
+%CheckIsBootstrapping(); |
+ |
+var GlobalMath = global.Math; |
+var GlobalArray = global.Array; |
+ |
+//------------------------------------------------------------------- |
+ |
const INVPIO2 = kMath[0]; |
const PIO2_1 = kMath[1]; |
const PIO2_1T = kMath[2]; |
@@ -1006,9 +1013,7 @@ function MathLog2(x) { |
//------------------------------------------------------------------- |
-%CheckIsBootstrapping(); |
- |
-InstallFunctions(global.Math, DONT_ENUM, $Array( |
+InstallFunctions(GlobalMath, DONT_ENUM, GlobalArray( |
"cos", MathCos, |
"sin", MathSin, |
"tan", MathTan, |
@@ -1023,4 +1028,4 @@ InstallFunctions(global.Math, DONT_ENUM, $Array( |
%SetInlineBuiltinFlag(MathSin); |
%SetInlineBuiltinFlag(MathCos); |
-})(); |
+})(); |