]> granicus.if.org Git - python/commitdiff
remove STORE_MAP, since it's unused
authorBenjamin Peterson <benjamin@python.org>
Thu, 28 May 2015 19:40:08 +0000 (14:40 -0500)
committerBenjamin Peterson <benjamin@python.org>
Thu, 28 May 2015 19:40:08 +0000 (14:40 -0500)
Doc/library/dis.rst
Include/opcode.h
Lib/opcode.py
Python/ceval.c
Python/compile.c
Python/opcode_targets.h

index 5ef5e8d1edef8e83b91cdad16b17ddbb5b6ce9b0..2e938ab12fa60680d4ee70cef30555e577a47445 100644 (file)
@@ -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)
 
index 3f97c9a8798efa47ab874918281a0e3af19729b3..ca593380617f72c2022df834e4fea9f9bca363e2 100644 (file)
@@ -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
index 24e6c3f3d2e35b29c01ab2a0a564593911c077bf..c7b344372cf4b09f558ebc154e0625e92f50a48f 100644 (file)
@@ -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)
index eb369750122b7524d9277e37f29a9415d257d2b6..06772b1bece86821ca0817d1303eeb9761c33ad0 100644 (file)
@@ -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();
index 59059105748485cb8e7e38f17f946be7bbc1df12..29b88ff0e3dccb0b9bfeb1e8e6253e7b6ad4221b 100644 (file)
@@ -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;
 
index 569e75904893f91ba7adae35b26e2b0778437ac7..ed2a135a3871da16173b01519488b2accbc3ea32 100644 (file)
@@ -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,