From: bdemsky Date: Thu, 8 Nov 2007 03:05:07 +0000 (+0000) Subject: bug fixes X-Git-Tag: preEdgeChange~386 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=24f4e575e7d74134ca6418fd4b06af8500bf812e;p=IRC.git bug fixes --- diff --git a/Robust/src/ClassLibrary/String.java b/Robust/src/ClassLibrary/String.java index 99481c09..1623a8e6 100644 --- a/Robust/src/ClassLibrary/String.java +++ b/Robust/src/ClassLibrary/String.java @@ -32,7 +32,7 @@ public class String { for(int i=0;icur->data; thisvar->cur=thisvar->cur->next; + return curr; } inline int Objkey(struct ObjectIterator *thisvar) { diff --git a/Robust/src/Runtime/ObjectHash.h b/Robust/src/Runtime/ObjectHash.h index 6128f78d..4a7774a9 100755 --- a/Robust/src/Runtime/ObjectHash.h +++ b/Robust/src/Runtime/ObjectHash.h @@ -65,7 +65,7 @@ inline struct ObjectIterator * noargallocateObjectIterator(); inline struct ObjectIterator * allocateObjectIterator(struct ObjectNode *start); -inline int ObjasNext(struct ObjectIterator *thisvar); +inline int ObjhasNext(struct ObjectIterator *thisvar); inline int Objnext(struct ObjectIterator *thisvar); diff --git a/Robust/src/Runtime/checkpoint.c b/Robust/src/Runtime/checkpoint.c index 64373652..7fe10c42 100644 --- a/Robust/src/Runtime/checkpoint.c +++ b/Robust/src/Runtime/checkpoint.c @@ -43,7 +43,6 @@ void freemalloc() { } } - void ** makecheckpoint(int numparams, void ** srcpointer, struct RuntimeHash * forward, struct RuntimeHash * reverse) { #ifdef PRECISE_GC void **newarray=cpmalloc(sizeof(void *)*numparams); @@ -96,7 +95,7 @@ void ** makecheckpoint(int numparams, void ** srcpointer, struct RuntimeHash * f for(i=0;i___length___)+sizeof(int)))[i]; if (objptr==NULL) { - ((void **)(((char *)& ao->___length___)+sizeof(int)))[i]=NULL; + ((void **)(((char *)& ao_cpy->___length___)+sizeof(int)))[i]=NULL; } else if (RuntimeHashcontainskey(forward, (int) objptr)) RuntimeHashget(forward,(int) objptr,(int *) &((void **)(((char *)& ao_cpy->___length___)+sizeof(int)))[i]); else { @@ -207,7 +206,6 @@ void restorecheckpoint(int numparams, void ** original, void ** checkpoint, stru int length=ao->___length___; int cpysize=sizeof(struct ArrayObject)+length*size; memcpy(cpy, ptr, cpysize); - } else if ((int)pointer==1) { /* Array of pointers */ struct ArrayObject *ao=(struct ArrayObject *) ptr; diff --git a/Robust/src/Runtime/task.c b/Robust/src/Runtime/task.c index bee156d4..4e5a79c6 100644 --- a/Robust/src/Runtime/task.c +++ b/Robust/src/Runtime/task.c @@ -403,7 +403,7 @@ void flagbody(struct ___Object___ *ptr, int flag) { int tagid=parameter->tagarray[2*i+1]; int j; for(j=0;j___cachedCode___;j++) { - if (tagid==ARRAYGET(ao, struct ___TagDescriptor___*, i)->flag) + if (tagid==ARRAYGET(ao, struct ___TagDescriptor___*, j)->flag) goto foundtag; } goto nextloop; @@ -1174,7 +1174,7 @@ void executetasks() { } /* Actually call task */ #ifdef PRECISE_GC - ((int *)taskpointerarray)[0]=currtpd->task->numParameters; + ((int *)taskpointerarray)[0]=currtpd->numParameters; taskpointerarray[1]=NULL; #endif #ifdef OPTIONAL @@ -1319,7 +1319,39 @@ void builditerators(struct taskdescriptor * task, int index, struct parameterwra } } - + void printdebug() { + int i; + int j; + for(i=0;iname); + for(j=0;jnumParameters;j++) { + struct parameterdescriptor *param=task->descriptorarray[j]; + struct parameterwrapper *parameter=param->queue; + struct ObjectHash * set=parameter->objectset; + struct ObjectIterator objit; + printf(" Parameter %d\n", j); + ObjectHashiterator(set, &objit); + while(ObjhasNext(&objit)) { + struct ___Object___ * obj=(struct ___Object___ *)Objkey(&objit); + struct ___Object___ * tagptr=obj->___tags___; + Objnext(&objit); + printf(" Contains %lx\n", obj); + printf(" flag=%d\n", obj->flag); + if (tagptr==NULL) { + } else if (tagptr->type==TAGTYPE) { + printf(" tag=%lx\n",tagptr); + } else { + int tagindex=0; + struct ArrayObject *ao=(struct ArrayObject *)tagptr; + for(;tagindex___cachedCode___;tagindex++) { + printf(" tag=%lx\n",ARRAYGET(ao, struct ___TagDescriptor___*, tagindex)); + } + } + } + } + } + } /* This function processes the task information to create queues for