lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> For the case of Lua 5.4, in TFORCALL R(A) holds the generator, R(A + 1)
> the state, R(A + 2) the control variable and R(A + 3) the to be closed
> variable. 
> R(A + 4) through R(A + 3 + C) will hold the local values specified in
> the for loop, returned by the generator. Am I correct about this?

Yes.


> If so, usually when a register is referring to a local then the local
> can easily be resolved by looking up the value of A in the locals list
> for that function. Am 
> I correct that in the case of TFORCALL, A is relative to the first local
> that the PC of TFORCALL falls within? (TFORCALL PC >= local startpc &&
> TFORCALL PC <= local endpc)

I did not understand your question here.

-- Roberto