excise the remains of STOP_CODE, which hasn't done anything useful for years
This commit is contained in:
parent
42d1320c06
commit
76f7f4d979
|
@ -171,11 +171,6 @@ The Python compiler currently generates the following bytecode instructions.
|
|||
|
||||
**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.
|
||||
|
|
|
@ -7,7 +7,6 @@ extern "C" {
|
|||
|
||||
/* Instruction opcodes for compiled code */
|
||||
|
||||
#define STOP_CODE 0
|
||||
#define POP_TOP 1
|
||||
#define ROT_TWO 2
|
||||
#define ROT_THREE 3
|
||||
|
|
|
@ -43,7 +43,6 @@ def jabs_op(name, op):
|
|||
# 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)
|
||||
|
|
|
@ -200,7 +200,7 @@ class DisTests(unittest.TestCase):
|
|||
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)
|
||||
|
||||
|
|
|
@ -1347,8 +1347,6 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
|
|||
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();
|
||||
|
||||
|
|
|
@ -23,9 +23,6 @@ def write_contents(f):
|
|||
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]))
|
||||
|
|
Loading…
Reference in New Issue