[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Function void luaV_finishOp (lua_State *L)
- From: Coda Highland <chighland@...>
- Date: Mon, 8 Dec 2014 13:40:51 -0800
On Mon, Dec 8, 2014 at 1:15 PM, Rena <firstname.lastname@example.org> wrote:
> On Mon, Dec 8, 2014 at 2:05 PM, Dong Feng <email@example.com> wrote:
>> I'm trying to understand the following function.
>> void luaV_finishOp (lua_State *L)
>> The comments say it is to resume an instruction interrupted by a previous
>> yield. In its implementation, there is a switch-case for a varieties of
>> instruction types (ADD, SUB, etc.).
>> To my very limited understanding, I see only one possible code path being
>> hit, that is, the OP_CALL. Because an execution is always interrupted by a
>> call to coroutine.yield(). How come there are so many handling paths?
>> I think my understanding is quite limited so I must miss many things here.
>> Just don't know what I missed. Thank you in advance.
> Just a hunch: they might also be interrupted by debug hooks?
I was thinking metamethods -- I don't think those get processed through OP_CALL.