summaryrefslogtreecommitdiffstats
path: root/Python/flowgraph.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/flowgraph.c')
-rw-r--r--Python/flowgraph.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/Python/flowgraph.c b/Python/flowgraph.c
index 4d9ba9e..2f47e47 100644
--- a/Python/flowgraph.c
+++ b/Python/flowgraph.c
@@ -665,12 +665,6 @@ translate_jump_labels_to_targets(basicblock *entryblock)
return SUCCESS;
}
-int
-_PyCfg_JumpLabelsToTargets(cfg_builder *g)
-{
- return translate_jump_labels_to_targets(g->g_entryblock);
-}
-
static int
mark_except_handlers(basicblock *entryblock) {
#ifndef NDEBUG
@@ -2790,3 +2784,14 @@ _PyCfg_OptimizedCfgToInstructionSequence(cfg_builder *g,
return SUCCESS;
}
+
+/* This is used by _PyCompile_Assemble to fill in the jump and exception
+ * targets in a synthetic CFG (which is not the ouptut of the builtin compiler).
+ */
+int
+_PyCfg_JumpLabelsToTargets(cfg_builder *g)
+{
+ RETURN_IF_ERROR(translate_jump_labels_to_targets(g->g_entryblock));
+ RETURN_IF_ERROR(label_exception_targets(g->g_entryblock));
+ return SUCCESS;
+}