lua-users home
lua-l archive

Re: Compiler Optimizations

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


It does that, but it doesn't do some other things:
if false then
 a = 10
end;
lua -l test.lua
main <test.lua:0,0> (4 instructions, 16 bytes at 0x805fd10)
0+ params, 2 slots, 0 upvalues, 0 locals, 2 constants, 0 functions
 1 [1] JMP 2 ; to 4
 2 [2] LOADK 0 -2 ; 10
 3 [2] SETGLOBAL 0 -1 ; a
 4 [3] RETURN 0 1
I'm curious what other optimizations are done? I couldn't find a list...
-- 
-Patrick Donnelly
"One of the lessons of history is that nothing is often a good thing
to do and always a clever thing to say."
-Will Durant

AltStyle によって変換されたページ (->オリジナル) /