mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
gh-105481: remove regen-opcode. Generated _PyOpcode_Caches in regen-cases. (#108367)
This commit is contained in:
parent
422f81b5d2
commit
72119d16a5
19 changed files with 78 additions and 176 deletions
|
@ -540,6 +540,18 @@ class Generator(Analyzer):
|
|||
for name in self.opmap:
|
||||
self.out.emit(f'[{name}] = "{name}",')
|
||||
|
||||
with self.metadata_item(
|
||||
f"const uint8_t _PyOpcode_Caches[256]",
|
||||
"=",
|
||||
";",
|
||||
):
|
||||
for name, _ in self.families.items():
|
||||
instr = self.instrs[name]
|
||||
if instr.cache_offset > 0:
|
||||
self.out.emit(f'[{name}] = {instr.cache_offset},')
|
||||
# Irregular case:
|
||||
self.out.emit('[JUMP_BACKWARD] = 1,')
|
||||
|
||||
deoptcodes = {}
|
||||
for name, op in self.opmap.items():
|
||||
if op < 256:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue