Commits

Anonymous committed 7494895

#111 mainlined directly

Comments (0)

Files changed (4)

 
     /* Init instruction pointer, line number and block stack */
     pframe->fo_ip = pco->co_codeaddr;
-    pframe->fo_line = 0;
     pframe->fo_blockstack = C_NULL;
 
     /* Get globals and attrs from the function object */
     /** Instrxn ptr (pts into memspace) */
     uint8_t const *fo_ip;
 
-    /** Current source line num */
-    uint16_t fo_line;
-
     /** Linked list of blocks */
     pPmBlock_t fo_blockstack;
 
                 IP = FP->fo_func->f_co->co_codeaddr + t16;
                 continue;
 
-            case FOR_LOOP:
-                /* WARNING #111: Old bytecodes shall be removed in r 06 */
-                /* Get skip bytes */
-                t16 = GET_ARG();
-
-                /* Get current index */
-                pobj1 = PM_POP();
-
-                /* Get the sequence */
-                pobj2 = PM_POP();
-
-                /* Ensure index is an int */
-                if (OBJ_GET_TYPE(pobj1) != OBJ_TYPE_INT)
-                {
-                    PM_RAISE(retval, PM_RET_EX_INDX);
-                    break;
-                }
-
-                /* If it's a tuple */
-                if (OBJ_GET_TYPE(pobj2) == OBJ_TYPE_TUP)
-                {
-                    /* If tup is exhausted, incr IP by delta */
-                    if (((pPmInt_t)pobj1)->val >= ((pPmTuple_t)pobj2)->length)
-                    {
-                        IP += t16;
-                        continue;
-                    }
-
-                    /* Get item, incr counter */
-                    pobj3 = ((pPmTuple_t)pobj2)->val[((pPmInt_t)pobj1)->val];
-                    retval = int_new(((pPmInt_t)pobj1)->val + 1, &pobj1);
-                    PM_BREAK_IF_ERROR(retval);
-                }
-
-                /* If it's a list */
-                else if (OBJ_GET_TYPE(pobj2) == OBJ_TYPE_LST)
-                {
-                    /* If list is exhausted, incr IP by delta */
-                    if (((pPmInt_t)pobj1)->val >= ((pPmList_t)pobj2)->length)
-                    {
-                        IP += t16;
-                        continue;
-                    }
-
-                    /* Get item */
-                    retval = list_getItem(pobj2,
-                                          (int16_t)(((pPmInt_t)pobj1)->val),
-                                          &pobj3);
-                    PM_BREAK_IF_ERROR(retval);
-
-                    /* Incr counter */
-                    retval = int_new(((pPmInt_t)pobj1)->val + 1, &pobj1);
-                    PM_BREAK_IF_ERROR(retval);
-                }
-
-                /* TypeError: loop over non-sequence */
-                else
-                {
-                    PM_RAISE(retval, PM_RET_EX_TYPE);
-                    break;
-                }
-
-                /* Push tup, counter and item */
-                PM_PUSH(pobj2);
-                PM_PUSH(pobj1);
-                PM_PUSH(pobj3);
-                continue;
-
             case LOAD_GLOBAL:
                 /* Get name */
                 t16 = GET_ARG();
                 FP->fo_locals[t16] = PM_POP();
                 continue;
 
-            case SET_LINENO:
-                /* WARNING #111: Old bytecodes shall be removed in r 06 */
-                FP->fo_line = GET_ARG();
-                continue;
-
             case RAISE_VARARGS:
                 t16 = GET_ARG();
 
     JUMP_IF_FALSE,
     JUMP_IF_TRUE,               /* 0x70 */
     JUMP_ABSOLUTE,
-    FOR_LOOP,                   /* Deprecated in Python, legacy in PyMite */
+    UNUSED_72,
     UNUSED_73,
     LOAD_GLOBAL,
     UNUSED_75,
     LOAD_FAST,
     STORE_FAST,
     DELETE_FAST,
-    SET_LINENO,                 /* Deprecated in Python, legacy in PyMite */
+    UNUSED_79,
     UNUSED_80,                  /* 0x80 */
     UNUSED_81,
     RAISE_VARARGS,              /* d130 */
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.