[Stackless-checkins] CVS: slpdev/src/2.3/dev/Stackless/module channelobject.c, 1.52, 1.53 scheduling.c, 1.109, 1.110 stacklessmodule.c, 1.177, 1.178

Christian Tismer tismer at centera.de
Fri Jul 9 14:35:55 CEST 2004


Update of /home/cvs/slpdev/src/2.3/dev/Stackless/module
In directory centera.de:/tmp/cvs-serv6438

Modified Files:
	channelobject.c scheduling.c stacklessmodule.c 
Log Message:
channel iterators and sequence sending are ready.
Slight speed improvement over direct receive/send,
but much less than I hoped.

Index: channelobject.c
===================================================================
RCS file: /home/cvs/slpdev/src/2.3/dev/Stackless/module/channelobject.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -C2 -d -r1.52 -r1.53
*** channelobject.c	8 Jul 2004 23:15:57 -0000	1.52
--- channelobject.c	9 Jul 2004 12:35:52 -0000	1.53
***************
*** 671,678 ****
--- 671,681 ----
  channel_iternext(PyChannelObject *self)
  {
+ 	STACKLESS_GETARG();
+ 
  	if (self->flags.closing && self->balance == 0) {
  		/* signal the end of the iteration */
  		return NULL;
  	}
+ 	STACKLESS_PROMOTE_ALL();
  	return impl_channel_receive(self);
  }
***************
*** 1031,1037 ****
  };
  
! STACKLESS_DECLARE_METHOD(&_PyChannel_Type, tp_iternext)
  
! PyTypeObject *PyChannel_TypePtr = NULL;
  
  /******************************************************
--- 1034,1040 ----
  };
  
! STACKLESS_DECLARE_METHOD(PyChannel_TypePtr, tp_iternext)
  
! PyTypeObject *PyChannel_TypePtr = &_PyChannel_Type;
  
  /******************************************************

Index: scheduling.c
===================================================================
RCS file: /home/cvs/slpdev/src/2.3/dev/Stackless/module/scheduling.c,v
retrieving revision 1.109
retrieving revision 1.110
diff -C2 -d -r1.109 -r1.110
*** scheduling.c	8 Jul 2004 23:15:58 -0000	1.109
--- scheduling.c	9 Jul 2004 12:35:52 -0000	1.110
***************
*** 1066,1070 ****
  	if (PyBomb_Check(retval))
  		retval = slp_bomb_explode(ts->st.current);
! 	while (ts->st.current != NULL) {
  		retval = slp_frame_dispatch_top(retval);
  		retval = tasklet_end(retval);
--- 1066,1071 ----
  	if (PyBomb_Check(retval))
  		retval = slp_bomb_explode(ts->st.current);
! 	while (ts->st.main != NULL) {
! 		/* XXX correct condition? or current? */
  		retval = slp_frame_dispatch_top(retval);
  		retval = tasklet_end(retval);

Index: stacklessmodule.c
===================================================================
RCS file: /home/cvs/slpdev/src/2.3/dev/Stackless/module/stacklessmodule.c,v
retrieving revision 1.177
retrieving revision 1.178
diff -C2 -d -r1.177 -r1.178
*** stacklessmodule.c	8 Jul 2004 23:15:58 -0000	1.177
--- stacklessmodule.c	9 Jul 2004 12:35:52 -0000	1.178
***************
*** 1010,1014 ****
  
  	for (; p->type != NULL; p++) {
! 		((signed char *) p->type)[p->offset] = -1;
  	}
  	return 0;
--- 1010,1020 ----
  
  	for (; p->type != NULL; p++) {
! 		PyTypeObject *t = p->type;
! 		int ind = p->offset & MFLAG_IND;
! 		int ofs = p->offset - ind;
! 
! 		if (ind)
! 			t = *((PyTypeObject **)t);
! 		((signed char *) t)[ofs] = -1;
  	}
  	return 0;


_______________________________________________
Stackless-checkins mailing list
Stackless-checkins at stackless.com
http://www.stackless.com/mailman/listinfo/stackless-checkins



More information about the Stackless-checkins mailing list