Skip to content

Commit 6ac95d4

Browse files
committed
Use full oparg for name index in LOAD_GLOBAL and LOAD_ATTR
1 parent 402787c commit 6ac95d4

File tree

12 files changed

+62
-146
lines changed

12 files changed

+62
-146
lines changed

Include/internal/pycore_magic_number.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ PC/launcher.c must also be updated.
279279
280280
*/
281281

282-
#define PYC_MAGIC_NUMBER 3614
282+
#define PYC_MAGIC_NUMBER 3615
283283
/* This is equivalent to converting PYC_MAGIC_NUMBER to 2 bytes
284284
(little-endian) and then appending b'\r\n'. */
285285
#define PYC_MAGIC_NUMBER_TOKEN \

Include/internal/pycore_opcode_metadata.h

Lines changed: 11 additions & 10 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: 13 additions & 13 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
@@ -582,9 +582,9 @@ def get_argval_argrepr(self, op, arg, offset):
582582
argval, argrepr = _get_const_info(deop, arg, self.co_consts)
583583
elif deop in hasname:
584584
if deop == LOAD_GLOBAL:
585-
argval, argrepr = _get_name_info(arg//2, get_name)
585+
argval, argrepr = _get_name_info(arg, get_name)
586586
elif deop == LOAD_ATTR or deop == LOAD_METHOD:
587-
argval, argrepr = _get_name_info(arg//2, get_name)
587+
argval, argrepr = _get_name_info(arg, get_name)
588588
if deop == LOAD_METHOD and argrepr:
589589
argrepr = f"{argrepr} + NULL|self"
590590
elif deop == LOAD_SUPER_ATTR or deop == LOAD_SUPER_METHOD:

0 commit comments

Comments
 (0)