Skip to content

Commit 9d4e575

Browse files
committed
Rename LOAD_INT to LOAD_SMALL_INT
1 parent 7c88f69 commit 9d4e575

20 files changed

+130
-130
lines changed

Doc/library/dis.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1079,7 +1079,7 @@ iterations of the loop.
10791079
Pushes ``co_consts[consti]`` onto the stack.
10801080

10811081

1082-
.. opcode:: LOAD_INT (i)
1082+
.. opcode:: LOAD_SMALL_INT (i)
10831083

10841084
Pushes the integer ``i`` onto the stack.
10851085
``i`` must be in ``range(256)``

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 (Add LOAD_INT and LOAD_CONST_IMMORTAL instructions, remove RETURN_CONST)
264+
Python 3.14a2 3609 (Add LOAD_SMALL_INT and LOAD_CONST_IMMORTAL instructions, remove RETURN_CONST)
265265
266266
Python 3.15 will start with 3650
267267

Include/internal/pycore_opcode_metadata.h

Lines changed: 8 additions & 8 deletions
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: 5 additions & 5 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: 16 additions & 16 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: 2 additions & 2 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: 2 additions & 2 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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
ENTER_EXECUTOR = opmap['ENTER_EXECUTOR']
3838
LOAD_GLOBAL = opmap['LOAD_GLOBAL']
39-
LOAD_INT = opmap['LOAD_INT']
39+
LOAD_SMALL_INT = opmap['LOAD_SMALL_INT']
4040
BINARY_OP = opmap['BINARY_OP']
4141
JUMP_BACKWARD = opmap['JUMP_BACKWARD']
4242
FOR_ITER = opmap['FOR_ITER']
@@ -675,7 +675,7 @@ def _get_const_value(op, arg, co_consts):
675675
"""
676676
assert op in hasconst
677677

678-
if op == LOAD_INT:
678+
if op == LOAD_SMALL_INT:
679679
return arg
680680
argval = UNKNOWN
681681
if co_consts is not None:

Lib/test/test_compiler_codegen.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ def test_if_expression(self):
2929
('LOAD_CONST', 0, 1),
3030
('TO_BOOL', 0, 1),
3131
('POP_JUMP_IF_FALSE', false_lbl := self.Label(), 1),
32-
('LOAD_INT', 42, 1),
32+
('LOAD_SMALL_INT', 42, 1),
3333
('JUMP_NO_INTERRUPT', exit_lbl := self.Label()),
3434
false_lbl,
35-
('LOAD_INT', 24, 1),
35+
('LOAD_SMALL_INT', 24, 1),
3636
exit_lbl,
3737
('POP_TOP', None),
3838
('LOAD_CONST', 1),
@@ -82,7 +82,7 @@ def f(x):
8282
# Function body
8383
('RESUME', 0),
8484
('LOAD_FAST', 0),
85-
('LOAD_INT', 42),
85+
('LOAD_SMALL_INT', 42),
8686
('BINARY_OP', 0),
8787
('RETURN_VALUE', None),
8888
('LOAD_CONST', 0),
@@ -125,23 +125,23 @@ def g():
125125
[
126126
('RESUME', 0),
127127
('NOP', None),
128-
('LOAD_INT', 12),
128+
('LOAD_SMALL_INT', 12),
129129
('RETURN_VALUE', None),
130130
('LOAD_CONST', 1),
131131
('RETURN_VALUE', None),
132132
],
133133
[
134134
('RESUME', 0),
135-
('LOAD_INT', 1),
135+
('LOAD_SMALL_INT', 1),
136136
('STORE_FAST', 0),
137-
('LOAD_INT', 2),
137+
('LOAD_SMALL_INT', 2),
138138
('STORE_FAST', 1),
139-
('LOAD_INT', 3),
139+
('LOAD_SMALL_INT', 3),
140140
('STORE_FAST', 2),
141-
('LOAD_INT', 4),
141+
('LOAD_SMALL_INT', 4),
142142
('STORE_FAST', 3),
143143
('NOP', None),
144-
('LOAD_INT', 42),
144+
('LOAD_SMALL_INT', 42),
145145
('RETURN_VALUE', None),
146146
('LOAD_CONST', 0),
147147
('RETURN_VALUE', None),

0 commit comments

Comments
 (0)