| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent efb9097 commit fea59e7
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -556,13 +556,9 @@ \subsection{Python Byte Code Instructions} | |||
| 556 | 556 | popped, and the byte code counter is incremented by \var{delta}. | |
| 557 | 557 | \end{opcodedesc} | |
| 558 | 558 | ||
| 559 | - \begin{opcodedesc}{FOR_LOOP}{delta} | ||
| 560 | - This opcode is obsolete. | ||
| 561 | - %Iterate over a sequence. TOS is the current index, TOS1 the sequence. | ||
| 562 | - %First, the next element is computed. If the sequence is exhausted, | ||
| 563 | - %increment byte code counter by \var{delta}. Otherwise, push the | ||
| 564 | - %sequence, the incremented counter, and the current item onto the stack. | ||
| 565 | - \end{opcodedesc} | ||
| 559 | + %\begin{opcodedesc}{FOR_LOOP}{delta} | ||
| 560 | + %This opcode is obsolete. | ||
| 561 | + %\end{opcodedesc} | ||
| 566 | 562 | ||
| 567 | 563 | %\begin{opcodedesc}{LOAD_LOCAL}{namei} | |
| 568 | 564 | %This opcode is obsolete. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -107,7 +107,6 @@ extern "C" { | |||
| 107 | 107 | #define JUMP_IF_FALSE 111 /* "" */ | |
| 108 | 108 | #define JUMP_IF_TRUE 112 /* "" */ | |
| 109 | 109 | #define JUMP_ABSOLUTE 113 /* Target byte offset from beginning of code */ | |
| 110 | - #define FOR_LOOP 114 /* Number of bytes to skip */ | ||
| 111 | 110 | ||
| 112 | 111 | #define LOAD_GLOBAL 116 /* Index in name list */ | |
| 113 | 112 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -262,7 +262,6 @@ def jabs_op(name, op): | |||
| 262 | 262 | jrel_op('JUMP_IF_FALSE', 111) # "" | |
| 263 | 263 | jrel_op('JUMP_IF_TRUE', 112) # "" | |
| 264 | 264 | jabs_op('JUMP_ABSOLUTE', 113) # Target byte offset from beginning of code | |
| 265 | - jrel_op('FOR_LOOP', 114) # Number of bytes to skip | ||
| 266 | 265 | ||
| 267 | 266 | name_op('LOAD_GLOBAL', 116) # Index in name list | |
| 268 | 267 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1942,37 +1942,6 @@ eval_frame(PyFrameObject *f) | |||
| 1942 | 1942 | } | |
| 1943 | 1943 | break; | |
| 1944 | 1944 | ||
| 1945 | - case FOR_LOOP: | ||
| 1946 | - /* for v in s: ... | ||
| 1947 | - On entry: stack contains s, i. | ||
| 1948 | - On exit: stack contains s, i+1, s[i]; | ||
| 1949 | - but if loop exhausted: | ||
| 1950 | - s, i are popped, and we jump */ | ||
| 1951 | - w = POP(); /* Loop index */ | ||
| 1952 | - v = POP(); /* Sequence object */ | ||
| 1953 | - u = loop_subscript(v, w); | ||
| 1954 | - if (u != NULL) { | ||
| 1955 | - PUSH(v); | ||
| 1956 | - x = PyInt_FromLong(PyInt_AsLong(w)+1); | ||
| 1957 | - PUSH(x); | ||
| 1958 | - Py_DECREF(w); | ||
| 1959 | - PUSH(u); | ||
| 1960 | - if (x != NULL) continue; | ||
| 1961 | - } | ||
| 1962 | - else { | ||
| 1963 | - Py_DECREF(v); | ||
| 1964 | - Py_DECREF(w); | ||
| 1965 | - /* A NULL can mean "s exhausted" | ||
| 1966 | - but also an error: */ | ||
| 1967 | - if (PyErr_Occurred()) | ||
| 1968 | - why = WHY_EXCEPTION; | ||
| 1969 | - else { | ||
| 1970 | - JUMPBY(oparg); | ||
| 1971 | - continue; | ||
| 1972 | - } | ||
| 1973 | - } | ||
| 1974 | - break; | ||
| 1975 | - | ||
| 1976 | 1945 | case SETUP_LOOP: | |
| 1977 | 1946 | case SETUP_EXCEPT: | |
| 1978 | 1947 | case SETUP_FINALLY: | |
| Back | FazBrowse Home | New Git URL |
0 commit comments