lua-users home
lua-l archive

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


Nick Gammon wrote:
On 28/09/2006, at 9:43 PM, David Jones wrote:
[snip]
[snip]
At present, the two consecutive UNM do not seem to be eliminated:

a = - -"5"

        1       [1]     LOADK           0 -2    ; "5"
        2       [1]     UNM             0 0
        3       [1]     UNM             0 0
        4       [1]     SETGLOBAL       0 -1    ; a
        5       [1]     RETURN          0 1

Try: a = - -5

Coercion is not optimized at compile-time, I think.

--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia