| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -171,11 +171,6 @@ The Python compiler currently generates the following bytecode instructions. | |||
| 171 | 171 | ||
| 172 | 172 | **General instructions** | |
| 173 | 173 | ||
| 174 | - .. opcode:: STOP_CODE | ||
| 175 | - | ||
| 176 | - Indicates end-of-code to the compiler, not used by the interpreter. | ||
| 177 | - | ||
| 178 | - | ||
| 179 | 174 | .. opcode:: NOP | |
| 180 | 175 | ||
| 181 | 176 | Do nothing code. Used as a placeholder by the bytecode optimizer. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,7 +7,6 @@ extern "C" { | |||
| 7 | 7 | ||
| 8 | 8 | /* Instruction opcodes for compiled code */ | |
| 9 | 9 | ||
| 10 | - #define STOP_CODE 0 | ||
| 11 | 10 | #define POP_TOP 1 | |
| 12 | 11 | #define ROT_TWO 2 | |
| 13 | 12 | #define ROT_THREE 3 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -43,7 +43,6 @@ def jabs_op(name, op): | |||
| 43 | 43 | # Instruction opcodes for compiled code | |
| 44 | 44 | # Blank lines correspond to available opcodes | |
| 45 | 45 | ||
| 46 | - def_op('STOP_CODE', 0) | ||
| 47 | 46 | def_op('POP_TOP', 1) | |
| 48 | 47 | def_op('ROT_TWO', 2) | |
| 49 | 48 | def_op('ROT_THREE', 3) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -200,7 +200,7 @@ def do_disassembly_test(self, func, expected): | |||
| 200 | 200 | lines))) | |
| 201 | 201 | ||
| 202 | 202 | def test_opmap(self): | |
| 203 | - self.assertEqual(dis.opmap["STOP_CODE"], 0) | ||
| 203 | + self.assertEqual(dis.opmap["NOP"], 9) | ||
| 204 | 204 | self.assertIn(dis.opmap["LOAD_CONST"], dis.hasconst) | |
| 205 | 205 | self.assertIn(dis.opmap["STORE_NAME"], dis.hasname) | |
| 206 | 206 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1347,8 +1347,6 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag) | |||
| 1347 | 1347 | x to NULL, err to nonzero, or why to anything but WHY_NOT, | |
| 1348 | 1348 | and that no operation that succeeds does this! */ | |
| 1349 | 1349 | ||
| 1350 | - /* case STOP_CODE: this is an error! */ | ||
| 1351 | - | ||
| 1352 | 1350 | TARGET(NOP) | |
| 1353 | 1351 | FAST_DISPATCH(); | |
| 1354 | 1352 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -23,9 +23,6 @@ def write_contents(f): | |||
| 23 | 23 | opcode = find_module("opcode") | |
| 24 | 24 | targets = ['_unknown_opcode'] * 256 | |
| 25 | 25 | for opname, op in opcode.opmap.items(): | |
| 26 | - if opname == "STOP_CODE": | ||
| 27 | - # XXX opcode not implemented | ||
| 28 | - continue | ||
| 29 | 26 | targets[op] = "TARGET_%s" % opname | |
| 30 | 27 | f.write("static void *opcode_targets[256] = {\n") | |
| 31 | 28 | f.write(",\n".join([" &&%s" % s for s in targets])) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments