| Index: src/collection.js
|
| diff --git a/src/collection.js b/src/collection.js
|
| index 6d43384e1cecf440de2abc3067cab0a51528ae9c..3d1e9573f24467553ec00df6a717ba1c71a389ea 100644
|
| --- a/src/collection.js
|
| +++ b/src/collection.js
|
| @@ -16,6 +16,7 @@ var $getExistingHash;
|
| var GlobalMap = global.Map;
|
| var GlobalObject = global.Object;
|
| var GlobalSet = global.Set;
|
| +var HashCodeSymbol = utils.GetPrivateSymbol("hash_code_symbol");
|
| var IntRandom;
|
|
|
| utils.Import(function(from) {
|
| @@ -90,8 +91,6 @@ function ComputeIntegerHash(key, seed) {
|
| }
|
| %SetForceInlineFlag(ComputeIntegerHash);
|
|
|
| -var hashCodeSymbol = GLOBAL_PRIVATE("hash_code_symbol");
|
| -
|
| function GetExistingHash(key) {
|
| if (%_IsSmi(key)) {
|
| return ComputeIntegerHash(key, 0);
|
| @@ -102,7 +101,7 @@ function GetExistingHash(key) {
|
| return field >>> 2 /* Name::kHashShift */;
|
| }
|
| } else if (IS_SPEC_OBJECT(key) && !%_IsJSProxy(key) && !IS_GLOBAL(key)) {
|
| - var hash = GET_PRIVATE(key, hashCodeSymbol);
|
| + var hash = GET_PRIVATE(key, HashCodeSymbol);
|
| return hash;
|
| }
|
| return %GenericHash(key);
|
| @@ -115,7 +114,7 @@ function GetHash(key) {
|
| if (IS_UNDEFINED(hash)) {
|
| hash = IntRandom() | 0;
|
| if (hash === 0) hash = 1;
|
| - SET_PRIVATE(key, hashCodeSymbol, hash);
|
| + SET_PRIVATE(key, HashCodeSymbol, hash);
|
| }
|
| return hash;
|
| }
|
|
|