ObjFW  Diff

Differences From Artifact [bdd53fa1db]:

  • File src/runtime/runtime-private.h — part of check-in [1ebb9eb7b3] at 2014-05-15 15:32:35 on branch trunk — Multiple dtable / sparse array improvements

    * dtable.m is now the old sparse array, using IMP as type for values and
    thus not violating the C standard anymore (functions may not be stored
    in void*)
    * New sparsearray.m which can work with any size, based on the sparse
    array from the fast path of class.m
    * Fast path of class.m now uses the new sparsearray.m (user: js, size: 5963) [annotate] [blame] [check-ins using]

To Artifact [31a1b9496e]:


135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
extern struct objc_hashtable* objc_hashtable_new(uint32_t (*)(const void*),
    bool (*)(const void*, const void*), uint32_t);
extern struct objc_hashtable_bucket objc_deleted_bucket;
extern void objc_hashtable_set(struct objc_hashtable*, const void*,
    const void*);
extern void* objc_hashtable_get(struct objc_hashtable*, const void*);
extern void objc_hashtable_delete(struct objc_hashtable*, const void*);
extern void objc_hashtable_free(struct objc_hashtable *h);
extern void objc_register_selector(struct objc_abi_selector*);
extern void objc_register_all_selectors(struct objc_abi_symtab*);
extern void objc_unregister_all_selectors(void);
extern struct objc_sparsearray *objc_sparsearray_new(uint_fast8_t);
extern void *objc_sparsearray_get(struct objc_sparsearray*, uintptr_t);
extern void objc_sparsearray_set(struct objc_sparsearray*, uintptr_t, void*);
extern void objc_sparsearray_free(struct objc_sparsearray*);
extern struct objc_dtable* objc_dtable_new(void);
extern void objc_dtable_copy(struct objc_dtable*, struct objc_dtable*);
extern void objc_dtable_set(struct objc_dtable*, uint32_t, IMP);
extern void objc_dtable_free(struct objc_dtable*);
extern void objc_dtable_cleanup(void);







|



|
|







135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
extern struct objc_hashtable* objc_hashtable_new(uint32_t (*)(const void*),
    bool (*)(const void*, const void*), uint32_t);
extern struct objc_hashtable_bucket objc_deleted_bucket;
extern void objc_hashtable_set(struct objc_hashtable*, const void*,
    const void*);
extern void* objc_hashtable_get(struct objc_hashtable*, const void*);
extern void objc_hashtable_delete(struct objc_hashtable*, const void*);
extern void objc_hashtable_free(struct objc_hashtable*);
extern void objc_register_selector(struct objc_abi_selector*);
extern void objc_register_all_selectors(struct objc_abi_symtab*);
extern void objc_unregister_all_selectors(void);
extern struct objc_sparsearray* objc_sparsearray_new(uint_fast8_t);
extern void* objc_sparsearray_get(struct objc_sparsearray*, uintptr_t);
extern void objc_sparsearray_set(struct objc_sparsearray*, uintptr_t, void*);
extern void objc_sparsearray_free(struct objc_sparsearray*);
extern struct objc_dtable* objc_dtable_new(void);
extern void objc_dtable_copy(struct objc_dtable*, struct objc_dtable*);
extern void objc_dtable_set(struct objc_dtable*, uint32_t, IMP);
extern void objc_dtable_free(struct objc_dtable*);
extern void objc_dtable_cleanup(void);