gh-98831: rewrite PUSH_EXC_INFO and conditional jumps in the instruction definition DSL (#101481)

This commit is contained in:
Irit Katriel 2023-02-01 19:38:06 +00:00 committed by GitHub
parent 7840ff3cdb
commit b91b42d236
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 98 additions and 99 deletions

View file

@ -868,7 +868,7 @@ class Analyzer:
) -> None:
self.out.emit("\n#ifndef NDEBUG")
self.out.emit("static int")
self.out.emit(f"_PyOpcode_num_{direction}(int opcode, int oparg) {{")
self.out.emit(f"_PyOpcode_num_{direction}(int opcode, int oparg, bool jump) {{")
self.out.emit(" switch(opcode) {")
for instr, effect in data:
self.out.emit(f" case {instr.name}:")