GH-104584: Plugin optimizer API (GH-105100)

This commit is contained in:
Mark Shannon 2023-06-02 11:46:18 +01:00 committed by GitHub
parent 601ae09f0c
commit 4bfa01b9d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 950 additions and 501 deletions

View file

@ -265,6 +265,8 @@ _PyOpcode_num_popped(int opcode, int oparg, bool jump) {
return 0;
case JUMP_BACKWARD:
return 0;
case ENTER_EXECUTOR:
return 0;
case POP_JUMP_IF_FALSE:
return 1;
case POP_JUMP_IF_TRUE:
@ -661,6 +663,8 @@ _PyOpcode_num_pushed(int opcode, int oparg, bool jump) {
return 0;
case JUMP_BACKWARD:
return 0;
case ENTER_EXECUTOR:
return 0;
case POP_JUMP_IF_FALSE:
return 0;
case POP_JUMP_IF_TRUE:
@ -933,6 +937,7 @@ const struct opcode_metadata _PyOpcode_opcode_metadata[256] = {
[IMPORT_FROM] = { true, INSTR_FMT_IB },
[JUMP_FORWARD] = { true, INSTR_FMT_IB },
[JUMP_BACKWARD] = { true, INSTR_FMT_IB },
[ENTER_EXECUTOR] = { true, INSTR_FMT_IB },
[POP_JUMP_IF_FALSE] = { true, INSTR_FMT_IB },
[POP_JUMP_IF_TRUE] = { true, INSTR_FMT_IB },
[POP_JUMP_IF_NOT_NONE] = { true, INSTR_FMT_IB },