The source line numbers assigned to main chunk's instructions are:
, , , , .
These line numbers are designed for using in Lua debuggers
as a list of breakpointable lines.
As you see, the sequence of these line# is NOT monotonic.
During the program execution under a debugger, the cursor
(the line in the source text corresponding to the current VM instruction)
would jump down and then up and then again down,
although the program doesn't have gotos/loops.
This is not nice.
More serious problem is that if user sets a breakpoint at line#4
to catch the moment when the function f is exiting
(line#4 is the instruction RETURN inside function f),
the breakpoint will be triggered
NOT during the first invocation of the function f (as user expects),
but on the definition of function f.
Such behavior is obviously wrong.
It's very strange that the CLOSURE instruction corresponds
to the LAST line of the function being created.
To make things look more naturally, CLOSURE instruction should have
its line# pointing to the FIRST line of the function.