From 96f51da81e22a4d413d7d62b21c0d42591d7631b Mon Sep 17 00:00:00 2001 From: theraven Date: Mon, 3 May 2010 13:35:09 +0000 Subject: [PATCH] Commented out some premature termination code. This is a bit of a hack; we're now repeatedly adding the same methods to dtables, which is ugly. We ought instead to be able to test if something is a lazy copy. --- sendmsg.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sendmsg.c b/sendmsg.c index 3c9d8a1..ca1cae4 100644 --- a/sendmsg.c +++ b/sendmsg.c @@ -593,11 +593,15 @@ static void merge_method_list_to_class (Class class, // If we've already got the methods from this method list, we also have all // of the methods from all of the ones further along the chain, so don't // bother adding them again. + /* + * FIXME: This doesn't take into account the lazy copying stuff in the sarray. if (NULL != firstslot && + firstslot->owner == class && firstslot->method == method_list->method_list[0].method_imp) { return; } + */ // If we haven't already visited this method list, then we might not have // already visited the one after it either... if (method_list->method_next) @@ -616,7 +620,7 @@ static void merge_method_list_to_class (Class class, struct objc_slot *slot = sarray_get_safe(dtable, sel_id); struct objc_slot *superslot = sarray_get_safe(super_dtable, sel_id); - // If there is no existing slot, then just use the superclass's one + // If there is no existing slot, then just use the superclass's one. if (NULL == slot) { sarray_at_put_safe (dtable, sel_id, superslot);