summaryrefslogtreecommitdiffstats
path: root/Python/opcode_metadata.h
diff options
context:
space:
mode:
Diffstat (limited to 'Python/opcode_metadata.h')
-rw-r--r--Python/opcode_metadata.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/Python/opcode_metadata.h b/Python/opcode_metadata.h
index faa5087..d1057e3 100644
--- a/Python/opcode_metadata.h
+++ b/Python/opcode_metadata.h
@@ -402,8 +402,12 @@ _PyOpcode_num_popped(int opcode, int oparg, bool jump) {
return 0;
case BUILD_SLICE:
return ((oparg == 3) ? 1 : 0) + 2;
- case FORMAT_VALUE:
- return (((oparg & FVS_MASK) == FVS_HAVE_SPEC) ? 1 : 0) + 1;
+ case CONVERT_VALUE:
+ return 1;
+ case FORMAT_SIMPLE:
+ return 1;
+ case FORMAT_WITH_SPEC:
+ return 2;
case COPY:
return (oparg-1) + 1;
case BINARY_OP:
@@ -820,7 +824,11 @@ _PyOpcode_num_pushed(int opcode, int oparg, bool jump) {
return 0;
case BUILD_SLICE:
return 1;
- case FORMAT_VALUE:
+ case CONVERT_VALUE:
+ return 1;
+ case FORMAT_SIMPLE:
+ return 1;
+ case FORMAT_WITH_SPEC:
return 1;
case COPY:
return (oparg-1) + 2;
@@ -1064,7 +1072,9 @@ const struct opcode_metadata _PyOpcode_opcode_metadata[512] = {
[SET_FUNCTION_ATTRIBUTE] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
[RETURN_GENERATOR] = { true, INSTR_FMT_IX, 0 },
[BUILD_SLICE] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
- [FORMAT_VALUE] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
+ [CONVERT_VALUE] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
+ [FORMAT_SIMPLE] = { true, INSTR_FMT_IX, 0 },
+ [FORMAT_WITH_SPEC] = { true, INSTR_FMT_IX, 0 },
[COPY] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
[BINARY_OP] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG },
[SWAP] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },