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

12

/dalvik/vm/test/
H A DTestHash.cpp18 * Test the hash table functions.
76 * Some quick hash table tests.
83 u4 hash; local
97 hash = dvmComputeUtf8Hash(tmpStr);
98 dvmHashTableLookup(pTab, hash, strdup(tmpStr),
107 hash = dvmComputeUtf8Hash(tmpStr);
108 str = (const char*) dvmHashTableLookup(pTab, hash, tmpStr,
118 hash = dvmComputeUtf8Hash(tmpStr);
119 str = (const char*) dvmHashTableLookup(pTab, hash, tmpStr,
141 hash
[all...]
/dalvik/vm/hprof/
H A DHprofString.cpp40 u4 hash = 0; local
46 hash = hash * 31 + c;
49 return hash;
H A DHprofClass.cpp42 u4 hash; local
47 hash = (u4)clazz->classLoader;
49 hash = hash * 31 + c;
52 return hash;
86 /* We're using the hash table as a list.
87 * TODO: replace the hash table with a more suitable structure
/dalvik/dexgen/src/com/android/dexgen/dex/code/
H A DCatchTable.java133 int hash = (start * 31) + end;
134 hash = (hash * 31) + handlers.hashCode();
135 return hash;
/dalvik/dx/src/com/android/dx/dex/code/
H A DCatchTable.java132 int hash = (start * 31) + end;
133 hash = (hash * 31) + handlers.hashCode();
134 return hash;
/dalvik/vm/
H A DAtomicCache.h97 int hash; \
101 /* simple hash function */ \
102 hash = (((u4)(_key1) >> 2) ^ (u4)(_key2)) & ((_cacheSize)-1); \
103 pEntry = (_cache)->entries + hash; \
H A DUtfString.cpp77 * Compute a hash code on a UTF-8 string, for use with internal hash tables.
81 * I'm initializing the hash code to 1 so they *don't* match up.)
84 * the hash with the result. That way, if something encoded the same
85 * character in two different ways, the hash value would be the same. For
90 u4 hash = 1; local
93 hash = hash * 31 + *utf8Str++;
95 return hash;
199 u4 hash local
[all...]
H A DHash.h17 * General purpose hash table, used for finding classes, methods, etc.
25 /* compute the hash of an item with a specific type */
29 * Compare a hash entry with a "loose" item after their hash values match.
52 * One entry in the hash table. "data" values are expected to be (or have
69 * Expandable hash table.
101 * Clear out a hash table, freeing the contents of any used entries.
106 * Free a hash table. Performs a "clear" first.
122 * Get #of entries in hash table.
129 * Get total size of hash tabl
[all...]
H A DNative.cpp147 * We add one of these to the hash table for every library we load. The
148 * hash is on the "pathName" field.
197 u4 hash = dvmComputeUtf8Hash(pathName); local
200 ent = dvmHashTableLookup(gDvm.nativeLibs, hash, (void*)pathName,
213 u4 hash = dvmComputeUtf8Hash(pLib->pathName); local
220 return (SharedLib*)dvmHashTableLookup(gDvm.nativeLibs, hash, pLib,
/dalvik/dexgen/src/com/android/dexgen/rop/annotation/
H A DAnnotation.java92 int hash = type.hashCode();
93 hash = (hash * 31) + elements.hashCode();
94 hash = (hash * 31) + visibility.hashCode();
95 return hash;
/dalvik/dx/src/com/android/dx/rop/annotation/
H A DAnnotation.java83 int hash = type.hashCode();
84 hash = (hash * 31) + elements.hashCode();
85 hash = (hash * 31) + visibility.hashCode();
86 return hash;
/dalvik/libdex/
H A DDexFile.cpp155 * Compute a hash code on a UTF-8 string, for use with internal hash tables.
157 * This may or may not be compatible with UTF-8 hash functions used inside
165 u4 hash = 1; local
168 hash = hash * 31 + *str++;
170 return hash;
174 * Add an entry to the class lookup table. We hash the string and probe
184 u4 hash = classDescriptorHash(classDescriptor); local
186 int idx = hash
445 u4 hash; local
[all...]
H A DZipArchive.cpp78 * want to adjust the hash table index by a fixed amount. Using a large
85 * Convert a ZipEntry to a hash table index, verifying that it's in a
101 * Simple string hash function for non-null-terminated strings.
105 unsigned int hash = 0; local
108 hash = hash * 31 + *str++;
110 return hash;
114 * Add a new entry to the hash table.
117 unsigned int hash)
120 int ent = hash
116 addToHash(ZipArchive* pArchive, const char* str, int strLen, unsigned int hash) argument
378 unsigned int nameLen, extraLen, commentLen, hash; local
503 unsigned int hash = computeHash(entryName, nameLen); local
[all...]
/dalvik/vm/native/
H A DInternalNative.cpp68 * Set up hash values on the class names.
102 u4 hash; local
104 hash = dvmComputeUtf8Hash(classDescriptor);
109 if (pClass->classDescriptorHash == hash &&
H A Ddalvik_system_DexFile.cpp77 * Expects that the hash table will be *unlocked* here.
90 u4 hash = cookie;
92 void* result = dvmHashTableLookup(gDvm.userDexFiles, hash, pDexOrJar,
105 * Add given DexOrJar to the hash table of user-loaded dex files.
110 * to find it in the hash table without knowing if it's valid or
111 * not, which means we can't compute a hash value from anything
114 * bits of the pointer as the hash.
116 u4 hash = (u4) pDexOrJar; local
120 result = dvmHashTableLookup(gDvm.userDexFiles, hash, pDexOrJar,
145 * To optimize this away we could search for existing entries in the hash
319 u4 hash = (u4) pDexOrJar; local
[all...]
/dalvik/dexgen/src/com/android/dexgen/rop/code/
H A DRegisterSpecSet.java89 int hash = 0;
94 hash = (hash * 31) + oneHash;
97 return hash;
H A DRegisterSpec.java271 * @return the hash code
274 int hash = (local != null) ? local.hashCode() : 0;
276 hash = (hash * 31 + type.hashCode()) * 31 + reg;
277 return hash;
/dalvik/dx/src/com/android/dx/rop/code/
H A DRegisterSpecSet.java88 int hash = 0;
93 hash = (hash * 31) + oneHash;
96 return hash;
H A DRegisterSpec.java275 * @return the hash code
278 int hash = (local != null) ? local.hashCode() : 0;
280 hash = (hash * 31 + type.hashCode()) * 31 + reg;
281 return hash;
/dalvik/dexgen/src/com/android/dexgen/rop/type/
H A DStdTypeList.java258 * @return {@code non-null;} the hash code
262 int hash = 0;
265 hash = (hash * 31) + list.getType(i).hashCode();
268 return hash;
/dalvik/dx/src/com/android/dx/rop/type/
H A DStdTypeList.java258 * @return {@code non-null;} the hash code
262 int hash = 0;
265 hash = (hash * 31) + list.getType(i).hashCode();
268 return hash;
/dalvik/vm/compiler/codegen/x86/libenc/
H A Denc_base.cpp746 static unsigned find(Mnemonic mn, unsigned hash)
748 unsigned key = hash % COUNTOF(subHash);
751 if (_hash != hash) {
765 static void put(Mnemonic mn, unsigned hash, unsigned idx)
767 unsigned pack = hash | (idx<<16) | (mn << 24);
768 unsigned key = hash % COUNTOF(subHash);
776 const unsigned hash = opnds.hash();
777 unsigned opcodeIndex = opcodesHashMap[mn][hash];
780 opcodeIndex = find(mn, hash);
[all...]
H A Denc_base.h286 * @brief Magic number, shows a maximum value a hash code can take.
295 * @brief Empty value, used in hash-to-opcode map to show an empty slot.
413 * @brief Returns hash of the operand.
415 unsigned hash(void) const { return m_hash; }
553 unsigned hash(void) const { return m_hash; }
563 m_hash = (m_hash<<HASH_BITS_PER_OPERAND) | op.hash();
691 * @brief A table used for the fast computation of hash value.
693 * A change must be strictly balanced with hash-related functions and data
698 * @brief A table used for the fast computation of hash value.
700 * A change must be strictly balanced with hash
[all...]
H A Denc_tabl.cpp138 - a mapping between a hash value and an opcode description record for a given
143 a hash value.
147 The hash value is calculated and used as follows:
164 So, assigning lowest value to GP register, the max value of hash can be
167 The hash values to use are:
190 The max number is pretty big and the hash functions is quite rare, thus it
197 between a hash code value and opcode position for each given instruction.
202 1. Select [hash,mnemonic] => 'n'.
205 means 'invalid hash - no opcode with given characteristics'
218 hash
278 unsigned short hash = 0; local
[all...]
/dalvik/vm/oo/
H A DClass.cpp934 /* search for these criteria in the Class hash table */
957 * The class hash table lock must be held when calling here, since
1057 * Entries in the class hash table are stored as { descriptor, d-loader }
1064 * The caller must lock the hash table before calling here.
1103 * Search through the hash table to find an entry with a matching descriptor
1115 * to the hash table but are not yet fully loaded and linked. Otherwise,
1126 u4 hash; local
1130 hash = dvmComputeUtf8Hash(descriptor);
1136 found = dvmHashTableLookup(gDvm.loadedClasses, hash, &crit,
1141 * The class has been added to the hash tabl
1172 u4 hash; local
1219 u4 hash = dvmComputeUtf8Hash(clazz->descriptor); local
[all...]

Completed in 6021 milliseconds

12