@@ -131,7 +131,7 @@ void *mulle_objc_object_call_super( void *obj,
131
131
static int _mulle_objc_universe_is_boring_method ( struct _mulle_objc_universe * universe ,
132
132
mulle_objc_methodid_t methodid )
133
133
{
134
- if ( ! ( universe -> debug .method_call & MULLE_OBJC_UNIVERSE_CALL_SKIP_BORING_TRACE_BIT ) )
134
+ if ( universe -> debug .method_call & MULLE_OBJC_UNIVERSE_CALL_BORING_TRACE_BIT )
135
135
return ( 0 );
136
136
137
137
// result can be NULL, if the search failed
@@ -357,14 +357,11 @@ void mulle_objc_object_taocheck_call( void *obj,
357
357
# pragma mark - normal callbacks for memorycache
358
358
359
359
360
- //
361
- // MEMO: these callbacks obviously don't go through the memory cache vectors
362
- // again. Also here is tracing and toachecking implemented
363
- //
364
- static void * _mulle_objc_object_callback_class ( void * obj ,
365
- mulle_objc_methodid_t methodid ,
366
- void * parameter ,
367
- struct _mulle_objc_class * cls )
360
+ static inline mulle_objc_implementation_t
361
+ _mulle_objc_object_callback_class_get_implementation ( void * obj ,
362
+ mulle_objc_methodid_t methodid ,
363
+ void * parameter ,
364
+ struct _mulle_objc_class * cls )
368
365
{
369
366
mulle_objc_implementation_t imp ;
370
367
mulle_functionpointer_t p ;
@@ -410,18 +407,33 @@ static void *_mulle_objc_object_callback_class( void *obj,
410
407
411
408
/*->*/
412
409
// do not use invoke in method calls
413
- return ( ( * imp )( obj , methodid , parameter ) );
410
+ return ( imp );
414
411
}
415
412
416
413
417
414
//
418
- // this function is called, when the first inline cache check gave a
419
- // collision, it skips the first found entry. This method is put into
420
- // the method cache, you don't call it directly.
415
+ // MEMO: these callbacks obviously don't go through the memory cache vectors
416
+ // again. Also here is tracing and toachecking implemented
421
417
//
422
- static void * _mulle_objc_object_callback_cache_collision ( void * obj ,
423
- mulle_objc_methodid_t methodid ,
424
- void * parameter )
418
+ static void * _mulle_objc_object_callback_class ( void * obj ,
419
+ mulle_objc_methodid_t methodid ,
420
+ void * parameter ,
421
+ struct _mulle_objc_class * cls )
422
+ {
423
+ mulle_objc_implementation_t imp ;
424
+
425
+ imp = _mulle_objc_object_callback_class_get_implementation ( obj , methodid , parameter , cls );
426
+ /*->*/
427
+ // do not use invoke in method calls
428
+ return ( (* imp )( obj , methodid , parameter ));
429
+ }
430
+
431
+
432
+
433
+ static inline mulle_objc_implementation_t
434
+ _mulle_objc_object_callback_cache_collision_get_implementation ( void * obj ,
435
+ mulle_objc_methodid_t methodid ,
436
+ void * parameter )
425
437
{
426
438
mulle_objc_implementation_t imp ;
427
439
mulle_functionpointer_t p ;
@@ -464,7 +476,22 @@ static void *_mulle_objc_object_callback_cache_collision( void *obj,
464
476
break ;
465
477
}
466
478
}
479
+ return ( imp );
480
+ }
467
481
482
+
483
+ //
484
+ // this function is called, when the first inline cache check gave a
485
+ // collision, it skips the first found entry. This method is put into
486
+ // the method cache, you don't call it directly.
487
+ //
488
+ static void * _mulle_objc_object_callback_cache_collision ( void * obj ,
489
+ mulle_objc_methodid_t methodid ,
490
+ void * parameter )
491
+ {
492
+ mulle_objc_implementation_t imp ;
493
+
494
+ imp = _mulle_objc_object_callback_cache_collision_get_implementation ( obj , methodid , parameter );
468
495
/*->*/
469
496
return ( (* imp )( obj , methodid , parameter ));
470
497
}
@@ -475,9 +502,11 @@ static void *_mulle_objc_object_callback_cache_collision( void *obj,
475
502
// MEMO: if you see in the method trace this function not filling the cache
476
503
// it's because of the method trace (duh)
477
504
//
478
- static void * _mulle_objc_object_callback_cache_miss ( void * obj ,
479
- mulle_objc_methodid_t methodid ,
480
- void * parameter )
505
+
506
+ static inline mulle_objc_implementation_t
507
+ _mulle_objc_object_callback_cache_miss_get_implementation ( void * obj ,
508
+ mulle_objc_methodid_t methodid ,
509
+ void * parameter )
481
510
{
482
511
mulle_objc_implementation_t imp ;
483
512
struct _mulle_objc_method * method ;
@@ -495,21 +524,27 @@ static void *_mulle_objc_object_callback_cache_miss( void *obj,
495
524
method = (* icache -> callback .refresh_method_nofail )( cls , methodid );
496
525
imp = _mulle_objc_method_get_implementation ( method );
497
526
imp = _mulle_objc_implementation_debug ( imp , obj , methodid , parameter , cls );
527
+ return ( imp );
528
+ }
529
+
530
+
531
+ static void * _mulle_objc_object_callback_cache_miss ( void * obj ,
532
+ mulle_objc_methodid_t methodid ,
533
+ void * parameter )
534
+ {
535
+ mulle_objc_implementation_t imp ;
536
+
537
+ imp = _mulle_objc_object_callback_cache_miss_get_implementation ( obj , methodid , parameter );
498
538
return ( (* imp )( obj , methodid , parameter ));
499
539
}
500
540
501
541
502
- //
503
- // This function is called, when the first inline cache check gave a
504
- // collision, it skips the first found entry. This is not called directly
505
- // but placed into the method cache.
506
- //
507
- static void *
508
- _mulle_objc_object_callback_super ( void * obj ,
509
- mulle_objc_methodid_t methodid ,
510
- void * parameter ,
511
- mulle_objc_superid_t superid ,
512
- struct _mulle_objc_class * cls )
542
+ static inline mulle_objc_implementation_t
543
+ _mulle_objc_object_callback_super_get_implementation ( void * obj ,
544
+ mulle_objc_methodid_t methodid ,
545
+ void * parameter ,
546
+ mulle_objc_superid_t superid ,
547
+ struct _mulle_objc_class * cls )
513
548
{
514
549
mulle_objc_implementation_t imp ;
515
550
struct _mulle_objc_cache * cache ;
@@ -546,17 +581,39 @@ static void *
546
581
}
547
582
offset += sizeof ( struct _mulle_objc_cacheentry );
548
583
}
584
+ return ( imp );
549
585
/*->*/
586
+ }
587
+
588
+ //
589
+ // This function is called, when the first inline cache check gave a
590
+ // collision, it skips the first found entry. This is not called directly
591
+ // but placed into the method cache.
592
+ //
593
+ static void *
594
+ _mulle_objc_object_callback_super ( void * obj ,
595
+ mulle_objc_methodid_t methodid ,
596
+ void * parameter ,
597
+ mulle_objc_superid_t superid ,
598
+ struct _mulle_objc_class * cls )
599
+ {
600
+ mulle_objc_implementation_t imp ;
601
+
602
+ imp = _mulle_objc_object_callback_super_get_implementation ( obj ,
603
+ methodid ,
604
+ parameter ,
605
+ superid ,
606
+ cls );
550
607
return ( (* imp )( obj , methodid , parameter ));
551
608
}
552
609
553
610
554
- static void *
555
- _mulle_objc_object_callback_super_cache_collision ( void * obj ,
556
- mulle_objc_methodid_t methodid ,
557
- void * parameter ,
558
- mulle_objc_superid_t superid ,
559
- struct _mulle_objc_class * cls )
611
+ static inline mulle_objc_implementation_t
612
+ _mulle_objc_object_callback_super_cache_collision_get_implementation ( void * obj ,
613
+ mulle_objc_methodid_t methodid ,
614
+ void * parameter ,
615
+ mulle_objc_superid_t superid ,
616
+ struct _mulle_objc_class * cls )
560
617
{
561
618
mulle_objc_implementation_t imp ;
562
619
struct _mulle_objc_cache * cache ;
@@ -594,16 +651,34 @@ static void *
594
651
break ;
595
652
}
596
653
}
597
- return ( ( * imp )( obj , methodid , parameter ) );
654
+ return ( imp );
598
655
}
599
656
600
657
601
658
static void *
602
- _mulle_objc_object_callback_super_cache_miss ( void * obj ,
603
- mulle_objc_methodid_t methodid ,
604
- void * parameter ,
605
- mulle_objc_superid_t superid ,
606
- struct _mulle_objc_class * cls )
659
+ _mulle_objc_object_callback_super_cache_collision ( void * obj ,
660
+ mulle_objc_methodid_t methodid ,
661
+ void * parameter ,
662
+ mulle_objc_superid_t superid ,
663
+ struct _mulle_objc_class * cls )
664
+ {
665
+ mulle_objc_implementation_t imp ;
666
+
667
+ imp = _mulle_objc_object_callback_super_cache_collision_get_implementation ( obj ,
668
+ methodid ,
669
+ parameter ,
670
+ superid ,
671
+ cls );
672
+ return ( (* imp )( obj , methodid , parameter ));
673
+ }
674
+
675
+
676
+ static inline mulle_objc_implementation_t
677
+ _mulle_objc_object_callback_super_cache_miss_get_implementation ( void * obj ,
678
+ mulle_objc_methodid_t methodid ,
679
+ void * parameter ,
680
+ mulle_objc_superid_t superid ,
681
+ struct _mulle_objc_class * cls )
607
682
{
608
683
mulle_objc_implementation_t imp ;
609
684
struct _mulle_objc_method * method ;
@@ -617,6 +692,24 @@ static void *
617
692
method = (* icache -> callback .refresh_supermethod_nofail )( cls , superid );
618
693
imp = _mulle_objc_method_get_implementation ( method );
619
694
imp = _mulle_objc_implementation_debug ( imp , obj , methodid , parameter , cls );
695
+ return ( imp );
696
+ }
697
+
698
+
699
+ static void *
700
+ _mulle_objc_object_callback_super_cache_miss ( void * obj ,
701
+ mulle_objc_methodid_t methodid ,
702
+ void * parameter ,
703
+ mulle_objc_superid_t superid ,
704
+ struct _mulle_objc_class * cls )
705
+ {
706
+ mulle_objc_implementation_t imp ;
707
+
708
+ imp = _mulle_objc_object_callback_super_cache_miss_get_implementation ( obj ,
709
+ methodid ,
710
+ parameter ,
711
+ superid ,
712
+ cls );
620
713
return ( (* imp )( obj , methodid , parameter ));
621
714
}
622
715
0 commit comments