[cfe-dev] Block introspection and GNU runtime new ABI support

David Chisnall csdavec at swansea.ac.uk
Thu Sep 10 14:58:53 PDT 2009

On 10 Sep 2009, at 22:43, Blaine Garst wrote:

> We will likely initially focus on providing introspection data on  
> the captured variables rather than the parameters to the block.

This would also be of interest to us - we already have this with  
blocks generated from Smalltalk or JavaScript with LanguageKit and can  
access all of the variables in their scope using KVC.

> Both are of interest but with captured variable knowledge we can  
> avoid generating copy helper functions for almost all cases.

Yes, I can see this is would make life a lot easier.

> The reserved field in the block descriptor is the slot I intend to  
> use for captured variable knowledge.

We're not using that for anything at the moment (Remy's original code  
was using it to tell if a block was on the stack, but that's now been  
fixed to use the isa pointer, which I presume is the same solution you  

> Changing the ABI is very painful - we were unable to move the invoke  
> function into the descriptor structure as we had originally intended  
> for example, so I also advise caution.

Yes, I completely agree, which is why I'd like to get it right before  
we get people deploying code with the Darwin ABI on other platforms.   
That said, we (which, in this context, means GNUstep) won't be making  
an ABI-stable release for a couple of months, so I don't mind breaking  
things again in the next few weeks if there are problems arising from  

Fariborz seems to have committed the patches before any consensus was  
reached - I'd be happy if someone wants to revert it until everyone is  
happy with the proposed changes and I'll commit it later after any  
review comments have been addressed.


More information about the cfe-dev mailing list