lua-users home
lua-l archive

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


> I'm trying to figure out parser register allocation.
> 
> So we have OP_SELF A B C    R(A+1) := R(B); R(A) := R(B)[RK(C)], it
> allocates 2 registers. If I want to change R(A), I need a way to
> deallocate it so the next expression(s) can change it.
> 
> My question is, how can I deallocate R(A) without deallocating
> R(A+1)?

You will need to build a better register allocator. Lua allocates
registers following a strict stack discipline.

-- Roberto