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
Inconsistent locations for conditional branches in while statements #122821
Activity
markshannon commentedon Aug 8, 2024
Here's my hypothesis:
This is an artifact of compiling
while cond: bodyas:and the assembler converting condition backwards jumps from
if cond goto targettoSo we end up with:
When
condisTrue, the first branch jumps fromcondtobody, but the second branch jumps fromcondtocond.Compiling
while cond: bodyas:should fix this.
GH-122821: Simplify compilation of while statements to ensure consist…
pythonGH-122821: Simplify compilation of while statements to ensure c…