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/prologue.js

Issue 1464303002: Implement xorshift128+ for Math.random. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: add missing include Created 5 years 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/js/math.js ('k') | src/runtime/runtime.h » ('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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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, extrasUtils) { 5 (function(global, utils, extrasUtils) {
6 6
7 "use strict"; 7 "use strict";
8 8
9 %CheckIsBootstrapping(); 9 %CheckIsBootstrapping();
10 10
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 %CheckIsBootstrapping(); 238 %CheckIsBootstrapping();
239 %ExportExperimentalFromRuntime(exports_container); 239 %ExportExperimentalFromRuntime(exports_container);
240 for ( ; !IS_UNDEFINED(imports); imports = imports.next) { 240 for ( ; !IS_UNDEFINED(imports); imports = imports.next) {
241 imports(exports_container); 241 imports(exports_container);
242 } 242 }
243 for ( ; !IS_UNDEFINED(imports_from_experimental); 243 for ( ; !IS_UNDEFINED(imports_from_experimental);
244 imports_from_experimental = imports_from_experimental.next) { 244 imports_from_experimental = imports_from_experimental.next) {
245 imports_from_experimental(exports_container); 245 imports_from_experimental(exports_container);
246 } 246 }
247 247
248 utils.InitializeRNG();
249 utils.InitializeRNG = UNDEFINED;
250 utils.CreateDoubleResultArray(); 248 utils.CreateDoubleResultArray();
251 utils.CreateDoubleResultArray = UNDEFINED; 249 utils.CreateDoubleResultArray = UNDEFINED;
252 250
253 utils.Export = UNDEFINED; 251 utils.Export = UNDEFINED;
254 utils.PostDebug = UNDEFINED; 252 utils.PostDebug = UNDEFINED;
255 utils.PostExperimentals = UNDEFINED; 253 utils.PostExperimentals = UNDEFINED;
256 typed_array_setup = UNDEFINED; 254 typed_array_setup = UNDEFINED;
257 } 255 }
258 256
259 257
260 function PostDebug(utils) { 258 function PostDebug(utils) {
261 for ( ; !IS_UNDEFINED(imports); imports = imports.next) { 259 for ( ; !IS_UNDEFINED(imports); imports = imports.next) {
262 imports(exports_container); 260 imports(exports_container);
263 } 261 }
264 262
265 utils.InitializeRNG();
266 utils.InitializeRNG = UNDEFINED;
267 utils.CreateDoubleResultArray(); 263 utils.CreateDoubleResultArray();
268 utils.CreateDoubleResultArray = UNDEFINED; 264 utils.CreateDoubleResultArray = UNDEFINED;
269 265
270 exports_container = UNDEFINED; 266 exports_container = UNDEFINED;
271 267
272 utils.Export = UNDEFINED; 268 utils.Export = UNDEFINED;
273 utils.Import = UNDEFINED; 269 utils.Import = UNDEFINED;
274 utils.ImportNow = UNDEFINED; 270 utils.ImportNow = UNDEFINED;
275 utils.PostDebug = UNDEFINED; 271 utils.PostDebug = UNDEFINED;
276 utils.PostExperimentals = UNDEFINED; 272 utils.PostExperimentals = UNDEFINED;
277 typed_array_setup = UNDEFINED; 273 typed_array_setup = UNDEFINED;
278 } 274 }
279 275
280 276
281 function InitializeBuiltinTypedArrays(utils, rng_state, rempio2result) { 277 function InitializeBuiltinTypedArrays(utils, rng_state, rempio2result) {
282 var setup_list = typed_array_setup; 278 var setup_list = typed_array_setup;
283 279
284 for ( ; !IS_UNDEFINED(setup_list); setup_list = setup_list.next) { 280 for ( ; !IS_UNDEFINED(setup_list); setup_list = setup_list.next) {
285 setup_list(rng_state, rempio2result); 281 setup_list(rng_state, rempio2result);
286 } 282 }
287 } 283 }
288 284
289 285
290 // ----------------------------------------------------------------------- 286 // -----------------------------------------------------------------------
291 287
292 %OptimizeObjectForAddingMultipleProperties(utils, 15); 288 %OptimizeObjectForAddingMultipleProperties(utils, 14);
293 289
294 utils.Import = Import; 290 utils.Import = Import;
295 utils.ImportNow = ImportNow; 291 utils.ImportNow = ImportNow;
296 utils.Export = Export; 292 utils.Export = Export;
297 utils.ImportFromExperimental = ImportFromExperimental; 293 utils.ImportFromExperimental = ImportFromExperimental;
298 utils.SetFunctionName = SetFunctionName; 294 utils.SetFunctionName = SetFunctionName;
299 utils.InstallConstants = InstallConstants; 295 utils.InstallConstants = InstallConstants;
300 utils.InstallFunctions = InstallFunctions; 296 utils.InstallFunctions = InstallFunctions;
301 utils.InstallGetter = InstallGetter; 297 utils.InstallGetter = InstallGetter;
302 utils.InstallGetterSetter = InstallGetterSetter; 298 utils.InstallGetterSetter = InstallGetterSetter;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 342
347 extrasUtils.uncurryThis = function uncurryThis(func) { 343 extrasUtils.uncurryThis = function uncurryThis(func) {
348 return function(thisArg) { 344 return function(thisArg) {
349 return %Apply(func, thisArg, arguments, 1, arguments.length - 1); 345 return %Apply(func, thisArg, arguments, 1, arguments.length - 1);
350 }; 346 };
351 }; 347 };
352 348
353 %ToFastProperties(extrasUtils); 349 %ToFastProperties(extrasUtils);
354 350
355 }) 351 })
OLDNEW
« no previous file with comments | « src/js/math.js ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698