/dalvik/vm/test/ |
H A D | TestHash.cpp | 18 * 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 D | HprofString.cpp | 40 u4 hash = 0; local 46 hash = hash * 31 + c; 49 return hash;
|
H A D | HprofClass.cpp | 42 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 D | CatchTable.java | 133 int hash = (start * 31) + end; 134 hash = (hash * 31) + handlers.hashCode(); 135 return hash;
|
/dalvik/dx/src/com/android/dx/dex/code/ |
H A D | CatchTable.java | 133 int hash = (start * 31) + end; 134 hash = (hash * 31) + handlers.hashCode(); 135 return hash;
|
/dalvik/vm/ |
H A D | AtomicCache.h | 97 int hash; \ 101 /* simple hash function */ \ 102 hash = (((u4)(_key1) >> 2) ^ (u4)(_key2)) & ((_cacheSize)-1); \ 103 pEntry = (_cache)->entries + hash; \
|
H A D | UtfString.cpp | 77 * 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 D | Hash.h | 17 * 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 D | Native.cpp | 147 * 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 D | Annotation.java | 92 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 D | Annotation.java | 84 int hash = type.hashCode(); 85 hash = (hash * 31) + elements.hashCode(); 86 hash = (hash * 31) + visibility.hashCode(); 87 return hash;
|
/dalvik/libdex/ |
H A D | DexFile.cpp | 155 * 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 D | ZipArchive.cpp | 67 * want to adjust the hash table index by a fixed amount. Using a large 74 * Convert a ZipEntry to a hash table index, verifying that it's in a 90 * Simple string hash function for non-null-terminated strings. 94 unsigned int hash = 0; local 97 hash = hash * 31 + *str++; 99 return hash; 103 * Add a new entry to the hash table. 106 unsigned int hash) 109 int ent = hash 105 addToHash(ZipArchive* pArchive, const char* str, int strLen, unsigned int hash) argument 312 unsigned int fileNameLen, extraLen, commentLen, hash; local 428 unsigned int hash = computeHash(entryName, nameLen); local [all...] |
/dalvik/vm/native/ |
H A D | InternalNative.cpp | 68 * Set up hash values on the class names. 102 u4 hash; local 104 hash = dvmComputeUtf8Hash(classDescriptor); 109 if (pClass->classDescriptorHash == hash &&
|
H A D | dalvik_system_DexFile.cpp | 77 * 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 318 u4 hash = (u4) pDexOrJar; local [all...] |
/dalvik/dexgen/src/com/android/dexgen/rop/code/ |
H A D | RegisterSpecSet.java | 89 int hash = 0; 94 hash = (hash * 31) + oneHash; 97 return hash;
|
H A D | RegisterSpec.java | 271 * @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 D | RegisterSpecSet.java | 88 int hash = 0; 93 hash = (hash * 31) + oneHash; 96 return hash;
|
H A D | RegisterSpec.java | 276 * @return the hash code 279 int hash = (local != null) ? local.hashCode() : 0; 281 hash = (hash * 31 + type.hashCode()) * 31 + reg; 282 return hash;
|
/dalvik/dexgen/src/com/android/dexgen/rop/type/ |
H A D | StdTypeList.java | 258 * @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 D | StdTypeList.java | 258 * @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 D | enc_base.cpp | 746 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 D | enc_base.h | 286 * @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 D | enc_tabl.cpp | 138 - 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 D | Class.cpp | 934 /* 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...] |