opcode.h 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. /* Auto-generated by Tools/scripts/generate_opcode_h.py from Lib/opcode.py */
  2. #ifndef Py_OPCODE_H
  3. #define Py_OPCODE_H
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. /* Instruction opcodes for compiled code */
  8. #define POP_TOP 1
  9. #define ROT_TWO 2
  10. #define ROT_THREE 3
  11. #define DUP_TOP 4
  12. #define DUP_TOP_TWO 5
  13. #define ROT_FOUR 6
  14. #define NOP 9
  15. #define UNARY_POSITIVE 10
  16. #define UNARY_NEGATIVE 11
  17. #define UNARY_NOT 12
  18. #define UNARY_INVERT 15
  19. #define BINARY_MATRIX_MULTIPLY 16
  20. #define INPLACE_MATRIX_MULTIPLY 17
  21. #define BINARY_POWER 19
  22. #define BINARY_MULTIPLY 20
  23. #define BINARY_MODULO 22
  24. #define BINARY_ADD 23
  25. #define BINARY_SUBTRACT 24
  26. #define BINARY_SUBSCR 25
  27. #define BINARY_FLOOR_DIVIDE 26
  28. #define BINARY_TRUE_DIVIDE 27
  29. #define INPLACE_FLOOR_DIVIDE 28
  30. #define INPLACE_TRUE_DIVIDE 29
  31. #define RERAISE 48
  32. #define WITH_EXCEPT_START 49
  33. #define GET_AITER 50
  34. #define GET_ANEXT 51
  35. #define BEFORE_ASYNC_WITH 52
  36. #define END_ASYNC_FOR 54
  37. #define INPLACE_ADD 55
  38. #define INPLACE_SUBTRACT 56
  39. #define INPLACE_MULTIPLY 57
  40. #define INPLACE_MODULO 59
  41. #define STORE_SUBSCR 60
  42. #define DELETE_SUBSCR 61
  43. #define BINARY_LSHIFT 62
  44. #define BINARY_RSHIFT 63
  45. #define BINARY_AND 64
  46. #define BINARY_XOR 65
  47. #define BINARY_OR 66
  48. #define INPLACE_POWER 67
  49. #define GET_ITER 68
  50. #define GET_YIELD_FROM_ITER 69
  51. #define PRINT_EXPR 70
  52. #define LOAD_BUILD_CLASS 71
  53. #define YIELD_FROM 72
  54. #define GET_AWAITABLE 73
  55. #define LOAD_ASSERTION_ERROR 74
  56. #define INPLACE_LSHIFT 75
  57. #define INPLACE_RSHIFT 76
  58. #define INPLACE_AND 77
  59. #define INPLACE_XOR 78
  60. #define INPLACE_OR 79
  61. #define LIST_TO_TUPLE 82
  62. #define RETURN_VALUE 83
  63. #define IMPORT_STAR 84
  64. #define SETUP_ANNOTATIONS 85
  65. #define YIELD_VALUE 86
  66. #define POP_BLOCK 87
  67. #define POP_EXCEPT 89
  68. #define HAVE_ARGUMENT 90
  69. #define STORE_NAME 90
  70. #define DELETE_NAME 91
  71. #define UNPACK_SEQUENCE 92
  72. #define FOR_ITER 93
  73. #define UNPACK_EX 94
  74. #define STORE_ATTR 95
  75. #define DELETE_ATTR 96
  76. #define STORE_GLOBAL 97
  77. #define DELETE_GLOBAL 98
  78. #define LOAD_CONST 100
  79. #define LOAD_NAME 101
  80. #define BUILD_TUPLE 102
  81. #define BUILD_LIST 103
  82. #define BUILD_SET 104
  83. #define BUILD_MAP 105
  84. #define LOAD_ATTR 106
  85. #define COMPARE_OP 107
  86. #define IMPORT_NAME 108
  87. #define IMPORT_FROM 109
  88. #define JUMP_FORWARD 110
  89. #define JUMP_IF_FALSE_OR_POP 111
  90. #define JUMP_IF_TRUE_OR_POP 112
  91. #define JUMP_ABSOLUTE 113
  92. #define POP_JUMP_IF_FALSE 114
  93. #define POP_JUMP_IF_TRUE 115
  94. #define LOAD_GLOBAL 116
  95. #define IS_OP 117
  96. #define CONTAINS_OP 118
  97. #define JUMP_IF_NOT_EXC_MATCH 121
  98. #define SETUP_FINALLY 122
  99. #define LOAD_FAST 124
  100. #define STORE_FAST 125
  101. #define DELETE_FAST 126
  102. #define RAISE_VARARGS 130
  103. #define CALL_FUNCTION 131
  104. #define MAKE_FUNCTION 132
  105. #define BUILD_SLICE 133
  106. #define LOAD_CLOSURE 135
  107. #define LOAD_DEREF 136
  108. #define STORE_DEREF 137
  109. #define DELETE_DEREF 138
  110. #define CALL_FUNCTION_KW 141
  111. #define CALL_FUNCTION_EX 142
  112. #define SETUP_WITH 143
  113. #define EXTENDED_ARG 144
  114. #define LIST_APPEND 145
  115. #define SET_ADD 146
  116. #define MAP_ADD 147
  117. #define LOAD_CLASSDEREF 148
  118. #define SETUP_ASYNC_WITH 154
  119. #define FORMAT_VALUE 155
  120. #define BUILD_CONST_KEY_MAP 156
  121. #define BUILD_STRING 157
  122. #define LOAD_METHOD 160
  123. #define CALL_METHOD 161
  124. #define LIST_EXTEND 162
  125. #define SET_UPDATE 163
  126. #define DICT_MERGE 164
  127. #define DICT_UPDATE 165
  128. /* EXCEPT_HANDLER is a special, implicit block type which is created when
  129. entering an except handler. It is not an opcode but we define it here
  130. as we want it to be available to both frameobject.c and ceval.c, while
  131. remaining private.*/
  132. #define EXCEPT_HANDLER 257
  133. #define HAS_ARG(op) ((op) >= HAVE_ARGUMENT)
  134. #ifdef __cplusplus
  135. }
  136. #endif
  137. #endif /* !Py_OPCODE_H */