[Python-checkins] CVS: python/dist/src/Python ceval.c,2.253,2.254

Tim Peters tim_one@users.sourceforge.net
Fri, 22 Jun 2001 22:26:58 -0700


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

Modified Files:
	ceval.c 
Log Message:
PyFrameObject:  rename f_stackbottom to f_stacktop, since it points to
the next free valuestack slot, not to the base (in America, stacks push
and pop at the top -- they mutate at the bottom in Australia <winK>).
eval_frame():  assert that f_stacktop isn't NULL upon entry.
frame_delloc():  avoid ordered pointer comparisons involving f_stacktop
when f_stacktop is NULL.


Index: ceval.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v
retrieving revision 2.253
retrieving revision 2.254
diff -C2 -r2.253 -r2.254
*** ceval.c	2001/06/21 02:49:55	2.253
--- ceval.c	2001/06/23 05:26:56	2.254
***************
*** 148,154 ****
  		return NULL;
  	}
! 	if (f->f_stackbottom == NULL) {
  		return NULL;
- 	}
  
  	/* Generators always return to their most recent caller, not
--- 148,153 ----
  		return NULL;
  	}
! 	if (f->f_stacktop == NULL)
  		return NULL;
  
  	/* Generators always return to their most recent caller, not
***************
*** 585,590 ****
  	_PyCode_GETCODEPTR(co, &first_instr);
  	next_instr = first_instr + f->f_lasti;
! 	stack_pointer = f->f_stackbottom;
! 	f->f_stackbottom = NULL;
  
  #ifdef LLTRACE
--- 584,590 ----
  	_PyCode_GETCODEPTR(co, &first_instr);
  	next_instr = first_instr + f->f_lasti;
! 	stack_pointer = f->f_stacktop;
! 	assert(stack_pointer != NULL);
! 	f->f_stacktop = NULL;
  
  #ifdef LLTRACE
***************
*** 1372,1376 ****
  		case YIELD_VALUE:
  			retval = POP();
! 			f->f_stackbottom = stack_pointer;
  			f->f_lasti = INSTR_OFFSET();
  			why = WHY_YIELD;
--- 1372,1376 ----
  		case YIELD_VALUE:
  			retval = POP();
! 			f->f_stacktop = stack_pointer;
  			f->f_lasti = INSTR_OFFSET();
  			why = WHY_YIELD;