mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-98831: Modernize CALL_FUNCTION_EX (#101627)
New generator feature: Move CHECK_EVAL_BREAKER() call to just before DISPATCH().
This commit is contained in:
parent
790ff6bc6a
commit
a9f01448a9
5 changed files with 41 additions and 37 deletions
|
@ -325,7 +325,7 @@ _PyOpcode_num_popped(int opcode, int oparg, bool jump) {
|
|||
case CALL_NO_KW_METHOD_DESCRIPTOR_FAST:
|
||||
return -1;
|
||||
case CALL_FUNCTION_EX:
|
||||
return -1;
|
||||
return ((oparg & 1) ? 1 : 0) + 3;
|
||||
case MAKE_FUNCTION:
|
||||
return ((oparg & 0x01) ? 1 : 0) + ((oparg & 0x02) ? 1 : 0) + ((oparg & 0x04) ? 1 : 0) + ((oparg & 0x08) ? 1 : 0) + 1;
|
||||
case RETURN_GENERATOR:
|
||||
|
@ -673,7 +673,7 @@ _PyOpcode_num_pushed(int opcode, int oparg, bool jump) {
|
|||
case CALL_NO_KW_METHOD_DESCRIPTOR_FAST:
|
||||
return -1;
|
||||
case CALL_FUNCTION_EX:
|
||||
return -1;
|
||||
return 1;
|
||||
case MAKE_FUNCTION:
|
||||
return 1;
|
||||
case RETURN_GENERATOR:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue