[Vm-dev] #numTemps/tempCountOf: is not working correctly

Hernan Wilkinson hernan.wilkinson at 10pines.com
Sun Oct 21 23:02:10 UTC 2018


Thank you! now I understand :-)

On Sat, Oct 20, 2018 at 8:40 PM Levente Uzonyi <leves at caesar.elte.hu> wrote:

>
>
>
> On Sat, 20 Oct 2018, Hernan Wilkinson wrote:
>
> > It returns 1, but that method has 3 temps. The same happens with other
> methods like "(SmallInteger>>#printOn:base:length:padded:) numTemps", that
> return 9 but the method has 8 temps.
>
> That method has one temporary variable which holds the indirection vector
> containing the slots for the three variables the closure closes over.
>
> "Any closed-over variable which does change after being closed over is put
> in a heap-allocated "indirection vector" (a simple array, one element per
> closed-over variable) and the indirection vector is copied into the
> closure. All accesses to the variable are made through the indirection
> vector." -
> http://www.mirandabanda.org/cogblog/2008/07/22/closures-part-ii-the-bytecodes/
>
> Levente
>


-- 

*HernĂ¡n WilkinsonAgile Software Development, Teaching & Coaching*
*Phone: +54-011*-4893-2057
*Twitter: @HernanWilkinson*
*site: http://www.10Pines.com <http://www.10pines.com/>*
Address: Alem 896, Floor 6, Buenos Aires, Argentina
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20181021/40b5e088/attachment.html>


More information about the Vm-dev mailing list