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
{{ message }}
Repository navigation
Set line number on the POP_TOP that follows a RETURN_GENERATOR #109923
Currently the POP_TOP of a generator doesn't get a line number.
If we give it the same line number as the RETURN_GENERATOR and RESUME, that will reduce the size of the line number table.
The missing line number also got in my way while working on #109094.
There's a test that throws into a newly created generator. The instr_ptr points to the POP_TOP and the prev_instr points to the RETURN_GENERATOR so that line number in the traceback was different.
Activity
pythongh-109923: set line number on the POP_TOP that follows a RETURN…
pythongh-109923: set line number on the POP_TOP that follows a RETURN…
markshannon commentedon Sep 27, 2023
The
POP_TOPalways comes before theRESUME, so the line number should never be visible.I agree it is worth doing in order to reduce the size of the table, but I'm curious how it helped with #109094.
iritkatriel commentedon Sep 27, 2023
There's a test that throws into a newly created generator. The instr_ptr points to the POP_TOP and the prev_instr points to the RETURN_GENERATOR so that line number in the traceback was different.
gh-109923: set line number on the POP_TOP that follows a RETURN_GENER…
pythongh-109923: set line number on the POP_TOP that follows a RETURN…
pythongh-109923: set line number on the POP_TOP that follows a RETURN…