OLD | NEW |
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 (function(global, utils) { | 5 (function(global, utils) { |
6 "use strict"; | 6 "use strict"; |
7 | 7 |
8 %CheckIsBootstrapping(); | 8 %CheckIsBootstrapping(); |
9 | 9 |
10 // ------------------------------------------------------------------- | 10 // ------------------------------------------------------------------- |
11 // Imports | 11 // Imports |
12 | 12 |
13 var GlobalMath = global.Math; | 13 var GlobalMath = global.Math; |
14 var GlobalObject = global.Object; | 14 var GlobalObject = global.Object; |
15 var InternalArray = utils.InternalArray; | 15 var InternalArray = utils.InternalArray; |
16 var NaN = %GetRootNaN(); | 16 var NaN = %GetRootNaN(); |
17 var rngstate; | 17 var rngstate = { a: 1, b: 2, c: 3, d: 4 }; |
18 var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol"); | 18 var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol"); |
19 | 19 |
20 utils.InitializeRNG = function() { | 20 utils.InitializeRNG = function() { |
21 var state = %InitializeRNG(); | 21 var state = %InitializeRNG(); |
22 rngstate = { a: state[0], b: state[1], c: state[2], d: state[3] }; | 22 rngstate = { a: state[0], b: state[1], c: state[2], d: state[3] }; |
23 }; | 23 }; |
24 | 24 |
25 //------------------------------------------------------------------- | 25 //------------------------------------------------------------------- |
26 | 26 |
27 // ECMA 262 - 15.8.2.1 | 27 // ECMA 262 - 15.8.2.1 |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 utils.Export(function(to) { | 353 utils.Export(function(to) { |
354 to.MathAbs = MathAbs; | 354 to.MathAbs = MathAbs; |
355 to.MathExp = MathExp; | 355 to.MathExp = MathExp; |
356 to.MathFloor = MathFloorJS; | 356 to.MathFloor = MathFloorJS; |
357 to.IntRandom = MathRandomRaw; | 357 to.IntRandom = MathRandomRaw; |
358 to.MathMax = MathMax; | 358 to.MathMax = MathMax; |
359 to.MathMin = MathMin; | 359 to.MathMin = MathMin; |
360 }); | 360 }); |
361 | 361 |
362 }) | 362 }) |
OLD | NEW |