mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
gh-109287: Desugar inst(X) to op(X); macro(X) = X (#109294)
This makes the internal representation in the code generator simpler: there's a list of ops, and a list of macros, and there's no special-casing needed for ops that aren't macros. (There's now special-casing for ops that are also macros, but that's simpler.)
This commit is contained in:
parent
47af188593
commit
a7a079798d
5 changed files with 111 additions and 164 deletions
|
@ -376,6 +376,8 @@ def write_macro_instr(
|
|||
if not parts[-1].instr.always_exits:
|
||||
if not next_instr_is_set and mac.cache_offset:
|
||||
out.emit(f"next_instr += {mac.cache_offset};")
|
||||
if parts[-1].instr.check_eval_breaker:
|
||||
out.emit("CHECK_EVAL_BREAKER();")
|
||||
out.emit("DISPATCH();")
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue