Skip to content

Commit 93ffb06

Browse files
Merge pull request #163 from arusuki/main
cfg: fix stack depth of TryBegin when splitting across blocks.
2 parents 21b08aa + c28dbf8 commit 93ffb06

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/bytecode/cfg.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -871,9 +871,7 @@ def from_bytecode(bytecode: _bytecode.Bytecode) -> "ControlFlowGraph":
871871
# the new one since the blocks are disconnected.
872872
if last_instr.is_final() and temp:
873873
old_block.append(TryEnd(try_begins[active_try_begin][-1]))
874-
new_tb = TryBegin(
875-
active_try_begin.target, active_try_begin.push_lasti
876-
)
874+
new_tb = active_try_begin.copy()
877875
block.append(new_tb)
878876
# Add this new TryBegin to the map to properly update
879877
# the target.

0 commit comments

Comments
 (0)