summaryrefslogtreecommitdiffstats
path: root/Include/opcode.h
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1990-12-20 15:06:42 (GMT)
committerGuido van Rossum <guido@python.org>1990-12-20 15:06:42 (GMT)
commit3f5da24ea304e674a9abbdcffc4d671e32aa70f1 (patch)
treee932e31cb9381f40b7c87c377638216c043b5cfc /Include/opcode.h
parent226d79eb4a776dd54c9e4544b17deaf928bcef3a (diff)
downloadcpython-3f5da24ea304e674a9abbdcffc4d671e32aa70f1.zip
cpython-3f5da24ea304e674a9abbdcffc4d671e32aa70f1.tar.gz
cpython-3f5da24ea304e674a9abbdcffc4d671e32aa70f1.tar.bz2
"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 a4fe6b2..b0dc71d 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)