mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
GH-125837: Split LOAD_CONST
into three. (GH-125972)
* Add LOAD_CONST_IMMORTAL opcode * Add LOAD_SMALL_INT opcode * Remove RETURN_CONST opcode
This commit is contained in:
parent
67f5c5bd6f
commit
faa3272fb8
33 changed files with 706 additions and 538 deletions
|
@ -254,10 +254,11 @@ class CodeTest(unittest.TestCase):
|
|||
return x
|
||||
code = func.__code__
|
||||
|
||||
# different co_name, co_varnames, co_consts
|
||||
# Different co_name, co_varnames, co_consts.
|
||||
# Must have the same number of constants and
|
||||
# variables or we get crashes.
|
||||
def func2():
|
||||
y = 2
|
||||
z = 3
|
||||
return y
|
||||
code2 = func2.__code__
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue