On May 21, 2010, at 8:12 AM, Fariborz Jahanian wrote:

> 
> On May 20, 2010, at 9:11 PM, John McCall wrote:
> 
>> Author: rjmccall
>> Date: Thu May 20 23:11:14 2010
>> New Revision: 104312
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=104312&view=rev
>> Log:
>> Allocate space in a block record for implicit references to the Objective C
>> 'self' variable arising from uses of the 'super' keyword.  Also reorganize
>> some code so that BlockInfo (now CGBlockInfo) can be opaque outside of
>> CGBlocks.cpp.
> 
> Is this a regression or we were not handling 'super' in blocks before; and 
> exposed by recent
> changes. If the latter, then I am wondering how the project ever worked  
> before.

Blocks IR gen makes two passes over the block.  The first pass 
(CollectBlockDeclRefInfo)
tries to collect all the block variables and build the block layout;  the 
second pass generates
IR for the block.  It turns out that very little relies on the first pass 
having found all the
variables:  there was an effort to make a global-block optimization based on 
it, but it's
commented out in the source.  But I decided that was a useful goal — eventually 
I think
we'll want/need this set to be calculated by Sema — and so I added the 
assertion.

John.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to