lua-users home
lua-l archive

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


Hi:

On Wed, Jun 11, 2014 at 5:59 PM, Thiago L. <fakedme@gmail.com> wrote:
> The Lua VM is too big. I have an idea of how to make it smaller, with 2
> breaking changes and 2 backwards-compatible changes:
>
> Breaking changes:
> 1. Remove OP_ADD (use `-(-x-y)` instead) [breaks/removes `__add` metamethod]
> 2. Remove OP_MUL (use `x/(1/y)` instead) [breaks/removes `__mul` metamethod]

You forgot to remove OP_NEG ( use 0-x instead )

Francisco Olarte.