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 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 IntRandom; | 17 var IntRandom; |
| 18 var MakeTypeError; |
18 var MapIterator; | 19 var MapIterator; |
19 var NumberIsNaN; | 20 var NumberIsNaN; |
20 var SetIterator; | 21 var SetIterator; |
21 var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol"); | 22 var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol"); |
22 | 23 |
23 utils.Import(function(from) { | 24 utils.Import(function(from) { |
24 IntRandom = from.IntRandom; | 25 IntRandom = from.IntRandom; |
| 26 MakeTypeError = from.MakeTypeError; |
25 MapIterator = from.MapIterator; | 27 MapIterator = from.MapIterator; |
26 NumberIsNaN = from.NumberIsNaN; | 28 NumberIsNaN = from.NumberIsNaN; |
27 SetIterator = from.SetIterator; | 29 SetIterator = from.SetIterator; |
28 }); | 30 }); |
29 | 31 |
30 // ------------------------------------------------------------------- | 32 // ------------------------------------------------------------------- |
31 | 33 |
32 function HashToEntry(table, hash, numBuckets) { | 34 function HashToEntry(table, hash, numBuckets) { |
33 var bucket = ORDERED_HASH_TABLE_HASH_TO_BUCKET(hash, numBuckets); | 35 var bucket = ORDERED_HASH_TABLE_HASH_TO_BUCKET(hash, numBuckets); |
34 return ORDERED_HASH_TABLE_BUCKET_AT(table, bucket); | 36 return ORDERED_HASH_TABLE_BUCKET_AT(table, bucket); |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 "map_from_array", MapFromArray, | 495 "map_from_array", MapFromArray, |
494 "set_from_array",SetFromArray, | 496 "set_from_array",SetFromArray, |
495 ]); | 497 ]); |
496 | 498 |
497 utils.Export(function(to) { | 499 utils.Export(function(to) { |
498 to.GetExistingHash = GetExistingHash; | 500 to.GetExistingHash = GetExistingHash; |
499 to.GetHash = GetHash; | 501 to.GetHash = GetHash; |
500 }); | 502 }); |
501 | 503 |
502 }) | 504 }) |
OLD | NEW |