Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Draft Proposal for Namespaces in Objective-C
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Draft Proposal for Namespaces in Objective-C



Am 18.04.2012 um 17:41 schrieb Remy Demarest:

> As far as I can tell from Apple runtime code, the cache for objc_msgSend IMPs is per class and is expanded as needed.


Strange, looks to me like the cache can never get bigger than mask:

.macro  CacheLookup
[…]
        andl    mask(%r10), êx                // index &= mask
        movq    buckets(%r10, %rax, 8), %r11    // method = cache->buckets[index]
        incl    êx                            // index++
        testq   %r11, %r11                      // if (method == NULL)
        je      LCacheMiss_f                    //   goto cacheMissLabel
.if $0 != STRET
        cmpq    method_name(%r11), ¢          // if (method_name != sel)
.else
        cmpq    method_name(%r11), £          // if (method_name != sel)
.endif
        jne     1b                              //   goto loop
[…]

Am I missing something?

--
Jonathan


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Objc-language mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >Draft Proposal for Namespaces in Objective-C (From: Kyle Sluder <email@hidden>)
 >Re: Draft Proposal for Namespaces in Objective-C (From: Kyle Sluder <email@hidden>)
 >Re: Draft Proposal for Namespaces in Objective-C (From: Kyle Sluder <email@hidden>)
 >Re: Draft Proposal for Namespaces in Objective-C (From: Jonathan Schleifer <email@hidden>)
 >Re: Draft Proposal for Namespaces in Objective-C (From: Kyle Sluder <email@hidden>)
 >Re: Draft Proposal for Namespaces in Objective-C (From: Jens Ayton <email@hidden>)
 >Re: Draft Proposal for Namespaces in Objective-C (From: Uli Kusterer <email@hidden>)
 >Re: Draft Proposal for Namespaces in Objective-C (From: Ian Joyner <email@hidden>)
 >Re: Draft Proposal for Namespaces in Objective-C (From: Michael Ash <email@hidden>)
 >Re: Draft Proposal for Namespaces in Objective-C (From: Ian Joyner <email@hidden>)
 >Re: Draft Proposal for Namespaces in Objective-C (From: Kyle Sluder <email@hidden>)
 >Re: Draft Proposal for Namespaces in Objective-C (From: Remy Demarest <email@hidden>)
 >Re: Draft Proposal for Namespaces in Objective-C (From: Ken Case <email@hidden>)
 >Re: Draft Proposal for Namespaces in Objective-C (From: Ken Case <email@hidden>)
 >Re: Draft Proposal for Namespaces in Objective-C (From: Jayson Adams <email@hidden>)
 >Re: Draft Proposal for Namespaces in Objective-C (From: Jonathan Schleifer <email@hidden>)
 >Re: Draft Proposal for Namespaces in Objective-C (From: Michael Ash <email@hidden>)
 >Re: Draft Proposal for Namespaces in Objective-C (From: Jonathan Schleifer <email@hidden>)
 >Re: Draft Proposal for Namespaces in Objective-C (From: Remy Demarest <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.