[Vm-dev] Materializing BlockClosure's outerContext?

Fabio Niephaus lists at fniephaus.com
Fri Jan 4 17:11:22 UTC 2019


Hi all,

I'm trying to understand when the outerContext of a BlockClosure is
materialized in Cog. I'm assuming Cog does much better than materializing
the context at allocation time of the BlockClosure, but I wasn't able to
find that out by browsing VMMaker code.

Example: In `BlockClosureTest>>#setUp`, a BlockClosure is stored in an inst
var and then accessed later in some tests. Assuming contexts are only
materialized when necessary, how does Cog determine that the context of
this closure has escaped? In the previous example, thisContext is also
stored in an inst var. Whenever a context is stored like this, we must
consider it escaped. Does the same apply for closures? As in, must we
consider their home context escaped as soon as closures are stored
somewhere?

Cheers,
Fabio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20190104/873e7fff/attachment.html>


More information about the Vm-dev mailing list