lua-users home
lua-l archive

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


> Hi everyone,
> Would you give me some more detailed information about the following 
> function?
> Especially, I can't finger out the meaning of luaK_concat and 
> luaK_patchtohere.

luaK_concat concatenates two lists of pending jumps. So, the call

>   luaK_concat(fs, &escapelist, luaK_jump(fs));

will create a new jump instruction (luaK_jump) and add it to the
'escapelist'.  The luaK_patchtohere function patches all jump
instructions in the given list to jump to the current instruction
("here").  So, the call

> luaK_patchtohere(fs, escapelist);

in the end of the ifstat will make all jumps in the 'escapelist' to
jump to the end of the statement.

-- Roberto