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

Unified Diff: src/math.js

Issue 1143993003: Use shared container to manage imports/exports. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fixed test for no-snap Created 5 years, 7 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/json.js ('k') | src/messages.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/math.js
diff --git a/src/math.js b/src/math.js
index 427e329812d2fe6244e47c5c75ddd9d12f06137b..d620906d1893d2b0f92fc64e7d2e426cb9b6d1df 100644
--- a/src/math.js
+++ b/src/math.js
@@ -4,13 +4,7 @@
var rngstate; // Initialized to a Uint32Array during genesis.
-var $abs;
-var $exp;
-var $floor;
-var $max;
-var $min;
-
-(function(global, shared, exports) {
+(function(global, utils) {
"use strict";
@@ -20,7 +14,7 @@ var $min;
// Imports
var GlobalObject = global.Object;
-var InternalArray = shared.InternalArray;
+var InternalArray = utils.InternalArray;
//-------------------------------------------------------------------
@@ -357,11 +351,15 @@ $installFunctions(Math, DONT_ENUM, [
%SetForceInlineFlag(MathSqrtJS);
%SetForceInlineFlag(MathTrunc);
-// Expose to the global scope.
-$abs = MathAbs;
-$exp = MathExp;
-$floor = MathFloorJS;
-$max = MathMax;
-$min = MathMin;
+// -------------------------------------------------------------------
+// Exports
+
+utils.Export(function(to) {
+ to.MathAbs = MathAbs;
+ to.MathExp = MathExp;
+ to.MathFloor = MathFloorJS;
+ to.MathMax = MathMax;
+ to.MathMin = MathMin;
+});
})
« no previous file with comments | « src/json.js ('k') | src/messages.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698