[Python-checkins] python/dist/src/Python ceval.c,2.312,2.313

gvanrossum@users.sourceforge.net gvanrossum@users.sourceforge.net
Thu, 13 Jun 2002 10:59:53 -0700


Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv10481/Python

Modified Files:
	ceval.c 
Log Message:
The opcode FOR_LOOP no longer exists.

Index: ceval.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v
retrieving revision 2.312
retrieving revision 2.313
diff -C2 -d -r2.312 -r2.313
*** ceval.c	12 Jun 2002 03:45:21 -0000	2.312
--- ceval.c	13 Jun 2002 17:59:51 -0000	2.313
***************
*** 1943,1977 ****
  			break;
  
- 		case FOR_LOOP:
- 			/* for v in s: ...
- 			   On entry: stack contains s, i.
- 			   On exit: stack contains s, i+1, s[i];
- 			   but if loop exhausted:
- 			   	s, i are popped, and we jump */
- 			w = POP(); /* Loop index */
- 			v = POP(); /* Sequence object */
- 			u = loop_subscript(v, w);
- 			if (u != NULL) {
- 				PUSH(v);
- 				x = PyInt_FromLong(PyInt_AsLong(w)+1);
- 				PUSH(x);
- 				Py_DECREF(w);
- 				PUSH(u);
- 				if (x != NULL) continue;
- 			}
- 			else {
- 				Py_DECREF(v);
- 				Py_DECREF(w);
- 				/* A NULL can mean "s exhausted"
- 				   but also an error: */
- 				if (PyErr_Occurred())
- 					why = WHY_EXCEPTION;
- 				else {
- 					JUMPBY(oparg);
- 					continue;
- 				}
- 			}
- 			break;
- 
  		case SETUP_LOOP:
  		case SETUP_EXCEPT:
--- 1943,1946 ----