diff options
author | Benjamin Peterson <benjamin@python.org> | 2015-05-28 19:40:08 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2015-05-28 19:40:08 (GMT) |
commit | 264be6f48f107d831ccecdf68a1b82c7b61f3a17 (patch) | |
tree | d80c956f969469749ce768f857fd7c680fde0259 | |
parent | ee85339cc69af6b29a37b85a5695fb9c12f0f0a3 (diff) | |
download | cpython-264be6f48f107d831ccecdf68a1b82c7b61f3a17.zip cpython-264be6f48f107d831ccecdf68a1b82c7b61f3a17.tar.gz cpython-264be6f48f107d831ccecdf68a1b82c7b61f3a17.tar.bz2 |
remove STORE_MAP, since it's unused
-rw-r--r-- | Doc/library/dis.rst | 4 | ||||
-rw-r--r-- | Include/opcode.h | 1 | ||||
-rw-r--r-- | Lib/opcode.py | 1 | ||||
-rw-r--r-- | Python/ceval.c | 15 | ||||
-rw-r--r-- | Python/compile.c | 2 | ||||
-rw-r--r-- | Python/opcode_targets.h | 2 |
6 files changed, 1 insertions, 24 deletions
diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst index 5ef5e8d..2e938ab 100644 --- a/Doc/library/dis.rst +++ b/Doc/library/dis.rst @@ -848,10 +848,6 @@ the more significant byte last. Pushes a try block from a try-except clause onto the block stack. *delta* points to the finally block. -.. opcode:: STORE_MAP - - Store a key and value pair in a dictionary. Pops the key and value while - leaving the dictionary on the stack. .. opcode:: LOAD_FAST (var_num) diff --git a/Include/opcode.h b/Include/opcode.h index 3f97c9a..ca59338 100644 --- a/Include/opcode.h +++ b/Include/opcode.h @@ -32,7 +32,6 @@ extern "C" { #define GET_AITER 50 #define GET_ANEXT 51 #define BEFORE_ASYNC_WITH 52 -#define STORE_MAP 54 #define INPLACE_ADD 55 #define INPLACE_SUBTRACT 56 #define INPLACE_MULTIPLY 57 diff --git a/Lib/opcode.py b/Lib/opcode.py index 24e6c3f..c7b3443 100644 --- a/Lib/opcode.py +++ b/Lib/opcode.py @@ -89,7 +89,6 @@ def_op('GET_AITER', 50) def_op('GET_ANEXT', 51) def_op('BEFORE_ASYNC_WITH', 52) -def_op('STORE_MAP', 54) def_op('INPLACE_ADD', 55) def_op('INPLACE_SUBTRACT', 56) def_op('INPLACE_MULTIPLY', 57) diff --git a/Python/ceval.c b/Python/ceval.c index eb36975..06772b1 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -2680,21 +2680,6 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag) DISPATCH(); } - TARGET(STORE_MAP) { - PyObject *key = TOP(); - PyObject *value = SECOND(); - PyObject *map = THIRD(); - int err; - STACKADJ(-2); - assert(PyDict_CheckExact(map)); - err = PyDict_SetItem(map, key, value); - Py_DECREF(value); - Py_DECREF(key); - if (err != 0) - goto error; - DISPATCH(); - } - TARGET(MAP_ADD) { PyObject *key = TOP(); PyObject *value = SECOND(); diff --git a/Python/compile.c b/Python/compile.c index 5905910..29b88ff 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -903,8 +903,6 @@ PyCompile_OpcodeStackEffect(int opcode, int oparg) return -1; case STORE_SUBSCR: return -3; - case STORE_MAP: - return -2; case DELETE_SUBSCR: return -2; diff --git a/Python/opcode_targets.h b/Python/opcode_targets.h index 569e7590..ed2a135 100644 --- a/Python/opcode_targets.h +++ b/Python/opcode_targets.h @@ -53,7 +53,7 @@ static void *opcode_targets[256] = { &&TARGET_GET_ANEXT, &&TARGET_BEFORE_ASYNC_WITH, &&_unknown_opcode, - &&TARGET_STORE_MAP, + &&_unknown_opcode, &&TARGET_INPLACE_ADD, &&TARGET_INPLACE_SUBTRACT, &&TARGET_INPLACE_MULTIPLY, |