You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

131 lines
4.1 KiB

  1. /* Auto-generated by Tools/scripts/generate_opcode_h.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 NOP 9
  14. #define UNARY_POSITIVE 10
  15. #define UNARY_NEGATIVE 11
  16. #define UNARY_NOT 12
  17. #define UNARY_INVERT 15
  18. #define BINARY_MATRIX_MULTIPLY 16
  19. #define INPLACE_MATRIX_MULTIPLY 17
  20. #define BINARY_POWER 19
  21. #define BINARY_MULTIPLY 20
  22. #define BINARY_MODULO 22
  23. #define BINARY_ADD 23
  24. #define BINARY_SUBTRACT 24
  25. #define BINARY_SUBSCR 25
  26. #define BINARY_FLOOR_DIVIDE 26
  27. #define BINARY_TRUE_DIVIDE 27
  28. #define INPLACE_FLOOR_DIVIDE 28
  29. #define INPLACE_TRUE_DIVIDE 29
  30. #define STORE_MAP 54
  31. #define INPLACE_ADD 55
  32. #define INPLACE_SUBTRACT 56
  33. #define INPLACE_MULTIPLY 57
  34. #define INPLACE_MODULO 59
  35. #define STORE_SUBSCR 60
  36. #define DELETE_SUBSCR 61
  37. #define BINARY_LSHIFT 62
  38. #define BINARY_RSHIFT 63
  39. #define BINARY_AND 64
  40. #define BINARY_XOR 65
  41. #define BINARY_OR 66
  42. #define INPLACE_POWER 67
  43. #define GET_ITER 68
  44. #define PRINT_EXPR 70
  45. #define LOAD_BUILD_CLASS 71
  46. #define YIELD_FROM 72
  47. #define INPLACE_LSHIFT 75
  48. #define INPLACE_RSHIFT 76
  49. #define INPLACE_AND 77
  50. #define INPLACE_XOR 78
  51. #define INPLACE_OR 79
  52. #define BREAK_LOOP 80
  53. #define WITH_CLEANUP 81
  54. #define RETURN_VALUE 83
  55. #define IMPORT_STAR 84
  56. #define YIELD_VALUE 86
  57. #define POP_BLOCK 87
  58. #define END_FINALLY 88
  59. #define POP_EXCEPT 89
  60. #define HAVE_ARGUMENT 90
  61. #define STORE_NAME 90
  62. #define DELETE_NAME 91
  63. #define UNPACK_SEQUENCE 92
  64. #define FOR_ITER 93
  65. #define UNPACK_EX 94
  66. #define STORE_ATTR 95
  67. #define DELETE_ATTR 96
  68. #define STORE_GLOBAL 97
  69. #define DELETE_GLOBAL 98
  70. #define LOAD_CONST 100
  71. #define LOAD_NAME 101
  72. #define BUILD_TUPLE 102
  73. #define BUILD_LIST 103
  74. #define BUILD_SET 104
  75. #define BUILD_MAP 105
  76. #define LOAD_ATTR 106
  77. #define COMPARE_OP 107
  78. #define IMPORT_NAME 108
  79. #define IMPORT_FROM 109
  80. #define JUMP_FORWARD 110
  81. #define JUMP_IF_FALSE_OR_POP 111
  82. #define JUMP_IF_TRUE_OR_POP 112
  83. #define JUMP_ABSOLUTE 113
  84. #define POP_JUMP_IF_FALSE 114
  85. #define POP_JUMP_IF_TRUE 115
  86. #define LOAD_GLOBAL 116
  87. #define CONTINUE_LOOP 119
  88. #define SETUP_LOOP 120
  89. #define SETUP_EXCEPT 121
  90. #define SETUP_FINALLY 122
  91. #define LOAD_FAST 124
  92. #define STORE_FAST 125
  93. #define DELETE_FAST 126
  94. #define RAISE_VARARGS 130
  95. #define CALL_FUNCTION 131
  96. #define MAKE_FUNCTION 132
  97. #define BUILD_SLICE 133
  98. #define MAKE_CLOSURE 134
  99. #define LOAD_CLOSURE 135
  100. #define LOAD_DEREF 136
  101. #define STORE_DEREF 137
  102. #define DELETE_DEREF 138
  103. #define CALL_FUNCTION_VAR 140
  104. #define CALL_FUNCTION_KW 141
  105. #define CALL_FUNCTION_VAR_KW 142
  106. #define SETUP_WITH 143
  107. #define EXTENDED_ARG 144
  108. #define LIST_APPEND 145
  109. #define SET_ADD 146
  110. #define MAP_ADD 147
  111. #define LOAD_CLASSDEREF 148
  112. /* EXCEPT_HANDLER is a special, implicit block type which is created when
  113. entering an except handler. It is not an opcode but we define it here
  114. as we want it to be available to both frameobject.c and ceval.c, while
  115. remaining private.*/
  116. #define EXCEPT_HANDLER 257
  117. enum cmp_op {PyCmp_LT=Py_LT, PyCmp_LE=Py_LE, PyCmp_EQ=Py_EQ, PyCmp_NE=Py_NE,
  118. PyCmp_GT=Py_GT, PyCmp_GE=Py_GE, PyCmp_IN, PyCmp_NOT_IN,
  119. PyCmp_IS, PyCmp_IS_NOT, PyCmp_EXC_MATCH, PyCmp_BAD};
  120. #define HAS_ARG(op) ((op) >= HAVE_ARGUMENT)
  121. #ifdef __cplusplus
  122. }
  123. #endif
  124. #endif /* !Py_OPCODE_H */