aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Tools/scripts/generate_opcode_h.py
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/scripts/generate_opcode_h.py')
-rw-r--r--Tools/scripts/generate_opcode_h.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/Tools/scripts/generate_opcode_h.py b/Tools/scripts/generate_opcode_h.py
index cba13b24213..290f6251af1 100644
--- a/Tools/scripts/generate_opcode_h.py
+++ b/Tools/scripts/generate_opcode_h.py
@@ -16,14 +16,12 @@ extern "C" {
""".lstrip()
footer = """
-/* 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
-
#define HAS_ARG(op) ((op) >= HAVE_ARGUMENT)
+/* Reserve some bytecodes for internal use in the compiler.
+ * The value of 240 is arbitrary. */
+#define IS_ARTIFICIAL(op) ((op) > 240)
+
#ifdef __cplusplus
}
#endif