@@ -131,7 +131,7 @@ void *mulle_objc_object_call_super( void *obj,
131131static int _mulle_objc_universe_is_boring_method ( struct _mulle_objc_universe * universe ,
132132 mulle_objc_methodid_t methodid )
133133{
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 )
135135 return ( 0 );
136136
137137 // result can be NULL, if the search failed
@@ -357,14 +357,11 @@ void mulle_objc_object_taocheck_call( void *obj,
357357# pragma mark - normal callbacks for memorycache
358358
359359
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 )
368365{
369366 mulle_objc_implementation_t imp ;
370367 mulle_functionpointer_t p ;
@@ -410,18 +407,33 @@ static void *_mulle_objc_object_callback_class( void *obj,
410407
411408 /*->*/
412409 // do not use invoke in method calls
413- return ( ( * imp )( obj , methodid , parameter ) );
410+ return ( imp );
414411}
415412
416413
417414//
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
421417//
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 )
425437{
426438 mulle_objc_implementation_t imp ;
427439 mulle_functionpointer_t p ;
@@ -464,7 +476,22 @@ static void *_mulle_objc_object_callback_cache_collision( void *obj,
464476 break ;
465477 }
466478 }
479+ return ( imp );
480+ }
467481
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 );
468495 /*->*/
469496 return ( (* imp )( obj , methodid , parameter ));
470497}
@@ -475,9 +502,11 @@ static void *_mulle_objc_object_callback_cache_collision( void *obj,
475502// MEMO: if you see in the method trace this function not filling the cache
476503// it's because of the method trace (duh)
477504//
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 )
481510{
482511 mulle_objc_implementation_t imp ;
483512 struct _mulle_objc_method * method ;
@@ -495,21 +524,27 @@ static void *_mulle_objc_object_callback_cache_miss( void *obj,
495524 method = (* icache -> callback .refresh_method_nofail )( cls , methodid );
496525 imp = _mulle_objc_method_get_implementation ( method );
497526 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 );
498538 return ( (* imp )( obj , methodid , parameter ));
499539}
500540
501541
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 )
513548{
514549 mulle_objc_implementation_t imp ;
515550 struct _mulle_objc_cache * cache ;
@@ -546,17 +581,39 @@ static void *
546581 }
547582 offset += sizeof ( struct _mulle_objc_cacheentry );
548583 }
584+ return ( imp );
549585/*->*/
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 );
550607 return ( (* imp )( obj , methodid , parameter ));
551608}
552609
553610
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 )
560617{
561618 mulle_objc_implementation_t imp ;
562619 struct _mulle_objc_cache * cache ;
@@ -594,16 +651,34 @@ static void *
594651 break ;
595652 }
596653 }
597- return ( ( * imp )( obj , methodid , parameter ) );
654+ return ( imp );
598655}
599656
600657
601658static 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 )
607682{
608683 mulle_objc_implementation_t imp ;
609684 struct _mulle_objc_method * method ;
@@ -617,6 +692,24 @@ static void *
617692 method = (* icache -> callback .refresh_supermethod_nofail )( cls , superid );
618693 imp = _mulle_objc_method_get_implementation ( method );
619694 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 );
620713 return ( (* imp )( obj , methodid , parameter ));
621714}
622715
0 commit comments