Skip to content

Commit cd18c36

Browse files
markshannonaisk
authored andcommitted
pythonGH-111485: Factor out tier 2 code generation from the rest of the interpreter code generator (pythonGH-112968)
1 parent 279b7f9 commit cd18c36

14 files changed

+1391
-974
lines changed

Include/internal/pycore_uop_ids.h

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Include/opcode_ids.h

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Makefile.pre.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1589,7 +1589,6 @@ regen-cases:
15891589
$(CASESFLAG) \
15901590
-t $(srcdir)/Python/opcode_targets.h.new \
15911591
-m $(srcdir)/Include/internal/pycore_opcode_metadata.h.new \
1592-
-e $(srcdir)/Python/executor_cases.c.h.new \
15931592
-p $(srcdir)/Lib/_opcode_metadata.py.new \
15941593
-a $(srcdir)/Python/abstract_interp_cases.c.h.new \
15951594
$(srcdir)/Python/bytecodes.c
@@ -1599,6 +1598,8 @@ regen-cases:
15991598
$(srcdir)/Tools/cases_generator/uop_id_generator.py -o $(srcdir)/Include/internal/pycore_uop_ids.h.new $(srcdir)/Python/bytecodes.c
16001599
$(PYTHON_FOR_REGEN) \
16011600
$(srcdir)/Tools/cases_generator/tier1_generator.py -o $(srcdir)/Python/generated_cases.c.h.new $(srcdir)/Python/bytecodes.c
1601+
$(PYTHON_FOR_REGEN) \
1602+
$(srcdir)/Tools/cases_generator/tier2_generator.py -o $(srcdir)/Python/executor_cases.c.h.new $(srcdir)/Python/bytecodes.c
16021603
$(UPDATE_FILE) $(srcdir)/Python/generated_cases.c.h $(srcdir)/Python/generated_cases.c.h.new
16031604
$(UPDATE_FILE) $(srcdir)/Include/opcode_ids.h $(srcdir)/Include/opcode_ids.h.new
16041605
$(UPDATE_FILE) $(srcdir)/Include/internal/pycore_uop_ids.h $(srcdir)/Include/internal/pycore_uop_ids.h.new

Python/bytecodes.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3967,6 +3967,7 @@ dummy_func(
39673967
}
39683968

39693969
inst(EXTENDED_ARG, ( -- )) {
3970+
TIER_ONE_ONLY
39703971
assert(oparg);
39713972
opcode = next_instr->op.code;
39723973
oparg = oparg << 8 | next_instr->op.arg;
@@ -3975,11 +3976,13 @@ dummy_func(
39753976
}
39763977

39773978
inst(CACHE, (--)) {
3979+
TIER_ONE_ONLY
39783980
assert(0 && "Executing a cache.");
39793981
Py_UNREACHABLE();
39803982
}
39813983

39823984
inst(RESERVED, (--)) {
3985+
TIER_ONE_ONLY
39833986
assert(0 && "Executing RESERVED instruction.");
39843987
Py_UNREACHABLE();
39853988
}

0 commit comments

Comments
 (0)