[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: help to (slightly) modify Lua interpreter
- From: Francesco Abbate <francesco.bbt@...>
- Date: Thu, 5 Nov 2009 19:35:18 +0100
> Currently Lua does not have opcodes to do that. The calls to metamethods
> are done automatically by the virtual machine, there is no instruction
> to explicitly call a metamethod or even to get the metatable of an
> object. So either you modify the virtual machine, adding an extra
> instruction, or you will have to generate a long (and inefficient)
> sequence of instructions equivalent to getmetatable(m).__index(m, i, j).
I think I need to modify the VM, even if it can be difficult this is
the only *real* solution to my problem.
Could you possibly give me some hints about how should I modify the
code and which functions is concerned ?
Thank you very much for the help, I appreciate a lot.