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

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

Issue 1000063002: Hide RegExp and String initialization in a closure. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: address comments Created 5 years, 9 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/string-iterator.js ('k') | src/v8natives.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 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);
-})();
+})();
« no previous file with comments | « src/string-iterator.js ('k') | src/v8natives.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698