summaryrefslogtreecommitdiff
path: root/Include/opcode.h
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-06-11 15:59:43 +0000
committerBenjamin Peterson <benjamin@python.org>2008-06-11 15:59:43 +0000
commitc86ac8843577744777a613c0658c4c11bdd007c8 (patch)
tree1913a04c0677918dfe9b5aa9c330e983254b2368 /Include/opcode.h
parent55d03e068f07ff2f7e6b5c910c2c04454d4741ae (diff)
downloadcpython-c86ac8843577744777a613c0658c4c11bdd007c8.tar.gz
#3021: Antoine Pitrou's Lexical exception handlers
Diffstat (limited to 'Include/opcode.h')
-rw-r--r--Include/opcode.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/Include/opcode.h b/Include/opcode.h
index 7bdf1c9ad8..6da9877098 100644
--- a/Include/opcode.h
+++ b/Include/opcode.h
@@ -70,6 +70,7 @@ extern "C" {
#define YIELD_VALUE 86
#define POP_BLOCK 87
#define END_FINALLY 88
+#define POP_EXCEPT 89
#define HAVE_ARGUMENT 90 /* Opcodes from here have an argument: */
@@ -133,6 +134,13 @@ extern "C" {
#define EXTENDED_ARG 143
+/* EXCEPT_HANDLER is a special, implicit block type which is created when
+ entering an except handler. It is not an opcode but we define it here
+ as we want it to be available to both frameobject.c and ceval.c, while
+ remaining private.*/
+#define EXCEPT_HANDLER 257
+
+
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,
PyCmp_IN, PyCmp_NOT_IN, PyCmp_IS, PyCmp_IS_NOT, PyCmp_EXC_MATCH, PyCmp_BAD};