lua-users home
lua-l archive

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


On Mon, Mar 13, 2017 at 10:59 AM, Martin <eden_martin_fuhrspam@gmx.de> wrote:

Generally "a, b = c, d" is not equal to "a = c; b = d" as
variables ("a" and "d") or ("b" and "c") may point to one
location.

Simple example - swap: "a, b = b, a".


Yes, multiple assignment is not equivalent to single assignments.
But I'm talking about optimization of bytecode, not Lua code.
The bytecode in my example can be optimized
by removing of intermediate register #4.