[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Eris - Pluto for Lua 5.2
- From: Florian Nücke <florian@...>
- Date: Thu, 05 Sep 2013 01:20:54 +0200
As far as I remember, CallInfo.extra is used in two contexts. While
a function invocation is suspended (L->status == LUA_YIELD), the
field L->ci->extra keeps the original value for L->ci->func, because
L->ci->func has to change to "simulate" a new activation record
for whoever manipulates the suspended thread.
For a CallInfo that refers to a yieldable protected call
(ci->callstatus & CIST_YPCALL), ci->extra keeps the level
of the function being called, which is the level to restore
the stack in case of an error.
Brilliant, thanks for the quick reply. I've added context sensitive
persisting and validation based on this, and at least the test cases
still pass. Time will tell if I made a wrong assumption somewhere.