mirror of
https://github.com/python/cpython.git
synced 2025-10-27 16:57:08 +00:00
GH-116468: Use constants instead of oparg in stack effects when oparg is known to be a constant. (GH-116469)
This commit is contained in:
parent
8d7fde655f
commit
4e5df2013f
5 changed files with 98 additions and 108 deletions
10
Include/internal/pycore_opcode_metadata.h
generated
10
Include/internal/pycore_opcode_metadata.h
generated
|
|
@ -116,7 +116,7 @@ int _PyOpcode_num_popped(int opcode, int oparg) {
|
|||
case CALL_LEN:
|
||||
return 2 + oparg;
|
||||
case CALL_LIST_APPEND:
|
||||
return 2 + oparg;
|
||||
return 3;
|
||||
case CALL_METHOD_DESCRIPTOR_FAST:
|
||||
return 2 + oparg;
|
||||
case CALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS:
|
||||
|
|
@ -130,11 +130,11 @@ int _PyOpcode_num_popped(int opcode, int oparg) {
|
|||
case CALL_PY_WITH_DEFAULTS:
|
||||
return 2 + oparg;
|
||||
case CALL_STR_1:
|
||||
return 2 + oparg;
|
||||
return 3;
|
||||
case CALL_TUPLE_1:
|
||||
return 2 + oparg;
|
||||
return 3;
|
||||
case CALL_TYPE_1:
|
||||
return 2 + oparg;
|
||||
return 3;
|
||||
case CHECK_EG_MATCH:
|
||||
return 2;
|
||||
case CHECK_EXC_MATCH:
|
||||
|
|
@ -879,7 +879,7 @@ int _PyOpcode_num_pushed(int opcode, int oparg) {
|
|||
case UNPACK_SEQUENCE_TUPLE:
|
||||
return oparg;
|
||||
case UNPACK_SEQUENCE_TWO_TUPLE:
|
||||
return oparg;
|
||||
return 2;
|
||||
case WITH_EXCEPT_START:
|
||||
return 5;
|
||||
case YIELD_VALUE:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue