summaryrefslogtreecommitdiffstats
path: root/Makefile.pre.in
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2023-02-09 00:23:19 (GMT)
committerGitHub <noreply@github.com>2023-02-09 00:23:19 (GMT)
commit65b7b6bd23ea789357777f3a0a6f25a79bb04177 (patch)
treec7b79edb1ff56ab27034ca1d70ad2516cce65ad1 /Makefile.pre.in
parent0e0c5d8baaa6aa91f4221c5aa57d5586e58e8652 (diff)
downloadcpython-65b7b6bd23ea789357777f3a0a6f25a79bb04177.zip
cpython-65b7b6bd23ea789357777f3a0a6f25a79bb04177.tar.gz
cpython-65b7b6bd23ea789357777f3a0a6f25a79bb04177.tar.bz2
gh-98831: Use opcode metadata for stack_effect() (#101704)
* Write output and metadata in a single run This halves the time to run the cases generator (most of the time goes into parsing the input). * Declare or define opcode metadata based on NEED_OPCODE_TABLES * Use generated metadata for stack_effect() * compile.o depends on opcode_metadata.h * Return -1 from _PyOpcode_num_popped/pushed for unknown opcode
Diffstat (limited to 'Makefile.pre.in')
-rw-r--r--Makefile.pre.in17
1 files changed, 7 insertions, 10 deletions
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 2559df8..7a84b95 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1445,24 +1445,21 @@ regen-opcode-targets:
.PHONY: regen-cases
regen-cases:
- # Regenerate Python/generated_cases.c.h from Python/bytecodes.c
+ # Regenerate Python/generated_cases.c.h
+ # and Python/opcode_metadata.h
+ # from Python/bytecodes.c
# using Tools/cases_generator/generate_cases.py
PYTHONPATH=$(srcdir)/Tools/cases_generator \
$(PYTHON_FOR_REGEN) \
$(srcdir)/Tools/cases_generator/generate_cases.py \
-i $(srcdir)/Python/bytecodes.c \
- -o $(srcdir)/Python/generated_cases.c.h.new
+ -o $(srcdir)/Python/generated_cases.c.h.new \
+ -m $(srcdir)/Python/opcode_metadata.h.new
$(UPDATE_FILE) $(srcdir)/Python/generated_cases.c.h $(srcdir)/Python/generated_cases.c.h.new
- # Regenerate Python/opcode_metadata.h from Python/bytecodes.c
- # using Tools/cases_generator/generate_cases.py --metadata
- PYTHONPATH=$(srcdir)/Tools/cases_generator \
- $(PYTHON_FOR_REGEN) \
- $(srcdir)/Tools/cases_generator/generate_cases.py \
- --metadata \
- -i $(srcdir)/Python/bytecodes.c \
- -o $(srcdir)/Python/opcode_metadata.h.new
$(UPDATE_FILE) $(srcdir)/Python/opcode_metadata.h $(srcdir)/Python/opcode_metadata.h.new
+Python/compile.o: $(srcdir)/Python/opcode_metadata.h
+
Python/ceval.o: \
$(srcdir)/Python/ceval_macros.h \
$(srcdir)/Python/condvar.h \