Loading...
--- dyld/dyld-655.1/include/objc-shared-cache.h
+++ dyld/dyld-421.2/include/objc-shared-cache.h
@@ -114,13 +114,13 @@
// Perfect hash code is at the end of this file.
-struct __attribute__((packed)) perfect_hash {
+struct perfect_hash {
uint32_t capacity;
uint32_t occupied;
uint32_t shift;
uint32_t mask;
uint64_t salt;
-
+
uint32_t scramble[256];
uint8_t *tab; // count == mask+1; free with delete[]
@@ -159,7 +159,7 @@
// Precomputed perfect hash table of strings.
// Base class for precomputed selector table and class table.
// Edit objc-sel-table.s if you change this structure.
-struct __attribute__((packed)) objc_stringhash_t {
+struct objc_stringhash_t {
uint32_t capacity;
uint32_t occupied;
uint32_t shift;
@@ -167,7 +167,7 @@
uint32_t unused1; // was zero
uint32_t unused2; // alignment pad
uint64_t salt;
-
+
uint32_t scramble[256];
uint8_t tab[0]; /* tab[mask+1] (always power-of-2) */
// uint8_t checkbytes[capacity]; /* check byte for each string */
@@ -581,7 +581,7 @@
objc_stringhash_offset_t *o;
o = protocolOffsets();
- for (objc_stringhash_offset_t i = 0; i < (int)capacity; i++) {
+ for (objc_stringhash_offset_t i = 0; i < capacity; i++) {
S32(o[i]);
}
@@ -1038,13 +1038,13 @@
// gencode *final; /* output, code for the final hash */
{
ub4 loga = log2u(alen); /* log based 2 of blen */
- dispatch_apply(nkeys, DISPATCH_APPLY_AUTO, ^(size_t index) {
- ub4 i = (ub4)index;
+ ub4 i;
+ for (i = 0; i < nkeys; i++) {
key *mykey = keys+i;
ub8 hash = lookup8(mykey->name_k, mykey->len_k, salt);
mykey->a_k = (loga > 0) ? (ub4)(hash >> (UB8BITS-loga)) : 0;
mykey->b_k = (blen > 1) ? (hash & (blen-1)) : 0;
- });
+ }
}
@@ -1431,7 +1431,7 @@
ub8 salt; /* a parameter to the hash function */
ub4 scramble[SCRAMBLE_LEN]; /* used in final hash function */
int ok;
- uint32_t i;
+ int i;
perfect_hash result;
/* read in the list of keywords */