excise the remains of STOP_CODE, which hasn't done anything useful for years
diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst
index 79cc583..cb429c8 100644
--- a/Doc/library/dis.rst
+++ b/Doc/library/dis.rst
@@ -171,11 +171,6 @@
**General instructions**
-.. opcode:: STOP_CODE
-
- Indicates end-of-code to the compiler, not used by the interpreter.
-
-
.. opcode:: NOP
Do nothing code. Used as a placeholder by the bytecode optimizer.
diff --git a/Include/opcode.h b/Include/opcode.h
index 6b10944..ece713e 100644
--- a/Include/opcode.h
+++ b/Include/opcode.h
@@ -7,7 +7,6 @@
/* Instruction opcodes for compiled code */
-#define STOP_CODE 0
#define POP_TOP 1
#define ROT_TWO 2
#define ROT_THREE 3
diff --git a/Lib/opcode.py b/Lib/opcode.py
index 8e15d13..b631b25 100644
--- a/Lib/opcode.py
+++ b/Lib/opcode.py
@@ -43,7 +43,6 @@
# Instruction opcodes for compiled code
# Blank lines correspond to available opcodes
-def_op('STOP_CODE', 0)
def_op('POP_TOP', 1)
def_op('ROT_TWO', 2)
def_op('ROT_THREE', 3)
diff --git a/Lib/test/test_dis.py b/Lib/test/test_dis.py
index 643e2e6..4b0b02a 100644
--- a/Lib/test/test_dis.py
+++ b/Lib/test/test_dis.py
@@ -200,7 +200,7 @@
lines)))
def test_opmap(self):
- self.assertEqual(dis.opmap["STOP_CODE"], 0)
+ self.assertEqual(dis.opmap["NOP"], 9)
self.assertIn(dis.opmap["LOAD_CONST"], dis.hasconst)
self.assertIn(dis.opmap["STORE_NAME"], dis.hasname)
diff --git a/Python/ceval.c b/Python/ceval.c
index 6d49363..068da6f 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -1347,8 +1347,6 @@
x to NULL, err to nonzero, or why to anything but WHY_NOT,
and that no operation that succeeds does this! */
- /* case STOP_CODE: this is an error! */
-
TARGET(NOP)
FAST_DISPATCH();
diff --git a/Python/makeopcodetargets.py b/Python/makeopcodetargets.py
index 5d8e5a9..d9a0855 100755
--- a/Python/makeopcodetargets.py
+++ b/Python/makeopcodetargets.py
@@ -23,9 +23,6 @@
opcode = find_module("opcode")
targets = ['_unknown_opcode'] * 256
for opname, op in opcode.opmap.items():
- if opname == "STOP_CODE":
- # XXX opcode not implemented
- continue
targets[op] = "TARGET_%s" % opname
f.write("static void *opcode_targets[256] = {\n")
f.write(",\n".join([" &&%s" % s for s in targets]))