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

Side by Side Diff: src/js/math.js

Issue 1458003005: Provide an RNG seed for creating snapshot. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | no next file » | 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 (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
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 })
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698