[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua Needs
- From: Tim Hill <drtimhill@...>
- Date: Sat, 1 Dec 2018 11:02:03 -0800
> On Dec 1, 2018, at 7:51 AM, Dirk Laurie <firstname.lastname@example.org> wrote:
> Op Sa. 1 Des. 2018 om 17:08 het Philippe Verdy <email@example.com> geskryf:
>> If there's something to do to the Lua engine is to rework the way upvalues are allocated: they should be on the call stack as much as possible (e.g. for up to ~250 upvalues) and not on the heap.
> The way I understand it, upvalues are not on the heap. They are on the
> main execution stack below the bottom of the current function's stack
My understanding was they start that way, but if the owning function exits they are migrated to a distinct structure to lift them “out” of the stack frame that is being discarded. Something like that Roberto probably winced since its been a while since I looked at his paper in this subject.