• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: About iVars declaration and property
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: About iVars declaration and property


  • Subject: Re: About iVars declaration and property
  • From: Jens Alfke <email@hidden>
  • Date: Tue, 15 Nov 2011 10:35:45 -0800

On Nov 15, 2011, at 9:55 AM, Kyle Sluder wrote:

>> FWIW I check on the llvm IRC channel and the response was "I wouldn't
>> be surprised if there are annoying edge cases, but offhand I don't see
>> any reason it couldn't be done."
>
> If it could've been done, they would have done it. The fragile base class problem is a well-understood aspect of language design, and the compiler team is full of smart people.

Yup. Rather, to be pedantic, it can be done, and they did do it, but at the cost of changes to object layout and the ABI. So to avoid breaking binary compatibility with all existing apps, they didn’t make these changes in the 32-bit x86 runtime, only newer runtimes like 64-bit and iOS.

(In a nutshell: if a class doesn’t know the size of its base class’s instance data at compile time, it can’t look up its own instance variables as constant offsets from ‘self’, so this changes the machine instructions for getting and setting instance variables.)

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: About iVars declaration and property (From: Matt Neuburg <email@hidden>)
 >Re: About iVars declaration and property (From: Torsten Curdt <email@hidden>)
 >Re: About iVars declaration and property (From: glenn andreas <email@hidden>)
 >Re: About iVars declaration and property (From: Torsten Curdt <email@hidden>)
 >Re: About iVars declaration and property (From: Kyle Sluder <email@hidden>)
 >Re: About iVars declaration and property (From: Torsten Curdt <email@hidden>)
 >Re: About iVars declaration and property (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: About iVars declaration and property
  • Next by Date: Re: About iVars declaration and property
  • Previous by thread: Re: About iVars declaration and property
  • Next by thread: Re: About iVars declaration and property
  • Index(es):
    • Date
    • Thread