lua-users home
lua-l archive

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


On Wed, Jan 19, 2011 at 21:46, Tony Finch <dot@dotat.at> wrote:
> On Wed, 19 Jan 2011, Alexander Gladysh wrote:

>> Another silly question, while we're on it: is it possible, in theory,
>> to create some magical "jit.tclone()" builtin, that would make such
>> clone-on-write optimization possible?

> You can do that with a proxy table. Point __index at the table to be
> cloned, and when __newindex is called, copy everything to the proxy.

Thank you. As I noted in my original post, I'm aware of that solution.

My question is about LJ2 optimizations.

Alexander.