[Commit] nickle sched.c,1.51,1.52
Keith Packard
commit at keithp.com
Thu Jun 26 05:18:24 PDT 2003
Committed by: keithp
Update of /local/src/CVS/nickle
In directory home.keithp.com:/tmp/cvs-serv8232
Modified Files:
sched.c
Log Message:
Make sure continuations are initialized in the right order to preserve invarients tested in ContinuationMark
Index: sched.c
===================================================================
RCS file: /local/src/CVS/nickle/sched.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- sched.c 25 Jun 2003 19:49:14 -0000 1.51
+++ sched.c 26 Jun 2003 11:18:22 -0000 1.52
@@ -668,8 +668,8 @@
Value ret;
ret = ALLOCATE (&ContinuationRep.data, sizeof (Continuation));
- ret->continuation.pc = pc;
ContinuationSet (&ret->continuation, continuation);
+ ret->continuation.pc = pc;
RETURN (ret);
}
@@ -732,12 +732,13 @@
ContinuationSet (ContinuationPtr dst, ContinuationPtr src)
{
ENTER ();
+ dst->value = src->value;
+ dst->pc = 0;
dst->obj = src->obj;
dst->frame = src->frame;
- dst->value = src->value;
+ dst->stack = 0;
dst->catches = src->catches;
dst->twixts = src->twixts;
- dst->stack = 0;
/* last, to make sure remaining entries are initialized before any GC */
dst->stack = StackCopy (src->stack);
RETURN (src->pc);
@@ -1017,13 +1018,13 @@
TwixtPtr twixt;
twixt = ALLOCATE (&TwixtType, sizeof (Twixt));
- twixt->continuation.pc = enter;
twixt->leave = leave;
if (continuation->twixts)
twixt->depth = continuation->twixts->depth + 1;
else
twixt->depth = 1;
ContinuationSet (&twixt->continuation, continuation);
+ twixt->continuation.pc = enter;
RETURN (twixt);
}
More information about the Commit
mailing list