gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CoreBase toll-free bridging


From: David Chisnall
Subject: Re: CoreBase toll-free bridging
Date: Thu, 14 Mar 2013 14:06:33 -0400

On 14 Mar 2013, at 09:09, Luboš Doležel <address@hidden> wrote:

> CF_OBJC_FUNCDISPATCH0 is something I've already seen in certain calls in 
> corebase. Now I fully understand the motivation behind it. Uff, lots of work 
> ahead!
> 
> And it doesn't use objc_msgSend(), it uses class_getMethodImplementation().

This macro predates the runtime supporting objc_msgSend(), but there's no 
reason why it couldn't be modified to use it (and would only need to be changed 
in one place).  The runtime currently support objc_msgSend() on i386, x86-64 
(SysV ABI, not Win64), and ARM (AArch32).  In the next release it will support 
MIPS (n64, possibly n32) and I plan on adding AArch64 support when I get some 
hardware to play with.

Looking at the Apple implementation, it appears that they removed the isa < 
0xffff trick some time ago.  It's almost a shame, as it's quite neat, but they 
probably found the same thing I did when I tried dealing with it: that it added 
too much extra cost to every message send to be worth it.

On a somewhat related note, I have (assuming the paperwork happens in time) an 
intern this summer working on putting an Objective-C runtime in the FreeBSD 
kernel to support Objective-C and Pragmatic Smalltalk in kernelspace.  We'll be 
looking at something similar to toll-free bridging to integrate with the 
kernel's KObj system.

David

-- Send from my Jacquard Loom




reply via email to

[Prev in Thread] Current Thread [Next in Thread]