diff options
| author | Guido van Rossum <guido@python.org> | 2023-02-08 04:03:22 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-08 04:03:22 (GMT) |
| commit | a9f01448a99c6a2ae34d448806176f2df3a5b323 (patch) | |
| tree | 5447310b44439cb0bf297a39d37ada56d22ea7ff /Python/opcode_metadata.h | |
| parent | 790ff6bc6a56b4bd6e403aa43a984b99f7171dd7 (diff) | |
| download | cpython-a9f01448a99c6a2ae34d448806176f2df3a5b323.zip cpython-a9f01448a99c6a2ae34d448806176f2df3a5b323.tar.gz cpython-a9f01448a99c6a2ae34d448806176f2df3a5b323.tar.bz2 | |
gh-98831: Modernize CALL_FUNCTION_EX (#101627)
New generator feature: Move CHECK_EVAL_BREAKER() call to just before DISPATCH().
Diffstat (limited to 'Python/opcode_metadata.h')
| -rw-r--r-- | Python/opcode_metadata.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/opcode_metadata.h b/Python/opcode_metadata.h index 52bab1c..054ef6c 100644 --- a/Python/opcode_metadata.h +++ b/Python/opcode_metadata.h @@ -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: |
