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

1234

/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 Dtype_lookup_table.h30 * Implementation of TypeLookupTable is based on hash table.
44 // Method search class_def_idx by class descriptor and it's hash.
46 uint32_t Lookup(const char* str, uint32_t hash) const {
47 uint32_t pos = hash & GetSizeMask();
52 if (CmpHashBits(entry->data, hash) && IsStringsEquals(str, entry->str_offset)) {
89 * But we have no full hash of element of table. But we can use 2 ideas.
90 * 1. All minor bits of hash inside one bucket are equals.
91 * 2. If dex file contains N classes and size of hash table is 2^n (where N <= 2^n)
92 * then 16-n bits are free. So we can encode part of element's hash into these bits.
93 * So hash o
[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.cc66 mirror::Class* ClassTable::UpdateClass(const char* descriptor, mirror::Class* klass, size_t hash) { argument
69 DescriptorHashPair pair(descriptor, hash);
70 auto existing_it = classes_.back().FindWithHash(pair, hash);
73 if (class_set.FindWithHash(pair, hash) != class_set.end()) {
85 // Update the element in the hash set with the new class. This is safe to do since the descriptor
87 *existing_it = TableSlot(klass, hash);
132 mirror::Class* ClassTable::Lookup(const char* descriptor, size_t hash) { argument
133 DescriptorHashPair pair(descriptor, hash);
136 auto it = class_set.FindWithHash(pair, hash);
158 const uint32_t hash local
160 classes_.back().InsertWithHash(TableSlot(klass, hash), hash); local
177 const uint32_t hash = TableSlot::HashDescriptor(klass); local
178 classes_.back().InsertWithHash(TableSlot(klass, hash), hash); local
181 InsertWithHash(ObjPtr<mirror::Class> klass, size_t hash) argument
183 classes_.back().InsertWithHash(TableSlot(klass, hash), hash); local
[all...]
H A Dtype_lookup_table_test.cc47 size_t hash = ComputeModifiedUtf8Hash(descriptor); local
48 uint32_t class_def_idx = table->Lookup(descriptor, hash);
H A Dclass_table.h75 static uint32_t MaskHash(uint32_t hash) { argument
76 return hash & kHashMask;
101 // Data contains the class pointer GcRoot as well as the low bits of the descriptor hash.
175 mirror::Class* UpdateClass(const char* descriptor, mirror::Class* new_klass, size_t hash)
203 mirror::Class* Lookup(const char* descriptor, size_t hash)
222 void InsertWithHash(ObjPtr<mirror::Class> klass, size_t hash)
H A Dclass_table-inl.h130 const uint32_t hash = ComputeModifiedUtf8Hash(klass->GetDescriptor(&temp)); local
131 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.h71 const StoreKey* Add(Thread* self, size_t hash, const InKey& in_key) REQUIRES(!lock_) {
73 HashedKey<InKey> hashed_in_key(hash, &in_key);
80 keys_.Insert(HashedKey<StoreKey> { hash, store_key });
85 // HashSet<> doesn't keep entries ordered by hash, so we actually allocate memory
91 // It may have been higher before a re-hash.
117 HashedKey(size_t hash, const T* key) : hash_(hash), key_(key) { } argument
243 return android::base::StringPrintf("%zu collisions, %zu max hash collisions, "
244 "%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/compiler/driver/
H A Dcompiled_method_storage.cc96 uint32_t hash = 0; local
108 hash ^= k;
109 hash = ((hash << r2) | (hash >> (32 - r2))) * m + n;
128 hash ^= k1;
131 hash ^= len;
132 hash ^= (hash >> 16);
133 hash *
[all...]
/art/libdexfile/dex/
H A Dutf.h81 uint32_t hash = 0; local
83 hash = hash * 31 + *chars++;
85 return static_cast<int32_t>(hash);
90 // Compute a hash code of a modified UTF-8 string. Not the standard java hash since it returns a
H A Dutf.cc179 uint32_t hash = 0; local
183 hash = hash * 31 + first;
187 hash = hash * 31 + second;
192 return static_cast<int32_t>(hash);
196 uint32_t hash = 0; local
198 hash = hash * 31 + *chars++;
200 return static_cast<int32_t>(hash);
[all...]
H A Ddex_file_types.h103 template<> struct hash<art::dex::StringIndex> { struct in namespace:std
105 return hash<uint32_t>()(index.index_);
109 template<> struct hash<art::dex::TypeIndex> { struct in namespace:std
111 return hash<uint16_t>()(index.index_);
/art/libartbase/base/
H A Dutils.h247 // Hash bytes using a relatively fast hash.
249 size_t hash = 0x811c9dc5; local
251 hash = (hash * 16777619) ^ data[i];
253 hash += hash << 13;
254 hash ^= hash >> 7;
255 hash += hash <<
[all...]
H A Dstl_util.h35 // because the hash_set may call the hash function on the iterator when it is
36 // advanced, which could result in the hash function trying to deference a
125 // 32-bit FNV-1a hash function suitable for std::unordered_map.
131 uint32_t hash = 2166136261u; local
133 hash = (hash ^ value) * 16777619u;
135 return hash;
H A Dhash_set.h58 // Low memory version of a hash set, uses less memory than std::unordered_set since elements aren't
63 template <class T, class EmptyFn = DefaultEmptyFn<T>, class HashFn = std::hash<T>,
307 // Return true if the hash set has ownership of the underlying data.
381 iterator FindWithHash(const K& key, size_t hash) { argument
382 return iterator(this, FindIndex(key, hash));
386 const_iterator FindWithHash(const K& key, size_t hash) const {
387 return const_iterator(this, FindIndex(key, hash));
397 void InsertWithHash(U&& element, size_t hash) { argument
398 DCHECK_EQ(hash, hashfn_(element));
403 const size_t index = FirstAvailableSlot(IndexForHash(hash));
563 DCHECK_EQ(hashfn_(element), hash); local
[all...]
H A Dhash_map.h52 class HashFn = std::hash<Key>, class Pred = std::equal_to<Key>,
/art/openjdkjvmti/
H A Dti_breakpoint.h55 // Get the hash code of this breakpoint.
56 size_t hash() const;
87 template<> struct hash<openjdkjvmti::Breakpoint> { struct in namespace:std
89 return b.hash();
H A Dti_breakpoint.cc56 size_t Breakpoint::hash() const { function in class:openjdkjvmti::Breakpoint
57 return std::hash<uintptr_t> {}(reinterpret_cast<uintptr_t>(method_))
58 ^ std::hash<jlocation> {}(location_);
/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.cc42 size_t hash,
46 return cl->LookupClass(self, descriptor, hash, class_loader);
53 size_t hash,
57 if (cl->FindClassInBaseDexClassLoader(soa, self, descriptor, hash, class_loader, &result)) {
74 // Compute hash once.
/art/test/utils/python/testgen/
H A Dmixins.py113 return hash(self.get_name())

Completed in 5070 milliseconds

1234