lua-users home
lua-l archive

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


You're quite right. The listing should take the value of isk into consideration.

On Tue, Jul 2, 2019 at 5:53 PM Egor Skriptunoff
<egor.skriptunoff@gmail.com> wrote:
>
>
> There are two different operations: x+1 and 1+x
> They could give different results (if x has "__add" metamethod).
> But they are indistinguishable in luac output:
>
> local x
> x = x + 1
> x = 1 + x
>
>         1       [1]     VARARGPREP      0
>         2       [1]     LOADNIL         0 0     ; 1 out
>         3       [2]     ADDI            0 0 1
>         4       [3]     ADDI            0 0 1
>         5       [3]     RETURN          1 1 1   ; 0 out