ObjFW  Diff

Differences From Artifact [9bd5d20560]:

To Artifact [e741aba66a]:


584
585
586
587
588
589
590

591

592
593
594
595
596
597
598



599
600
601
602
603

604
605

606
607
608

609
610
611
612



613
614
615
616
617
618

619
620

621
622
623

624
625
626
627



628
629
630
631
632
633
634
584
585
586
587
588
589
590
591

592
593





594
595
596
597
598
599
600
601
602
603
604

605
606


607




608
609
610
611
612
613
614
615
616
617
618

619
620


621




622
623
624
625
626
627
628
629
630
631







+
-
+

-
-
-
-
-

+
+
+





+

-
+

-
-
+
-
-
-
-
+
+
+






+

-
+

-
-
+
-
-
-
-
+
+
+







- (IMP)methodForSelector: (SEL)selector
{
	return class_getMethodImplementation(object_getClass(self), selector);
}

- (id)performSelector: (SEL)selector
{
#if defined(OF_OBJFW_RUNTIME)
	id (*imp)(id, SEL) = (id(*)(id, SEL))[self methodForSelector: selector];
	id (*imp)(id, SEL) = (id(*)(id, SEL))objc_msg_lookup(self, selector);

	if OF_UNLIKELY (imp == NULL) {
		[self doesNotRecognizeSelector: selector];
		abort();
	}

	return imp(self, selector);
#elif defined(OF_APPLE_RUNTIME)
	return objc_msgSend(self, selector);
#endif
}

- (id)performSelector: (SEL)selector
	   withObject: (id)object
{
#if defined(OF_OBJFW_RUNTIME)
	id (*imp)(id, SEL, id) =
	    (id(*)(id, SEL, id))[self methodForSelector: selector];
	    (id(*)(id, SEL, id))objc_msg_lookup(self, selector);

	if OF_UNLIKELY (imp == NULL) {
		[self doesNotRecognizeSelector: selector];
	return imp(self, selector, object);
		abort();
	}

	return imp(self, selector, object);
#elif defined(OF_APPLE_RUNTIME)
	return objc_msgSend(self, selector, object);
#endif
}

- (id)performSelector: (SEL)selector
	   withObject: (id)object1
	   withObject: (id)object2
{
#if defined(OF_OBJFW_RUNTIME)
	id (*imp)(id, SEL, id, id) =
	    (id(*)(id, SEL, id, id))[self methodForSelector: selector];
	    (id(*)(id, SEL, id, id))objc_msg_lookup(self, selector);

	if OF_UNLIKELY (imp == NULL) {
		[self doesNotRecognizeSelector: selector];
	return imp(self, selector, object1, object2);
		abort();
	}

	return imp(self, selector, object1, object2);
#elif defined(OF_APPLE_RUNTIME)
	return objc_msgSend(self, selector, object1, object2);
#endif
}

- (void)performSelector: (SEL)selector
	     afterDelay: (double)delay
{
	void *pool = objc_autoreleasePoolPush();