/arkcompiler/ets_runtime/ecmascript/platform/common/ |
H A D | ecma_string_hash_internal.h | 33 uint32_t hash[blockSize] = {0}; in ComputeHashForDataOfLongString() local 36 hash[0] = (hash[0] << hashShift) - hash[0] + data[index]; in ComputeHashForDataOfLongString() 37 hash[1] = (hash[1] << hashShift) - hash[1] + data[index + 1]; // 1: the second element of the block in ComputeHashForDataOfLongString() 38 hash[2] = (hash[2] << hashShift) - hash[ in ComputeHashForDataOfLongString() [all...] |
/arkcompiler/runtime_core/libpandabase/utils/ |
H A D | murmur3_hash.h | 15 // This is the murmur3 32 bit hash implementation 30 // Here are the main constants for hash counting: 49 // In general murmur hash looks like that: 80 // Finilize the result of the hash function 94 uint32_t hash = seed; in MurmurHash3() local 112 hash ^= k1; in MurmurHash3() 113 hash = Rotl(hash, MAIN_SECOND_SHIFT); in MurmurHash3() 114 hash = hash * MAIN_MULTIPLICATO in MurmurHash3() 144 uint32_t hash = seed; MurmurHash3String() local [all...] |
H A D | hash.h | 23 // Now, murmur3 hash is used by default 27 // Default seed which is used in hash functions. 29 // one must define it here and create new alias hash class 39 * @param seed - seed which is used to calculate hash 40 * @return 32 bits hash 51 * @return 32 bits hash 61 * @return 32 bits hash 71 * @param seed - seed which is used to calculate hash 72 * @return 32 bits hash 81 /// Works like FNV hash bu [all...] |
/arkcompiler/runtime_core/static_core/libpandabase/utils/ |
H A D | murmur3_hash.h | 15 // This is the murmur3 32 bit hash implementation 28 // In general murmur hash looks like that: 54 // Here are the main constants for hash counting: 77 // Finilize the result of the hash function 91 uint32_t hash = seed; in MurmurHash3() local 109 hash ^= k1; in MurmurHash3() 110 hash = Rotl(hash, MAIN_SECOND_SHIFT); in MurmurHash3() 111 hash = hash * MAIN_MULTIPLICATO in MurmurHash3() 141 uint32_t hash = seed; MurmurHash3String() local [all...] |
H A D | hash.h | 22 // Now, murmur3 hash is used by default 26 // Default seed which is used in hash functions. 28 // one must define it here and create new alias hash class 38 * @param seed - seed which is used to calculate hash 39 * @return 32 bits hash 50 * @return 32 bits hash 60 * @return 32 bits hash 70 * @param seed - seed which is used to calculate hash 71 * @return 32 bits hash 80 /// Works like FNV hash bu [all...] |
/arkcompiler/ets_runtime/ecmascript/platform/arm64/ |
H A D | ecma_string_hash_internal.h | 35 uint32_t hash[blockSize] = {0}; in ComputeHashForDataOfLongString() local 37 uint32x4_t hashVec = vld1q_u32(hash); in ComputeHashForDataOfLongString() 47 vst1q_u32(hash, hashVec); in ComputeHashForDataOfLongString() 49 hash[0] = (hash[0] << hashShift) - hash[0] + data[index]; in ComputeHashForDataOfLongString() 53 totalHash = (totalHash << hashShift) - totalHash + hash[i]; in ComputeHashForDataOfLongString()
|
/arkcompiler/ets_runtime/ecmascript/pgo_profiler/types/ |
H A D | pgo_type_generator.h | 42 uint32_t hash = INVALID_ID; in ComputeHashCode() local 46 hash = (hash << SHIFT) - hash + c; in ComputeHashCode() 48 return hash; in ComputeHashCode()
|
/arkcompiler/runtime_core/static_core/runtime/ |
H A D | mark_word.cpp | 42 inline MarkWord MarkWord::DecodeFromHashConfigured(uint32_t hash) in DecodeFromHashConfigured() argument 44 // Clear hash and status bits in DecodeFromHashConfigured() 46 MarkWordSize hashInPlace = (static_cast<MarkWordSize>(hash) & HASH_MASK) << HASH_SHIFT; in DecodeFromHashConfigured() 51 inline MarkWord MarkWord::DecodeFromHashConfigured<false>(uint32_t hash) in DecodeFromHashConfigured() argument 53 (void)hash; in DecodeFromHashConfigured() 58 MarkWord MarkWord::DecodeFromHash(uint32_t hash) in DecodeFromHash() argument 60 return DecodeFromHashConfigured<CONFIG_IS_HASH_IN_OBJ_HEADER>(hash); in DecodeFromHash() 66 LOG(ERROR, RUNTIME) << "Hash is stored inside object header and we don't use hash status bit!"; in SetHashedConfigured() 84 LOG(ERROR, RUNTIME) << "Hash is stored inside object header and we don't use hash status bit!"; in IsHashedConfigured()
|
/arkcompiler/ets_runtime/ecmascript/ |
H A D | tagged_node.h | 26 void InitTaggedNode(JSThread *thread, int hash, JSHandle<JSTaggedValue> key, JSHandle<JSTaggedValue> value)
in InitTaggedNode() argument 28 SetHash(thread, JSTaggedValue(hash));
in InitTaggedNode() 69 int32_t hash = ECMAObject::Cast(key.GetTaggedObject())->GetHash();
in Hash() local 70 if (hash == 0) {
in Hash() 71 hash = base::RandomGenerator::GenerateIdentityHash();
in Hash() 73 ECMAObject::Cast(key.GetTaggedObject())->SetHash(thread, hash, ecmaObj);
in Hash() 75 return hash;
in Hash() 89 void InitLinkedNode(JSThread *thread, int hash, JSHandle<JSTaggedValue> key,
in InitLinkedNode() argument 93 InitTaggedNode(thread, hash, key, value);
in InitLinkedNode() 136 void InitRBTreeNode(JSThread *thread, int hash, JSHandl [all...] |
H A D | tagged_hash_array.cpp | 34 JSTaggedValue TaggedHashArray::GetNode(JSThread *thread, int hash, JSTaggedValue key) in GetNode() argument 38 JSTaggedValue nodeValue = Get(((nodeLength - 1) & hash)); in GetNode() 39 JSTaggedValue hashValue = JSTaggedValue(hash); in GetNode() 46 return RBTreeNode::GetTreeNode(thread, node, hash, handleKey); in GetNode() 60 JSHandle<LinkedNode> TaggedHashArray::NewLinkedNode(JSThread *thread, int hash, JSHandle<JSTaggedValue> key, in NewLinkedNode() argument 65 return factory->NewLinkedNode(hash, key, value, hole); in NewLinkedNode() 75 JSHandle<RBTreeNode> TaggedHashArray::NewTreeNode(JSThread *thread, int hash, JSHandle<JSTaggedValue> key, in NewTreeNode() argument 79 return factory->NewTreeNode(hash, key, value); in NewTreeNode() 89 void TaggedHashArray::TreeingBin(JSThread *thread, const JSHandle<TaggedHashArray> &tab, int hash) in TreeingBin() argument 93 uint32_t index = (length - 1) & hash; in TreeingBin() 169 SetVal(JSThread *thread, JSHandle<TaggedHashArray> table, int hash, JSHandle<JSTaggedValue> key, JSHandle<JSTaggedValue> value) SetVal() argument 217 RemoveNode(JSThread *thread, int hash, JSTaggedValue key) RemoveNode() argument [all...] |
H A D | tagged_hash_array.h | 40 static JSTaggedValue SetVal(JSThread *thread, JSHandle<TaggedHashArray> table, int hash, 44 static JSHandle<LinkedNode> NewLinkedNode(JSThread *thread, int hash, JSHandle<JSTaggedValue> key, 47 static JSHandle<RBTreeNode> NewTreeNode(JSThread *thread, int hash, JSHandle<JSTaggedValue> key, 52 JSTaggedValue GetNode(JSThread *thread, int hash, JSTaggedValue key); 53 JSTaggedValue RemoveNode(JSThread *thread, int hash, JSTaggedValue key); 62 static void TreeingBin(JSThread *thread, const JSHandle<TaggedHashArray> &tab, int hash);
|
H A D | ecma_string.cpp | 544 uint32_t hash[blockSize] = {0}; in CalculateDataConcatHashCode() local 547 hash[0] = (hash[0] << hashShift) - hash[0] + dataFirst[index]; in CalculateDataConcatHashCode() 548 hash[1] = (hash[1] << hashShift) - hash[1] + dataFirst[index + 1]; // 1: the second element in CalculateDataConcatHashCode() 549 hash[2] = (hash[2] << hashShift) - hash[ in CalculateDataConcatHashCode() 872 HashIntegerString(uint32_t length, uint32_t *hash, const uint32_t hashSeed) const HashIntegerString() argument 888 uint32_t hash = 0; ComputeRawHashcode() local 917 uint32_t hash; ComputeHashcode() local 953 uint32_t hash = ComputeHashForData(utf8Data, utf8Len, 0); ComputeHashcodeUtf8() local 961 uint32_t hash = ComputeHashForData(tmpBuffer.data(), utf16Len, 0); ComputeHashcodeUtf8() local 976 uint32_t hash = ComputeHashForData(utf16Data, length, 0); ComputeHashcodeUtf16() local [all...] |
/arkcompiler/ets_runtime/ecmascript/ts_types/ |
H A D | global_type_info.h | 70 return std::hash<const JSPandaFile*>()(id.GetJSPandaFile()) ^ in operator ()() 71 std::hash<uint64_t>()(id.GetPGOTypeId().GetProfileType().GetRaw()); in operator ()() 73 return std::hash<const JSPandaFile*>()(id.GetJSPandaFile()) ^ in operator ()() 74 std::hash<uint64_t>()(id.GetTypeId()); in operator ()() 121 return std::hash<const JSPandaFile*>()(loc.GetJSPandaFile()) ^ in operator ()() 122 std::hash<uint32_t>()(loc.GetMethodOffset()) ^ in operator ()() 123 std::hash<int32_t>()(loc.GetBcIdx()); in operator ()()
|
/arkcompiler/ets_runtime/ecmascript/patch/ |
H A D | patch_loader.h | 41 return std::hash<uint32_t>{}(baseMethodIndex.constpoolNum) ^ (std::hash<uint32_t>{}( in operator ()() 42 baseMethodIndex.constpoolIndex) << 1) ^ std::hash<uint32_t>{}(baseMethodIndex.literalIndex); in operator ()() 60 return std::hash<CString>{}(patchMethodIndex.recordName) ^ in operator ()() 61 std::hash<CString>{}(patchMethodIndex.className) ^ std::hash<CString>{}(patchMethodIndex.methodName); in operator ()() 78 return std::hash<EntityId>{}(replacedMethod.methodId) ^ std::hash<CString>{}(replacedMethod.fileName); in operator ()()
|
/arkcompiler/runtime_core/static_core/compiler/optimizer/optimizations/ |
H A D | branch_elimination.h | 41 uint32_t hash = std::hash<Inst *> {}(obj.lhs); in operator ()() local 42 hash += std::hash<Inst *> {}(obj.rhs); in operator ()() 43 return hash; in operator ()()
|
/arkcompiler/ets_frontend/es2panda/util/ |
H A D | moduleHelpers.cpp | 19 #include <libpandabase/utils/hash.h> 32 uint32_t hash = 0; in CompileNpmModuleEntryList() local 35 hash = GetHash32String(reinterpret_cast<const uint8_t *>(ss.str().c_str())); in CompileNpmModuleEntryList() 39 if (cacheProgramInfo != nullptr && cacheProgramInfo->hashCode == hash) { in CompileNpmModuleEntryList() 40 auto *cache = allocator->New<util::ProgramCache>(hash, std::move(cacheProgramInfo->program)); in CompileNpmModuleEntryList() 68 auto *cache = allocator->New<util::ProgramCache>(hash, std::move(*prog), true); in CompileNpmModuleEntryList()
|
/arkcompiler/ets_runtime/ecmascript/ic/ |
H A D | properties_cache.h | 32 int hash = Hash(jsHclass, key); in Get() local 33 PropertyKey &prop = keys_[hash]; in Get() 35 return keys_[hash].results_; in Get() 41 int hash = Hash(jsHclass, key); in Set() local 42 PropertyKey &prop = keys_[hash]; in Set() 45 keys_[hash].results_ = index; in Set()
|
/arkcompiler/ets_runtime/ecmascript/compiler/ |
H A D | value_numbering.cpp | 22 size_t hash = HashCode(gate); in VisitGate() local 33 SetEntry(hash, gate); in VisitGate() 40 for (size_t i = hash & mask;; i = (i + 1) & mask) { in VisitGate() 147 size_t hash = HashCombine(static_cast<size_t>(acc_.GetOpCode(gate)), valueCount); in HashCode() local 151 hash = HashCombine(hash, id); in HashCode() 153 return hash; in HashCode()
|
/arkcompiler/ets_runtime/ecmascript/js_api/ |
H A D | js_api_hashset.cpp | 40 int hash = TaggedNode::Hash(thread, value); in Has() local 41 return JSTaggedValue(!(hashArray->GetNode(thread, hash, value).IsHole())); in Has() 54 int hash = TaggedNode::Hash(thread, value.GetTaggedValue()); in Add() local 56 JSTaggedValue setValue = TaggedHashArray::SetVal(thread, hashArray, hash, value, nullHandle); in Add() 94 uint32_t hash = static_cast<uint32_t>(TaggedNode::Hash(thread, key)); in Remove() local 95 JSTaggedValue removeValue = hashArray->RemoveNode(thread, hash, key); in Remove() 102 uint32_t index = (length - 1) & hash; in Remove()
|
H A D | js_api_hashmap.cpp | 32 int hash = TaggedNode::Hash(thread, key); in HasKey() local 33 return JSTaggedValue(!(hashArray->GetNode(thread, hash, key).IsHole())); in HasKey() 95 int hash = TaggedNode::Hash(thread, key); in Replace() local 96 JSTaggedValue nodeVa = hashArray->GetNode(thread, hash, key); in Replace() 119 int hash = TaggedNode::Hash(thread, key.GetTaggedValue()); in Set() local 120 JSTaggedValue setValue = TaggedHashArray::SetVal(thread, hashArray, hash, key, value); in Set() 135 int hash = TaggedNode::Hash(thread, key); in Get() local 136 JSTaggedValue node = hashArray->GetNode(thread, hash, key); in Get() 216 uint32_t hash = static_cast<uint32_t>(TaggedNode::Hash(thread, key)); in Remove() local 217 JSHandle<JSTaggedValue> removeValue(thread, hashArray->RemoveNode(thread, hash, ke in Remove() [all...] |
H A D | js_api_lightweightmap.cpp | 81 JSHandle<JSTaggedValue> hashHandle(thread, JSTaggedValue(keyState.hash)); 115 int32_t hash = 0; in HasAll() local 119 hash = Hash(thread, dealKey); in HasAll() 120 index = BinarySearchHashes(oldHashArray, hash, static_cast<int32_t>(len)); in HasAll() 125 index = AvoidHashCollision(params, index, len, hash); in HasAll() 165 int32_t hash = Hash(thread, key.GetTaggedValue()); in GetStateOfKey() local 168 int32_t index = BinarySearchHashes(hashArray, hash, length); in GetStateOfKey() 173 while ((right < length) && (hashArray->Get(right).GetInt() == hash)) { in GetStateOfKey() 175 return KeyState {true, hash, right}; in GetStateOfKey() 180 while ((left >= 0) && ((hashArray->Get(left).GetInt() == hash))) { in GetStateOfKey() 330 AvoidHashCollision(HashParams ¶ms, int32_t index, uint32_t size, int32_t hash) AvoidHashCollision() argument 476 uint32_t hash = static_cast<uint32_t>(ECMAObject::Cast(key.GetTaggedObject())->GetHash()); Hash() local 485 int32_t hash = key.GetInt(); Hash() local 496 BinarySearchHashes(JSHandle<TaggedArray> &array, int32_t hash, int32_t size) BinarySearchHashes() argument [all...] |
/arkcompiler/runtime_core/static_core/tests/fuzztest/openfrommemory2arg_fuzzer/ |
H A D | openfrommemory2arg_fuzzer.cpp | 26 std::hash<const uint8_t *> hash; in OpenFromMemory2ArgFuzzTest() local 27 ark::panda_file::File::OpenFromMemory(std::move(ptr), std::to_string(hash(data))); in OpenFromMemory2ArgFuzzTest()
|
/arkcompiler/runtime_core/tests/fuzztest/openfrommemory2arg_fuzzer/ |
H A D | openfrommemory2arg_fuzzer.cpp | 26 std::hash<const uint8_t *> hash; in OpenFromMemory2ArgFuzzTest() local 27 panda::panda_file::File::OpenFromMemory(std::move(ptr), std::to_string(hash(data))); in OpenFromMemory2ArgFuzzTest()
|
/arkcompiler/ets_runtime/ecmascript/regexp/ |
H A D | regexp_parser_cache.cpp | 48 size_t hash = GetHash(pattern, flags); in GetCache() local 49 ParserKey &info = info_[hash]; in GetCache() 62 size_t hash = GetHash(pattern, flags); in SetCache() local 63 ParserKey &info = info_[hash]; in SetCache()
|
/arkcompiler/runtime_core/static_core/dprof/libstorage/dprof/ |
H A D | storage.h | 33 static std::unique_ptr<AppData> CreateByParams(const std::string &name, uint64_t hash, uint32_t pid, 46 return commonInfo_.hash; in GetHash() 67 uint64_t hash {}; 92 std::string MakeAppPath(const std::string &name, uint64_t hash, uint32_t pid) const;
|