summaryrefslogtreecommitdiffstats
path: root/Python/flowgraph.c
diff options
context:
space:
mode:
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>2023-05-01 21:29:30 (GMT)
committerGitHub <noreply@github.com>2023-05-01 21:29:30 (GMT)
commit80b714835d6f5e1cb8fbc486f9575b5eee9f007e (patch)
tree6bf0f1509b62e9cc9cab08df5e21b1fafc452427 /Python/flowgraph.c
parenta474e04388c2ef6aca75c26cb70a1b6200235feb (diff)
downloadcpython-80b714835d6f5e1cb8fbc486f9575b5eee9f007e.zip
cpython-80b714835d6f5e1cb8fbc486f9575b5eee9f007e.tar.gz
cpython-80b714835d6f5e1cb8fbc486f9575b5eee9f007e.tar.bz2
gh-87092: Expose assembler to unit tests (#103988)
Diffstat (limited to 'Python/flowgraph.c')
-rw-r--r--Python/flowgraph.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/Python/flowgraph.c b/Python/flowgraph.c
index 6f83a91..f79afb4 100644
--- a/Python/flowgraph.c
+++ b/Python/flowgraph.c
@@ -223,6 +223,15 @@ dump_basicblock(const basicblock *b)
}
}
}
+
+void
+_PyCfgBuilder_DumpGraph(const basicblock *entryblock)
+{
+ for (const basicblock *b = entryblock; b != NULL; b = b->b_next) {
+ dump_basicblock(b);
+ }
+}
+
#endif
@@ -592,6 +601,11 @@ translate_jump_labels_to_targets(basicblock *entryblock)
return SUCCESS;
}
+int
+_PyCfg_JumpLabelsToTargets(basicblock *entryblock)
+{
+ return translate_jump_labels_to_targets(entryblock);
+}
static int
mark_except_handlers(basicblock *entryblock) {