lua-users home
lua-l archive

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

tankxx wrote:
> I found a problem. If the frame slot was referenced by an upvalue, the
> frame slot will be broken. Is the parser aware of this and ensure the
> frame slot is safe?

This cannot happen. The parser only generates upvalues for slots
that correspond to actual variables in the source. The called
object is always copied to the first free slot and this slot is
then used as the frame slot.

Oh, and before I forget: resolving of the __call metamethod is
done before the call dispatch. So the frame slot always contains a
pointer to a function object (which makes the tag redundant).