bpo-43683: Streamline YIELD_VALUE and SEND (GH-30723)

* Split YIELD_VALUE into ASYNC_GEN_WRAP; YIELD_VALUE for async generators.

* Split SEND into SEND; YIELD_VALUE.

* Document new opcodes.
This commit is contained in:
Mark Shannon 2022-01-24 11:08:53 +00:00 committed by GitHub
parent d75a51bea3
commit 0367a36fdc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 72 additions and 43 deletions

13
Include/opcode.h generated
View file

@ -44,6 +44,7 @@ extern "C" {
#define IMPORT_STAR 84
#define SETUP_ANNOTATIONS 85
#define YIELD_VALUE 86
#define ASYNC_GEN_WRAP 87
#define PREP_RERAISE_STAR 88
#define POP_EXCEPT 89
#define HAVE_ARGUMENT 90
@ -165,12 +166,12 @@ extern "C" {
#define STORE_ATTR_ADAPTIVE 79
#define STORE_ATTR_INSTANCE_VALUE 80
#define STORE_ATTR_SLOT 81
#define STORE_ATTR_WITH_HINT 87
#define LOAD_FAST__LOAD_FAST 131
#define STORE_FAST__LOAD_FAST 140
#define LOAD_FAST__LOAD_CONST 141
#define LOAD_CONST__LOAD_FAST 143
#define STORE_FAST__STORE_FAST 150
#define STORE_ATTR_WITH_HINT 131
#define LOAD_FAST__LOAD_FAST 140
#define STORE_FAST__LOAD_FAST 141
#define LOAD_FAST__LOAD_CONST 143
#define LOAD_CONST__LOAD_FAST 150
#define STORE_FAST__STORE_FAST 153
#define DO_TRACING 255
#ifdef NEED_OPCODE_JUMP_TABLES
static uint32_t _PyOpcode_RelativeJump[8] = {