Skip to content

Commit 0b8a5ad

Browse files
committed
Add LOAD_INT instruction
1 parent 68e97ba commit 0b8a5ad

20 files changed

+304
-147
lines changed

Include/internal/pycore_magic_number.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ Known values:
261261
Python 3.14a1 3606 (Specialize CALL_KW)
262262
Python 3.14a1 3607 (Add pseudo instructions JUMP_IF_TRUE/FALSE)
263263
Python 3.14a1 3608 (Add support for slices)
264-
Python 3.14a2 3609 (Break up RETURN_VALUE)
264+
Python 3.14a2 3609 (Add LOAD_INT and LOAD_CONST_IMMORTAL instructions)
265265
266266
Python 3.15 will start with 3650
267267

Include/internal/pycore_opcode_metadata.h

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

Include/internal/pycore_uop_ids.h

Lines changed: 43 additions & 38 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Include/internal/pycore_uop_metadata.h

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Include/opcode_ids.h

Lines changed: 28 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Lib/_opcode_metadata.py

Lines changed: 28 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Lib/dis.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,8 @@ def _get_const_value(op, arg, co_consts):
674674
"""
675675
assert op in hasconst
676676

677+
if op == LOAD_INT:
678+
return arg
677679
argval = UNKNOWN
678680
if co_consts is not None:
679681
argval = co_consts[arg]

Lib/test/test_ast/test_ast.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2311,7 +2311,6 @@ def get_load_const(self, tree):
23112311
def test_load_const(self):
23122312
consts = [None,
23132313
True, False,
2314-
124,
23152314
2.0,
23162315
3j,
23172316
"unicode",

0 commit comments

Comments
 (0)