> How many stack slots do I have available when __close is called?
In any realistic use, the code needs to call something to "acquire a
resource" in an _expression_:
local <toclose> x = <acquire a resource>
So, if that call worked, there is at least one stack slot available
to release that resource.
Of course, we can come up with some weird (at least in my view)
code like that, to prove me wrong:
-- 'f' is a resource acquired in some different scope
local <toclose> x = f
We will try to improve on that.
It's not that strange if f is a function argument: it's not an unusual pattern at all to do something like run(newContext()).