annotate Include/opcode.h @ 58973:db86bf39ccaa legacy-trunk

Issue 7970: When email.Parser.Parser parses a MIME message of type message/rfc822 it turns it into an object whose body consists of a list containing a single Message object. HeaderParser, on the other hand, just copies the body as a string. Generator.flatten has a special handler for the message mime type that expected the body to be the one item list. This fails if the message was parsed by HeaderParser. So we now check to see if the body is a string first, and if so just we just emit it.
author R. David Murray <rdmurray@bitdance.com>
date Sun, 21 Feb 2010 04:23:00 +0000
parents edfed0e32ced
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1329
519c25039c6a * Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents: 1288
diff changeset
1 #ifndef Py_OPCODE_H
519c25039c6a * Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents: 1288
diff changeset
2 #define Py_OPCODE_H
519c25039c6a * Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents: 1288
diff changeset
3 #ifdef __cplusplus
519c25039c6a * Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents: 1288
diff changeset
4 extern "C" {
519c25039c6a * Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents: 1288
diff changeset
5 #endif
519c25039c6a * Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents: 1288
diff changeset
6
145
853b736a6a9e Added copyright notice.
Guido van Rossum <guido@python.org>
parents: 86
diff changeset
7
69
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
8 /* Instruction opcodes for compiled code */
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
9
86
a6934380c6e7 "Compiling" version
Guido van Rossum <guido@python.org>
parents: 78
diff changeset
10 #define STOP_CODE 0
69
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
11 #define POP_TOP 1
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
12 #define ROT_TWO 2
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
13 #define ROT_THREE 3
86
a6934380c6e7 "Compiling" version
Guido van Rossum <guido@python.org>
parents: 78
diff changeset
14 #define DUP_TOP 4
14162
27d7d89c774b The real suport for augmented assignment: new opcodes, new PyNumber and
Thomas Wouters <thomas@python.org>
parents: 14147
diff changeset
15 #define ROT_FOUR 5
32395
6bc6abba8659 Install two code generation optimizations that depend on NOP.
Raymond Hettinger <python@rcn.com>
parents: 31618
diff changeset
16 #define NOP 9
69
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
17
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
18 #define UNARY_POSITIVE 10
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
19 #define UNARY_NEGATIVE 11
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
20 #define UNARY_NOT 12
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
21 #define UNARY_CONVERT 13
2841
64928f6a8e80 keyword arguments and faster function calls
Guido van Rossum <guido@python.org>
parents: 2803
diff changeset
22
409
b5fe6482072f Added shift and mask ops.
Guido van Rossum <guido@python.org>
parents: 178
diff changeset
23 #define UNARY_INVERT 15
69
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
24
3320
4e6d0b26efaf changes for ** (power) operator
Guido van Rossum <guido@python.org>
parents: 2841
diff changeset
25 #define BINARY_POWER 19
4e6d0b26efaf changes for ** (power) operator
Guido van Rossum <guido@python.org>
parents: 2841
diff changeset
26
69
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
27 #define BINARY_MULTIPLY 20
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
28 #define BINARY_DIVIDE 21
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
29 #define BINARY_MODULO 22
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
30 #define BINARY_ADD 23
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
31 #define BINARY_SUBTRACT 24
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
32 #define BINARY_SUBSCR 25
19051
f20727cc3d0f Implement PEP 238 in its (almost) full glory.
Guido van Rossum <guido@python.org>
parents: 18148
diff changeset
33 #define BINARY_FLOOR_DIVIDE 26
f20727cc3d0f Implement PEP 238 in its (almost) full glory.
Guido van Rossum <guido@python.org>
parents: 18148
diff changeset
34 #define BINARY_TRUE_DIVIDE 27
f20727cc3d0f Implement PEP 238 in its (almost) full glory.
Guido van Rossum <guido@python.org>
parents: 18148
diff changeset
35 #define INPLACE_FLOOR_DIVIDE 28
f20727cc3d0f Implement PEP 238 in its (almost) full glory.
Guido van Rossum <guido@python.org>
parents: 18148
diff changeset
36 #define INPLACE_TRUE_DIVIDE 29
69
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
37
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
38 #define SLICE 30
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
39 /* Also uses 31-33 */
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
40
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
41 #define STORE_SLICE 40
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
42 /* Also uses 41-43 */
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
43
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
44 #define DELETE_SLICE 50
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
45 /* Also uses 51-53 */
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
46
44334
07aa19170a67 Speed-up dictionary constructor by about 10%.
Raymond Hettinger <python@rcn.com>
parents: 42200
diff changeset
47 #define STORE_MAP 54
14162
27d7d89c774b The real suport for augmented assignment: new opcodes, new PyNumber and
Thomas Wouters <thomas@python.org>
parents: 14147
diff changeset
48 #define INPLACE_ADD 55
27d7d89c774b The real suport for augmented assignment: new opcodes, new PyNumber and
Thomas Wouters <thomas@python.org>
parents: 14147
diff changeset
49 #define INPLACE_SUBTRACT 56
27d7d89c774b The real suport for augmented assignment: new opcodes, new PyNumber and
Thomas Wouters <thomas@python.org>
parents: 14147
diff changeset
50 #define INPLACE_MULTIPLY 57
27d7d89c774b The real suport for augmented assignment: new opcodes, new PyNumber and
Thomas Wouters <thomas@python.org>
parents: 14147
diff changeset
51 #define INPLACE_DIVIDE 58
27d7d89c774b The real suport for augmented assignment: new opcodes, new PyNumber and
Thomas Wouters <thomas@python.org>
parents: 14147
diff changeset
52 #define INPLACE_MODULO 59
69
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
53 #define STORE_SUBSCR 60
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
54 #define DELETE_SUBSCR 61
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
55
409
b5fe6482072f Added shift and mask ops.
Guido van Rossum <guido@python.org>
parents: 178
diff changeset
56 #define BINARY_LSHIFT 62
b5fe6482072f Added shift and mask ops.
Guido van Rossum <guido@python.org>
parents: 178
diff changeset
57 #define BINARY_RSHIFT 63
b5fe6482072f Added shift and mask ops.
Guido van Rossum <guido@python.org>
parents: 178
diff changeset
58 #define BINARY_AND 64
b5fe6482072f Added shift and mask ops.
Guido van Rossum <guido@python.org>
parents: 178
diff changeset
59 #define BINARY_XOR 65
b5fe6482072f Added shift and mask ops.
Guido van Rossum <guido@python.org>
parents: 178
diff changeset
60 #define BINARY_OR 66
14162
27d7d89c774b The real suport for augmented assignment: new opcodes, new PyNumber and
Thomas Wouters <thomas@python.org>
parents: 14147
diff changeset
61 #define INPLACE_POWER 67
17597
32e7d0898eab Iterators phase 1. This comprises:
Guido van Rossum <guido@python.org>
parents: 16398
diff changeset
62 #define GET_ITER 68
409
b5fe6482072f Added shift and mask ops.
Guido van Rossum <guido@python.org>
parents: 178
diff changeset
63
69
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
64 #define PRINT_EXPR 70
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
65 #define PRINT_ITEM 71
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
66 #define PRINT_NEWLINE 72
14098
44e666cc8c07 PEP 214, Extended print Statement, has been accepted by the BDFL.
Barry Warsaw <barry@python.org>
parents: 14038
diff changeset
67 #define PRINT_ITEM_TO 73
44e666cc8c07 PEP 214, Extended print Statement, has been accepted by the BDFL.
Barry Warsaw <barry@python.org>
parents: 14038
diff changeset
68 #define PRINT_NEWLINE_TO 74
14162
27d7d89c774b The real suport for augmented assignment: new opcodes, new PyNumber and
Thomas Wouters <thomas@python.org>
parents: 14147
diff changeset
69 #define INPLACE_LSHIFT 75
27d7d89c774b The real suport for augmented assignment: new opcodes, new PyNumber and
Thomas Wouters <thomas@python.org>
parents: 14147
diff changeset
70 #define INPLACE_RSHIFT 76
27d7d89c774b The real suport for augmented assignment: new opcodes, new PyNumber and
Thomas Wouters <thomas@python.org>
parents: 14147
diff changeset
71 #define INPLACE_AND 77
27d7d89c774b The real suport for augmented assignment: new opcodes, new PyNumber and
Thomas Wouters <thomas@python.org>
parents: 14147
diff changeset
72 #define INPLACE_XOR 78
27d7d89c774b The real suport for augmented assignment: new opcodes, new PyNumber and
Thomas Wouters <thomas@python.org>
parents: 14147
diff changeset
73 #define INPLACE_OR 79
69
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
74 #define BREAK_LOOP 80
36695
b6d2f6fd3e11 PEP 343 -- the with-statement.
Guido van Rossum <guido@python.org>
parents: 32395
diff changeset
75 #define WITH_CLEANUP 81
78
b1fb4e1f6e51 Added opcodes for classes.
Guido van Rossum <guido@python.org>
parents: 69
diff changeset
76 #define LOAD_LOCALS 82
69
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
77 #define RETURN_VALUE 83
14038
18385172fac0 Apply SF patch #101135, adding 'import module as m' and 'from module import
Thomas Wouters <thomas@python.org>
parents: 13930
diff changeset
78 #define IMPORT_STAR 84
1354
fccd415e2eb8 * bltinmodule.c: removed exec() built-in function.
Guido van Rossum <guido@python.org>
parents: 1329
diff changeset
79 #define EXEC_STMT 85
18148
7bc473b2c654 Merging the gen-branch into the main line, at Guido's direction. Yay!
Tim Peters <tim.peters@gmail.com>
parents: 17597
diff changeset
80 #define YIELD_VALUE 86
69
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
81 #define POP_BLOCK 87
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
82 #define END_FINALLY 88
78
b1fb4e1f6e51 Added opcodes for classes.
Guido van Rossum <guido@python.org>
parents: 69
diff changeset
83 #define BUILD_CLASS 89
69
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
84
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
85 #define HAVE_ARGUMENT 90 /* Opcodes from here have an argument: */
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
86
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
87 #define STORE_NAME 90 /* Index in name list */
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
88 #define DELETE_NAME 91 /* "" */
13930
4eaa463c031a Merge UNPACK_LIST and UNPACK_TUPLE into a single UNPACK_SEQUENCE, since they
Thomas Wouters <thomas@python.org>
parents: 13256
diff changeset
89 #define UNPACK_SEQUENCE 92 /* Number of sequence items */
17597
32e7d0898eab Iterators phase 1. This comprises:
Guido van Rossum <guido@python.org>
parents: 16398
diff changeset
90 #define FOR_ITER 93
50204
94e79d78dff0 Issue #2183: Simplify and optimize bytecode for list comprehensions.
Antoine Pitrou <solipsis@pitrou.net>
parents: 44334
diff changeset
91 #define LIST_APPEND 94
13930
4eaa463c031a Merge UNPACK_LIST and UNPACK_TUPLE into a single UNPACK_SEQUENCE, since they
Thomas Wouters <thomas@python.org>
parents: 13256
diff changeset
92
69
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
93 #define STORE_ATTR 95 /* Index in name list */
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
94 #define DELETE_ATTR 96 /* "" */
474
19365201dcfa Added _GLOBAL opcodes.
Guido van Rossum <guido@python.org>
parents: 409
diff changeset
95 #define STORE_GLOBAL 97 /* "" */
19365201dcfa Added _GLOBAL opcodes.
Guido van Rossum <guido@python.org>
parents: 409
diff changeset
96 #define DELETE_GLOBAL 98 /* "" */
14162
27d7d89c774b The real suport for augmented assignment: new opcodes, new PyNumber and
Thomas Wouters <thomas@python.org>
parents: 14147
diff changeset
97 #define DUP_TOPX 99 /* number of items to duplicate */
69
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
98 #define LOAD_CONST 100 /* Index in const list */
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
99 #define LOAD_NAME 101 /* Index in name list */
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
100 #define BUILD_TUPLE 102 /* Number of tuple items */
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
101 #define BUILD_LIST 103 /* Number of list items */
58229
c2fdf25329ff Issue #2335: Backport set literals syntax from Python 3.x.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 54329
diff changeset
102 #define BUILD_SET 104 /* Number of set items */
c2fdf25329ff Issue #2335: Backport set literals syntax from Python 3.x.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 54329
diff changeset
103 #define BUILD_MAP 105 /* Always zero for now */
c2fdf25329ff Issue #2335: Backport set literals syntax from Python 3.x.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 54329
diff changeset
104 #define LOAD_ATTR 106 /* Index in name list */
c2fdf25329ff Issue #2335: Backport set literals syntax from Python 3.x.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 54329
diff changeset
105 #define COMPARE_OP 107 /* Comparison operator */
c2fdf25329ff Issue #2335: Backport set literals syntax from Python 3.x.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 54329
diff changeset
106 #define IMPORT_NAME 108 /* Index in name list */
c2fdf25329ff Issue #2335: Backport set literals syntax from Python 3.x.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 54329
diff changeset
107 #define IMPORT_FROM 109 /* Index in name list */
c2fdf25329ff Issue #2335: Backport set literals syntax from Python 3.x.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 54329
diff changeset
108 #define JUMP_FORWARD 110 /* Number of bytes to skip */
69
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
109
51920
ef8fe9088696 Backport r69961 to trunk, replacing JUMP_IF_{TRUE,FALSE} with
Jeffrey Yasskin <jyasskin@gmail.com>
parents: 50204
diff changeset
110 #define JUMP_IF_FALSE_OR_POP 111 /* Target byte offset from beginning
ef8fe9088696 Backport r69961 to trunk, replacing JUMP_IF_{TRUE,FALSE} with
Jeffrey Yasskin <jyasskin@gmail.com>
parents: 50204
diff changeset
111 of code */
ef8fe9088696 Backport r69961 to trunk, replacing JUMP_IF_{TRUE,FALSE} with
Jeffrey Yasskin <jyasskin@gmail.com>
parents: 50204
diff changeset
112 #define JUMP_IF_TRUE_OR_POP 112 /* "" */
ef8fe9088696 Backport r69961 to trunk, replacing JUMP_IF_{TRUE,FALSE} with
Jeffrey Yasskin <jyasskin@gmail.com>
parents: 50204
diff changeset
113 #define JUMP_ABSOLUTE 113 /* "" */
ef8fe9088696 Backport r69961 to trunk, replacing JUMP_IF_{TRUE,FALSE} with
Jeffrey Yasskin <jyasskin@gmail.com>
parents: 50204
diff changeset
114 #define POP_JUMP_IF_FALSE 114 /* "" */
ef8fe9088696 Backport r69961 to trunk, replacing JUMP_IF_{TRUE,FALSE} with
Jeffrey Yasskin <jyasskin@gmail.com>
parents: 50204
diff changeset
115 #define POP_JUMP_IF_TRUE 115 /* "" */
69
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
116
178
fb6367d5ff46 Added opcodes to load local/global variables
Guido van Rossum <guido@python.org>
parents: 145
diff changeset
117 #define LOAD_GLOBAL 116 /* Index in name list */
fb6367d5ff46 Added opcodes to load local/global variables
Guido van Rossum <guido@python.org>
parents: 145
diff changeset
118
16398
80c0b280a4f9 Allow 'continue' inside 'try' clause
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 16257
diff changeset
119 #define CONTINUE_LOOP 119 /* Start of loop (absolute) */
42200
09bf35793bcd Fix #1752132: wrong comment in opcode description.
Georg Brandl <georg@python.org>
parents: 36695
diff changeset
120 #define SETUP_LOOP 120 /* Target address (relative) */
69
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
121 #define SETUP_EXCEPT 121 /* "" */
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
122 #define SETUP_FINALLY 122 /* "" */
cccd534f2280 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
123
1262
f820e6917f07 Changes to speed up local variables enormously, by avoiding dictionary
Guido van Rossum <guido@python.org>
parents: 1257
diff changeset
124 #define LOAD_FAST 124 /* Local variable number */
f820e6917f07 Changes to speed up local variables enormously, by avoiding dictionary
Guido van Rossum <guido@python.org>
parents: 1257
diff changeset
125 #define STORE_FAST 125 /* Local variable number */
f820e6917f07 Changes to speed up local variables enormously, by avoiding dictionary
Guido van Rossum <guido@python.org>
parents: 1257
diff changeset
126 #define DELETE_FAST 126 /* Local variable number */
f820e6917f07 Changes to speed up local variables enormously, by avoiding dictionary
Guido van Rossum <guido@python.org>
parents: 1257
diff changeset
127
2803
a2363b6e9c86 new opcodes RAISE_VARARGS, CALL_FUNCTION
Guido van Rossum <guido@python.org>
parents: 2058
diff changeset
128 #define RAISE_VARARGS 130 /* Number of raise arguments (1, 2 or 3) */
12082
603db0d0aed1 slightly modified version of Greg Ewing's extended call syntax patch
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 8627
diff changeset
129 /* CALL_FUNCTION_XXX opcodes defined below depend on this definition */
2803
a2363b6e9c86 new opcodes RAISE_VARARGS, CALL_FUNCTION
Guido van Rossum <guido@python.org>
parents: 2058
diff changeset
130 #define CALL_FUNCTION 131 /* #args + (#kwargs<<8) */
2841
64928f6a8e80 keyword arguments and faster function calls
Guido van Rossum <guido@python.org>
parents: 2803
diff changeset
131 #define MAKE_FUNCTION 132 /* #defaults */
3832
039bc3e4e64e Added BUILD_SLICE opcode.
Guido van Rossum <guido@python.org>
parents: 3320
diff changeset
132 #define BUILD_SLICE 133 /* Number of items */
2803
a2363b6e9c86 new opcodes RAISE_VARARGS, CALL_FUNCTION
Guido van Rossum <guido@python.org>
parents: 2058
diff changeset
133
16257
fd8c7203251f PEP 227 implementation
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 15939
diff changeset
134 #define MAKE_CLOSURE 134 /* #free vars */
fd8c7203251f PEP 227 implementation
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 15939
diff changeset
135 #define LOAD_CLOSURE 135 /* Load free variable from closure */
fd8c7203251f PEP 227 implementation
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 15939
diff changeset
136 #define LOAD_DEREF 136 /* Load and dereference from closure cell */
fd8c7203251f PEP 227 implementation
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 15939
diff changeset
137 #define STORE_DEREF 137 /* Store into cell */
fd8c7203251f PEP 227 implementation
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 15939
diff changeset
138
12082
603db0d0aed1 slightly modified version of Greg Ewing's extended call syntax patch
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 8627
diff changeset
139 /* The next 3 opcodes must be contiguous and satisfy
12085
25b63367385e remove reference to CALL_FUNCTION_STAR in comment
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 12082
diff changeset
140 (CALL_FUNCTION_VAR - CALL_FUNCTION) & 3 == 1 */
12082
603db0d0aed1 slightly modified version of Greg Ewing's extended call syntax patch
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 8627
diff changeset
141 #define CALL_FUNCTION_VAR 140 /* #args + (#kwargs<<8) */
603db0d0aed1 slightly modified version of Greg Ewing's extended call syntax patch
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 8627
diff changeset
142 #define CALL_FUNCTION_KW 141 /* #args + (#kwargs<<8) */
603db0d0aed1 slightly modified version of Greg Ewing's extended call syntax patch
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 8627
diff changeset
143 #define CALL_FUNCTION_VAR_KW 142 /* #args + (#kwargs<<8) */
603db0d0aed1 slightly modified version of Greg Ewing's extended call syntax patch
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 8627
diff changeset
144
54329
145376df3ad7 add a SETUP_WITH opcode
Benjamin Peterson <benjamin@python.org>
parents: 51920
diff changeset
145 #define SETUP_WITH 143
145376df3ad7 add a SETUP_WITH opcode
Benjamin Peterson <benjamin@python.org>
parents: 51920
diff changeset
146
14147
21ec69a56228 Charles G. Waldman <cgw@fnal.gov>:
Fred Drake <fdrake@acm.org>
parents: 14098
diff changeset
147 /* Support for opargs more than 16 bits long */
54329
145376df3ad7 add a SETUP_WITH opcode
Benjamin Peterson <benjamin@python.org>
parents: 51920
diff changeset
148 #define EXTENDED_ARG 145
14147
21ec69a56228 Charles G. Waldman <cgw@fnal.gov>:
Fred Drake <fdrake@acm.org>
parents: 14098
diff changeset
149
58250
edfed0e32ced Issue #2333: Backport set and dict comprehensions syntax.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 58229
diff changeset
150 #define SET_ADD 146
edfed0e32ced Issue #2333: Backport set and dict comprehensions syntax.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 58229
diff changeset
151 #define MAP_ADD 147
edfed0e32ced Issue #2333: Backport set and dict comprehensions syntax.
Alexandre Vassalotti <alexandre@peadrop.com>
parents: 58229
diff changeset
152
21609
3ba0f1b20320 Patch #494783: Rename cmp_op enumerators.
Martin v. Löwis <martin@v.loewis.de>
parents: 19051
diff changeset
153
3ba0f1b20320 Patch #494783: Rename cmp_op enumerators.
Martin v. Löwis <martin@v.loewis.de>
parents: 19051
diff changeset
154 enum cmp_op {PyCmp_LT=Py_LT, PyCmp_LE=Py_LE, PyCmp_EQ=Py_EQ, PyCmp_NE=Py_NE, PyCmp_GT=Py_GT, PyCmp_GE=Py_GE,
3ba0f1b20320 Patch #494783: Rename cmp_op enumerators.
Martin v. Löwis <martin@v.loewis.de>
parents: 19051
diff changeset
155 PyCmp_IN, PyCmp_NOT_IN, PyCmp_IS, PyCmp_IS_NOT, PyCmp_EXC_MATCH, PyCmp_BAD};
86
a6934380c6e7 "Compiling" version
Guido van Rossum <guido@python.org>
parents: 78
diff changeset
156
a6934380c6e7 "Compiling" version
Guido van Rossum <guido@python.org>
parents: 78
diff changeset
157 #define HAS_ARG(op) ((op) >= HAVE_ARGUMENT)
1329
519c25039c6a * Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents: 1288
diff changeset
158
519c25039c6a * Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents: 1288
diff changeset
159 #ifdef __cplusplus
519c25039c6a * Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents: 1288
diff changeset
160 }
519c25039c6a * Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents: 1288
diff changeset
161 #endif
519c25039c6a * Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents: 1288
diff changeset
162 #endif /* !Py_OPCODE_H */