| 1 | #ifndef Py_OPCODE_H
|
|---|
| 2 | #define Py_OPCODE_H
|
|---|
| 3 | #ifdef __cplusplus
|
|---|
| 4 | extern "C" {
|
|---|
| 5 | #endif
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 | /* Instruction opcodes for compiled code */
|
|---|
| 9 |
|
|---|
| 10 | #define STOP_CODE 0
|
|---|
| 11 | #define POP_TOP 1
|
|---|
| 12 | #define ROT_TWO 2
|
|---|
| 13 | #define ROT_THREE 3
|
|---|
| 14 | #define DUP_TOP 4
|
|---|
| 15 | #define ROT_FOUR 5
|
|---|
| 16 | #define NOP 9
|
|---|
| 17 |
|
|---|
| 18 | #define UNARY_POSITIVE 10
|
|---|
| 19 | #define UNARY_NEGATIVE 11
|
|---|
| 20 | #define UNARY_NOT 12
|
|---|
| 21 | #define UNARY_CONVERT 13
|
|---|
| 22 |
|
|---|
| 23 | #define UNARY_INVERT 15
|
|---|
| 24 |
|
|---|
| 25 | #define LIST_APPEND 18
|
|---|
| 26 | #define BINARY_POWER 19
|
|---|
| 27 |
|
|---|
| 28 | #define BINARY_MULTIPLY 20
|
|---|
| 29 | #define BINARY_DIVIDE 21
|
|---|
| 30 | #define BINARY_MODULO 22
|
|---|
| 31 | #define BINARY_ADD 23
|
|---|
| 32 | #define BINARY_SUBTRACT 24
|
|---|
| 33 | #define BINARY_SUBSCR 25
|
|---|
| 34 | #define BINARY_FLOOR_DIVIDE 26
|
|---|
| 35 | #define BINARY_TRUE_DIVIDE 27
|
|---|
| 36 | #define INPLACE_FLOOR_DIVIDE 28
|
|---|
| 37 | #define INPLACE_TRUE_DIVIDE 29
|
|---|
| 38 |
|
|---|
| 39 | #define SLICE 30
|
|---|
| 40 | /* Also uses 31-33 */
|
|---|
| 41 |
|
|---|
| 42 | #define STORE_SLICE 40
|
|---|
| 43 | /* Also uses 41-43 */
|
|---|
| 44 |
|
|---|
| 45 | #define DELETE_SLICE 50
|
|---|
| 46 | /* Also uses 51-53 */
|
|---|
| 47 |
|
|---|
| 48 | #define INPLACE_ADD 55
|
|---|
| 49 | #define INPLACE_SUBTRACT 56
|
|---|
| 50 | #define INPLACE_MULTIPLY 57
|
|---|
| 51 | #define INPLACE_DIVIDE 58
|
|---|
| 52 | #define INPLACE_MODULO 59
|
|---|
| 53 | #define STORE_SUBSCR 60
|
|---|
| 54 | #define DELETE_SUBSCR 61
|
|---|
| 55 |
|
|---|
| 56 | #define BINARY_LSHIFT 62
|
|---|
| 57 | #define BINARY_RSHIFT 63
|
|---|
| 58 | #define BINARY_AND 64
|
|---|
|
|---|