Duplicate JumpTemplate oops

This commit is contained in:
Xinlong Hu
2025-07-20 17:48:53 -05:00
parent 93d8feab21
commit da349c2fd7
@@ -54,27 +54,6 @@ class RemoveUnreachable(ControlFlowTemplate):
return node
@register_template(0, 0)
class JumpTemplate(ControlFlowTemplate):
template = T(
body=~N("jump", None).with_cond(without_instructions("CLEANUP_THROW")),
jump=N("tail", "block.").with_in_deg(1).with_cond(exact_instructions("JUMP_BACKWARD_NO_INTERRUPT"), exact_instructions("POP_JUMP_IF_TRUE")),
block=~N.tail(),
tail=N.tail(),
)
try_match = make_try_match(
{
EdgeKind.Fall: "tail",
EdgeKind.TrueJump: "block",
},
"body",
"jump",
)
to_indented_source = defer_source_to("body")
@register_template(0, 0)
class JumpTemplate(ControlFlowTemplate):
template = T(