Message364388
Currently the compiler can set the line number to the instruction or keep it unset (zero). Then, when create linenotab it adds entries only for set line numbers. But in rare cases (docstring or the first instruction in the module, definition of a function with default arguments, maybe more) it may add multiple entries for the same lineno even if the bytecode offset is less than 255. Seems the only effect of this is a suboptimal linenotab.
The proposed PR simplifies setting the line number in the compiler (it was the primary goal) and also fixes the above minor issue. The simplification is needed for several future changes in the compiler. |
|
Date |
User |
Action |
Args |
2020-03-17 06:54:30 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, brett.cannon, benjamin.peterson, yselivanov, pablogsal |
2020-03-17 06:54:30 | serhiy.storchaka | set | messageid: <1584428070.24.0.802483669477.issue39987@roundup.psfhosted.org> |
2020-03-17 06:54:30 | serhiy.storchaka | link | issue39987 messages |
2020-03-17 06:54:29 | serhiy.storchaka | create | |
|