diff options
| author | Mark Shannon <mark@hotpy.org> | 2023-01-24 17:25:37 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-24 17:25:37 (GMT) |
| commit | f02fa64bf2d03ef7a28650c164e17a5fb5d8543d (patch) | |
| tree | a794d0afb47c84bf9a77d4feaa26e8e1fb23be07 /Python/opcode_metadata.h | |
| parent | daec3a463c747c852d7ee91e82770fb1763d7d31 (diff) | |
| download | cpython-f02fa64bf2d03ef7a28650c164e17a5fb5d8543d.zip cpython-f02fa64bf2d03ef7a28650c164e17a5fb5d8543d.tar.gz cpython-f02fa64bf2d03ef7a28650c164e17a5fb5d8543d.tar.bz2 | |
GH-100762: Don't call `gen.throw()` in `gen.close()`, unless necessary. (GH-101013)
* Store exception stack depth in YIELD_VALUE's oparg and use it avoid expensive gen.throw() in gen.close() where possible.
Diffstat (limited to 'Python/opcode_metadata.h')
| -rw-r--r-- | Python/opcode_metadata.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/opcode_metadata.h b/Python/opcode_metadata.h index 3ceaca8..1fb0acc 100644 --- a/Python/opcode_metadata.h +++ b/Python/opcode_metadata.h @@ -59,7 +59,7 @@ static const struct { [GET_ANEXT] = { 1, 2, DIR_NONE, DIR_NONE, DIR_NONE, true, INSTR_FMT_IX }, [GET_AWAITABLE] = { 1, 1, DIR_NONE, DIR_NONE, DIR_NONE, true, INSTR_FMT_IB }, [SEND] = { -1, -1, DIR_NONE, DIR_NONE, DIR_NONE, true, INSTR_FMT_IB }, - [YIELD_VALUE] = { 1, 1, DIR_NONE, DIR_NONE, DIR_NONE, true, INSTR_FMT_IB }, + [YIELD_VALUE] = { 1, 1, DIR_NONE, DIR_NONE, DIR_NONE, true, INSTR_FMT_IX }, [POP_EXCEPT] = { 1, 0, DIR_NONE, DIR_NONE, DIR_NONE, true, INSTR_FMT_IX }, [RERAISE] = { -1, -1, DIR_NONE, DIR_NONE, DIR_NONE, true, INSTR_FMT_IB }, [PREP_RERAISE_STAR] = { 2, 1, DIR_NONE, DIR_NONE, DIR_NONE, true, INSTR_FMT_IX }, |
