112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
|
void
objc_update_dtable(Class cls)
{
struct objc_method_list *ml;
struct objc_category **cats;
unsigned int i;
if (cls->dtable == NULL) {
if (cls->superclass != Nil)
cls->dtable =
objc_sparsearray_copy(cls->superclass->dtable);
else
cls->dtable = objc_sparsearray_new();
}
for (ml = cls->methodlist; ml != NULL; ml = ml->next)
for (i = 0; i < ml->count; i++)
objc_sparsearray_set(cls->dtable,
(uint32_t)ml->methods[i].sel.uid,
ml->methods[i].imp);
|
|
<
<
<
<
|
|
>
>
|
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
|
void
objc_update_dtable(Class cls)
{
struct objc_method_list *ml;
struct objc_category **cats;
unsigned int i;
if (cls->dtable == NULL)
cls->dtable = objc_sparsearray_new();
if (cls->superclass != Nil)
objc_sparsearray_copy(cls->dtable, cls->superclass->dtable);
for (ml = cls->methodlist; ml != NULL; ml = ml->next)
for (i = 0; i < ml->count; i++)
objc_sparsearray_set(cls->dtable,
(uint32_t)ml->methods[i].sel.uid,
ml->methods[i].imp);
|