lua-users home
lua-l archive

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


> 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.

Francesco