[Python-checkins] python/dist/src/Python ceval.c,2.395,2.396

rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Sun Apr 11 10:59:35 EDT 2004


Update of /cvsroot/python/python/dist/src/Python
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28196

Modified Files:
	ceval.c 
Log Message:
Some (but not all) of the why code bitfield tests ran faster as
separate equality tests.  Now, all are set to their best timing.



Index: ceval.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v
retrieving revision 2.395
retrieving revision 2.396
diff -C2 -d -r2.395 -r2.396
*** ceval.c	10 Apr 2004 23:34:17 -0000	2.395
--- ceval.c	11 Apr 2004 14:59:33 -0000	2.396
***************
*** 1651,1655 ****
  				why = (enum why_code) PyInt_AS_LONG(v);
  				assert(why != WHY_YIELD);
! 				if (why & (WHY_RETURN | WHY_CONTINUE))
  					retval = POP();
  			}
--- 1651,1656 ----
  				why = (enum why_code) PyInt_AS_LONG(v);
  				assert(why != WHY_YIELD);
! 				if (why == WHY_RETURN ||
! 				    why == WHY_CONTINUE)
  					retval = POP();
  			}
***************
*** 2290,2294 ****
  		/* Double-check exception status */
  
! 		if (why & (WHY_EXCEPTION | WHY_RERAISE)) {
  			if (!PyErr_Occurred()) {
  				PyErr_SetString(PyExc_SystemError,
--- 2291,2295 ----
  		/* Double-check exception status */
  
! 		if (why == WHY_EXCEPTION || why == WHY_RERAISE) {
  			if (!PyErr_Occurred()) {
  				PyErr_SetString(PyExc_SystemError,
***************
*** 2412,2416 ****
  	if (tstate->use_tracing) {
  		if (tstate->c_tracefunc
! 		    && (why & (WHY_RETURN | WHY_YIELD))) {
  			if (call_trace(tstate->c_tracefunc,
  				       tstate->c_traceobj, f,
--- 2413,2417 ----
  	if (tstate->use_tracing) {
  		if (tstate->c_tracefunc
! 		    && (why == WHY_RETURN || why == WHY_YIELD)) {
  			if (call_trace(tstate->c_tracefunc,
  				       tstate->c_traceobj, f,




More information about the Python-checkins mailing list