Searched refs:hash (Results 1 - 25 of 40) sorted by relevance

12

/art/compiler/driver/
H A Dcompiled_method_storage.cc94 uint32_t hash = 0; local
106 hash ^= k;
107 hash = ((hash << r2) | (hash >> (32 - r2))) * m + n;
126 hash ^= k1;
129 hash ^= len;
130 hash ^= (hash >> 16);
131 hash *
138 size_t hash = 0x811c9dc5; local
[all...]
/art/runtime/
H A Dbacktrace_helper.h71 uint64_t hash = 9314237; local
73 hash = hash * 2654435761 + frames_[i];
74 hash += (hash >> 13) ^ (hash << 6);
76 return hash;
H A Dutf.h79 uint32_t hash = 0; local
81 hash = hash * 31 + *chars++;
83 return static_cast<int32_t>(hash);
88 // Compute a hash code of a modified UTF-8 string. Not the standard java hash since it returns a
H A Dtype_lookup_table.h28 * Implementation of TypeLookupTable is based on hash table.
42 // Method search class_def_idx by class descriptor and it's hash.
44 ALWAYS_INLINE uint32_t Lookup(const char* str, uint32_t hash) const {
45 uint32_t pos = hash & GetSizeMask();
50 if (CmpHashBits(entry->data, hash) && IsStringsEquals(str, entry->str_offset)) {
87 * But we have no full hash of element of table. But we can use 2 ideas.
88 * 1. All minor bits of hash inside one bucket are equals.
89 * 2. If dex file contains N classes and size of hash table is 2^n (where N <= 2^n)
90 * then 16-n bits are free. So we can encode part of element's hash into these bits.
91 * So hash o
[all...]
H A Dutf.cc174 uint32_t hash = 0; local
178 hash = hash * 31 + first;
182 hash = hash * 31 + second;
187 return static_cast<int32_t>(hash);
191 uint32_t hash = 0; local
193 hash = hash * 31 + *chars++;
195 return static_cast<int32_t>(hash);
[all...]
H A Dtype_lookup_table.cc29 static uint16_t MakeData(uint16_t class_def_idx, uint32_t hash, uint32_t mask) { argument
31 return (static_cast<uint16_t>(hash) & hash_mask) | class_def_idx;
84 const uint32_t hash = ComputeModifiedUtf8Hash(dex_file.GetStringData(str_id)); local
87 entry.data = MakeData(i, hash, GetSizeMask());
88 if (!SetOnInitialPos(entry, hash)) {
98 const uint32_t hash = ComputeModifiedUtf8Hash(dex_file.GetStringData(str_id)); local
101 entry.data = MakeData(class_def_idx, hash, GetSizeMask());
102 Insert(entry, hash);
115 bool TypeLookupTable::SetOnInitialPos(const Entry& entry, uint32_t hash) { argument
116 const uint32_t pos = hash
125 Insert(const Entry& entry, uint32_t hash) argument
[all...]
H A Dclass_table.cc65 mirror::Class* ClassTable::UpdateClass(const char* descriptor, mirror::Class* klass, size_t hash) { argument
68 DescriptorHashPair pair(descriptor, hash);
69 auto existing_it = classes_.back().FindWithHash(pair, hash);
72 if (class_set.FindWithHash(pair, hash) != class_set.end()) {
84 // Update the element in the hash set with the new class. This is safe to do since the descriptor
86 *existing_it = TableSlot(klass, hash);
131 mirror::Class* ClassTable::Lookup(const char* descriptor, size_t hash) { argument
132 DescriptorHashPair pair(descriptor, hash);
135 auto it = class_set.FindWithHash(pair, hash);
157 const uint32_t hash local
159 classes_.back().InsertWithHash(TableSlot(klass, hash), hash); local
176 const uint32_t hash = TableSlot::HashDescriptor(klass); local
177 classes_.back().InsertWithHash(TableSlot(klass, hash), hash); local
180 InsertWithHash(ObjPtr<mirror::Class> klass, size_t hash) argument
182 classes_.back().InsertWithHash(TableSlot(klass, hash), hash); local
[all...]
H A Ddex_file_types.h101 template<> struct hash<art::dex::StringIndex> { struct in namespace:std
103 return hash<uint32_t>()(index.index_);
107 template<> struct hash<art::dex::TypeIndex> { struct in namespace:std
109 return hash<uint16_t>()(index.index_);
H A Dtype_lookup_table_test.cc49 size_t hash = ComputeModifiedUtf8Hash(descriptor); local
50 uint32_t class_def_idx = table->Lookup(descriptor, hash);
H A Dclass_table.h68 static uint32_t MaskHash(uint32_t hash) { argument
69 return hash & kHashMask;
94 // Data contains the class pointer GcRoot as well as the low bits of the descriptor hash.
168 mirror::Class* UpdateClass(const char* descriptor, mirror::Class* new_klass, size_t hash)
196 mirror::Class* Lookup(const char* descriptor, size_t hash)
215 void InsertWithHash(ObjPtr<mirror::Class> klass, size_t hash)
H A Dclass_table-inl.h128 const uint32_t hash = ComputeModifiedUtf8Hash(klass->GetDescriptor(&temp)); local
129 CHECK_EQ(descriptor_hash, hash);
/art/compiler/utils/
H A Ddedupe_set_test.cc33 size_t hash = 0; local
35 hash += c;
36 hash += hash << 10;
37 hash += hash >> 6;
39 return hash;
H A Ddedupe_set-inl.h70 const StoreKey* Add(Thread* self, size_t hash, const InKey& in_key) REQUIRES(!lock_) {
72 HashedKey<InKey> hashed_in_key(hash, &in_key);
79 keys_.Insert(HashedKey<StoreKey> { hash, store_key });
84 // HashSet<> doesn't keep entries ordered by hash, so we actually allocate memory
90 // It may have been higher before a re-hash.
116 HashedKey(size_t hash, const T* key) : hash_(hash), key_(key) { } argument
242 return android::base::StringPrintf("%zu collisions, %zu max hash collisions, "
243 "%zu/%zu probe distance, %" PRIu64 " ns hash time",
/art/test/920-objects/
H A Dobjects.cc48 jint hash; local
50 jvmtiError result = jvmti_env->GetObjectHashCode(object, &hash);
59 return hash;
/art/test/004-SignalTest/src/
H A DMain.java32 int hash = o.hashCode();
35 System.out.println("hash: " + hash);
/art/test/920-objects/src/art/
H A DTest920.java88 private int hash; field in class:Test920.MyHash
91 hash = h;
95 return hash;
/art/test/522-checker-regression-monitor-exit/src/
H A DMain.java71 int hash = obj.hashCode();
74 if (hash != result) {
75 throw new Error("Query #" + i + " wrong. Expected " + hash + ", got " + result);
/art/runtime/native/
H A Djava_lang_VMClassLoader.cc37 size_t hash,
41 return cl->LookupClass(self, descriptor, hash, class_loader);
48 size_t hash,
52 if (cl->FindClassInBaseDexClassLoader(soa, self, descriptor, hash, class_loader, &result)) {
69 // Compute hash once.
/art/runtime/base/
H A Dhash_set.h54 // Low memory version of a hash set, uses less memory than std::unordered_set since elements aren't
59 template <class T, class EmptyFn = DefaultEmptyFn<T>, class HashFn = std::hash<T>,
303 // Return true if the hash set has ownership of the underlying data.
377 iterator FindWithHash(const K& key, size_t hash) { argument
378 return iterator(this, FindIndex(key, hash));
382 const_iterator FindWithHash(const K& key, size_t hash) const {
383 return const_iterator(this, FindIndex(key, hash));
391 void InsertWithHash(const T& element, size_t hash) { argument
392 DCHECK_EQ(hash, hashfn_(element));
397 const size_t index = FirstAvailableSlot(IndexForHash(hash));
557 DCHECK_EQ(hashfn_(element), hash); local
[all...]
H A Dstl_util.h42 // because the hash_set may call the hash function on the iterator when it is
43 // advanced, which could result in the hash function trying to deference a
160 // 32-bit FNV-1a hash function suitable for std::unordered_map.
166 uint32_t hash = 2166136261u; local
168 hash = (hash ^ value) * 16777619u;
170 return hash;
H A Dhash_map.h52 class HashFn = std::hash<Key>, class Pred = std::equal_to<Key>,
H A Darena_containers.h73 typename HashFn = std::hash<T>,
80 typename HashFn = std::hash<Key>,
91 typename Hash = std::hash<Key>,
H A Dhash_set_test.cc165 // Insert some strings into the beginning of our hash set to establish an initial size
292 size_t hash = 0; local
294 hash = hash * 2 + *iter;
296 return hash;
344 // Try inserting elements until we are at our reserve size and ensure the hash set did not
/art/test/utils/python/testgen/
H A Dmixins.py113 return hash(self.get_name())
/art/compiler/
H A Delf_builder.h46 // .hash - Hash-table for .dynsym.
518 hash_(this, ".hash", SHT_HASH, SHF_ALLOC, &dynsym_, 0, sizeof(Elf_Word), sizeof(Elf_Word)),
608 // .dynstr, dynsym, .hash and .dynamic. These tests should not read loaded_size_.
695 // Cache .dynstr, .dynsym and .hash data.
733 // We do not really need a hash-table since there is so few entries.
734 // However, the hash-table is the only way the linker can actually
737 std::vector<Elf_Word> hash; local
738 hash.push_back(1); // Number of buckets.
739 hash.push_back(count); // Number of chains.
741 hash
[all...]

Completed in 1421 milliseconds

12