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

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

Issue 2402363002: [Math] implement Math.random as TFJ builtin. (Closed)
Patch Set: fix golden file Created 4 years, 2 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
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 GlobalMap = global.Map; 13 var GlobalMap = global.Map;
14 var GlobalObject = global.Object; 14 var GlobalObject = global.Object;
15 var GlobalSet = global.Set; 15 var GlobalSet = global.Set;
16 var hashCodeSymbol = utils.ImportNow("hash_code_symbol"); 16 var hashCodeSymbol = utils.ImportNow("hash_code_symbol");
17 var MathRandom; 17 var MathRandom = global.Math.random;
18 var MapIterator; 18 var MapIterator;
19 var SetIterator; 19 var SetIterator;
20 var speciesSymbol = utils.ImportNow("species_symbol"); 20 var speciesSymbol = utils.ImportNow("species_symbol");
21 var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol"); 21 var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol");
22 22
23 utils.Import(function(from) { 23 utils.Import(function(from) {
24 MathRandom = from.MathRandom;
25 MapIterator = from.MapIterator; 24 MapIterator = from.MapIterator;
26 SetIterator = from.SetIterator; 25 SetIterator = from.SetIterator;
27 }); 26 });
28 27
29 // ------------------------------------------------------------------- 28 // -------------------------------------------------------------------
30 29
31 function HashToEntry(table, hash, numBuckets) { 30 function HashToEntry(table, hash, numBuckets) {
32 var bucket = ORDERED_HASH_TABLE_HASH_TO_BUCKET(hash, numBuckets); 31 var bucket = ORDERED_HASH_TABLE_HASH_TO_BUCKET(hash, numBuckets);
33 return ORDERED_HASH_TABLE_BUCKET_AT(table, bucket); 32 return ORDERED_HASH_TABLE_BUCKET_AT(table, bucket);
34 } 33 }
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 "set_has", SetHas, 480 "set_has", SetHas,
482 "set_delete", SetDelete, 481 "set_delete", SetDelete,
483 ]); 482 ]);
484 483
485 utils.Export(function(to) { 484 utils.Export(function(to) {
486 to.GetExistingHash = GetExistingHash; 485 to.GetExistingHash = GetExistingHash;
487 to.GetHash = GetHash; 486 to.GetHash = GetHash;
488 }); 487 });
489 488
490 }) 489 })
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | src/js/math.js » ('j') | test/mjsunit/debug-script.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698