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

Side by Side Diff: src/math.js

Issue 1144163002: Revert of Use shared container to manage imports/exports. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « src/json.js ('k') | src/messages.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var rngstate; // Initialized to a Uint32Array during genesis. 5 var rngstate; // Initialized to a Uint32Array during genesis.
6 6
7 (function(global, utils) { 7 var $abs;
8 var $exp;
9 var $floor;
10 var $max;
11 var $min;
12
13 (function(global, shared, exports) {
8 14
9 "use strict"; 15 "use strict";
10 16
11 %CheckIsBootstrapping(); 17 %CheckIsBootstrapping();
12 18
13 // ------------------------------------------------------------------- 19 // -------------------------------------------------------------------
14 // Imports 20 // Imports
15 21
16 var GlobalObject = global.Object; 22 var GlobalObject = global.Object;
17 var InternalArray = utils.InternalArray; 23 var InternalArray = shared.InternalArray;
18 24
19 //------------------------------------------------------------------- 25 //-------------------------------------------------------------------
20 26
21 // ECMA 262 - 15.8.2.1 27 // ECMA 262 - 15.8.2.1
22 function MathAbs(x) { 28 function MathAbs(x) {
23 x = +x; 29 x = +x;
24 return (x > 0) ? x : 0 - x; 30 return (x > 0) ? x : 0 - x;
25 } 31 }
26 32
27 // ECMA 262 - 15.8.2.2 33 // ECMA 262 - 15.8.2.2
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 %SetInlineBuiltinFlag(MathAtanJS); 350 %SetInlineBuiltinFlag(MathAtanJS);
345 %SetInlineBuiltinFlag(MathAtan2JS); 351 %SetInlineBuiltinFlag(MathAtan2JS);
346 %SetInlineBuiltinFlag(MathCeil); 352 %SetInlineBuiltinFlag(MathCeil);
347 %SetInlineBuiltinFlag(MathClz32JS); 353 %SetInlineBuiltinFlag(MathClz32JS);
348 %SetInlineBuiltinFlag(MathFloorJS); 354 %SetInlineBuiltinFlag(MathFloorJS);
349 %SetInlineBuiltinFlag(MathRandom); 355 %SetInlineBuiltinFlag(MathRandom);
350 %SetInlineBuiltinFlag(MathSign); 356 %SetInlineBuiltinFlag(MathSign);
351 %SetInlineBuiltinFlag(MathSqrtJS); 357 %SetInlineBuiltinFlag(MathSqrtJS);
352 %SetInlineBuiltinFlag(MathTrunc); 358 %SetInlineBuiltinFlag(MathTrunc);
353 359
354 // ------------------------------------------------------------------- 360 // Expose to the global scope.
355 // Exports 361 $abs = MathAbs;
356 362 $exp = MathExp;
357 utils.Export(function(to) { 363 $floor = MathFloorJS;
358 to.MathAbs = MathAbs; 364 $max = MathMax;
359 to.MathExp = MathExp; 365 $min = MathMin;
360 to.MathFloor = MathFloorJS;
361 to.MathMax = MathMax;
362 to.MathMin = MathMin;
363 });
364 366
365 }) 367 })
OLDNEW
« 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