[cfe-commits] [PATCH] Add -fobjc-direct-class-refs
csdavec at swan.ac.uk
Mon May 14 12:15:49 PDT 2012
On 14 May 2012, at 20:12, John McCall wrote:
> I agree that this is at least theoretically independent of the fragile ABI vs. the nonfragile ABI, although I suspect that you'd need to check both implementations to verify that they do, in fact, guarantee the correctness of this. In Darwin's runtime, at least, the nonfragile ABI reserves the right to make class references "forward", so that the address of the global symbol is not necessarily the address of the class.
That's more or less what we do for the GNUstep runtime. We always emit the call to the class lookup function, and then have an optimisation pass that turns the lookup call into a direct reference if we can prove that it will be visible, or caches the result of the call if we can't.
More information about the cfe-commits