[dmd-internals] lambdaCheckForNestedRef not catching all closure vars.

Iain Buclaw ibuclaw at ubuntu.com
Fri Apr 5 12:47:51 PDT 2013


On 5 April 2013 20:12, David Nadlinger <code at klickverbot.at> wrote:

> See http://forum.dlang.org/post/**CAP9J_**HXG8mTtnojU9YwYuSGZp1NQCdY0+**
> 7oeHyoQ2WhNR-dAuw at mail.gmail.**com<http://forum.dlang.org/post/CAP9J_HXG8mTtnojU9YwYuSGZp1NQCdY0+7oeHyoQ2WhNR-dAuw@mail.gmail.com>for a minimal example of a closure var not being detected.
>
> What is you fix?
>
> David
>
>

With my fix, the closure var *is* detected pushed into closureVars in that
bug you've posted, but needsClosure() still returns false on the function.
In gdc this means that it puts 'a' on a stack frame. And the stackstomp()
will override the value.


-- 
Iain Buclaw

*(p < e ? p++ : p) = (c & 0x0f) + '0';
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/dmd-internals/attachments/20130405/1f0b1c74/attachment.html>


More information about the dmd-internals mailing list