You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2020-03-17.16:08:21.656>created_at=<Date2020-03-17.06:54:30.197>labels= ['interpreter-core', '3.9']
title='Simplify setting line numbers in the compiler'updated_at=<Date2020-03-17.16:08:21.655>user='https://github.com/serhiy-storchaka'
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.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: