Mercurial > cpython-lru_cache-weakref
comparison Python/makeopcodetargets.py @ 71402:d30b54ffd5e8
excise the remains of STOP_CODE, which hasn't done anything useful for years
| author | Benjamin Peterson <benjamin@python.org> |
|---|---|
| date | Sun, 17 Jul 2011 22:49:50 -0500 |
| parents | 3c9232a684ae |
| children |
comparison
equal
deleted
inserted
replaced
| 71386:dca12bc78326 | 71402:d30b54ffd5e8 |
|---|---|
| 21 """Write C code contents to the target file object. | 21 """Write C code contents to the target file object. |
| 22 """ | 22 """ |
| 23 opcode = find_module("opcode") | 23 opcode = find_module("opcode") |
| 24 targets = ['_unknown_opcode'] * 256 | 24 targets = ['_unknown_opcode'] * 256 |
| 25 for opname, op in opcode.opmap.items(): | 25 for opname, op in opcode.opmap.items(): |
| 26 if opname == "STOP_CODE": | |
| 27 # XXX opcode not implemented | |
| 28 continue | |
| 29 targets[op] = "TARGET_%s" % opname | 26 targets[op] = "TARGET_%s" % opname |
| 30 f.write("static void *opcode_targets[256] = {\n") | 27 f.write("static void *opcode_targets[256] = {\n") |
| 31 f.write(",\n".join([" &&%s" % s for s in targets])) | 28 f.write(",\n".join([" &&%s" % s for s in targets])) |
| 32 f.write("\n};\n") | 29 f.write("\n};\n") |
| 33 | 30 |
