summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorCarl Meyer <carl@oddbird.net>2023-09-14 14:28:21 (GMT)
committerGitHub <noreply@github.com>2023-09-14 14:28:21 (GMT)
commit1ce9ea0453f7dc69dd41684f3bc9310259513de8 (patch)
tree6d1b25adad30d647ea623f48424144b01a88d9f6 /Python
parent9ccd2e6aee173615012f7b8262ec890cfb1a7eb4 (diff)
downloadcpython-1ce9ea0453f7dc69dd41684f3bc9310259513de8.zip
cpython-1ce9ea0453f7dc69dd41684f3bc9310259513de8.tar.gz
cpython-1ce9ea0453f7dc69dd41684f3bc9310259513de8.tar.bz2
dump readable opcode names in flowgraph debug utility (#109392)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Diffstat (limited to 'Python')
-rw-r--r--Python/flowgraph.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/Python/flowgraph.c b/Python/flowgraph.c
index 44858b9..5ad4991 100644
--- a/Python/flowgraph.c
+++ b/Python/flowgraph.c
@@ -261,8 +261,8 @@ dump_instr(cfg_instr *i)
if (HAS_TARGET(i->i_opcode)) {
sprintf(arg, "target: %p [%d] ", i->i_target, i->i_oparg);
}
- fprintf(stderr, "line: %d, opcode: %d %s%s\n",
- i->i_loc.lineno, i->i_opcode, arg, jump);
+ fprintf(stderr, "line: %d, %s (%d) %s%s\n",
+ i->i_loc.lineno, _PyOpcode_OpName[i->i_opcode], i->i_opcode, arg, jump);
}
static inline int
@@ -2661,4 +2661,3 @@ _PyCfg_OptimizedCfgToInstructionSequence(cfg_builder *g,
return SUCCESS;
}
-