summaryrefslogtreecommitdiff
path: root/Include/opcode.h
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1990-12-20 15:06:42 +0000
committerGuido van Rossum <guido@python.org>1990-12-20 15:06:42 +0000
commitbadc12f65168c9a664ee07e6d10b57aaded4caee (patch)
treee932e31cb9381f40b7c87c377638216c043b5cfc /Include/opcode.h
parente0c000df2666787beacb844e3529ad148114e1bf (diff)
downloadcpython-badc12f65168c9a664ee07e6d10b57aaded4caee.tar.gz
"Compiling" version
Diffstat (limited to 'Include/opcode.h')
-rw-r--r--Include/opcode.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/Include/opcode.h b/Include/opcode.h
index a4fe6b2bdc..b0dc71dd48 100644
--- a/Include/opcode.h
+++ b/Include/opcode.h
@@ -1,9 +1,10 @@
/* Instruction opcodes for compiled code */
-#define DUP_TOP 0
+#define STOP_CODE 0
#define POP_TOP 1
#define ROT_TWO 2
#define ROT_THREE 3
+#define DUP_TOP 4
#define UNARY_POSITIVE 10
#define UNARY_NEGATIVE 11
@@ -76,5 +77,9 @@
#define SETUP_EXCEPT 121 /* "" */
#define SETUP_FINALLY 122 /* "" */
+#define SET_LINENO 127 /* Current line number */
+
/* Comparison operator codes (argument to COMPARE_OP) */
enum cmp_op {LT, LE, EQ, NE, GT, GE, IN, NOT_IN, IS, IS_NOT, EXC_MATCH, BAD};
+
+#define HAS_ARG(op) ((op) >= HAVE_ARGUMENT)