From bd4e22130f0d80e2bf395fb7cd3c9295ea0f11ed Mon Sep 17 00:00:00 2001 From: bdemsky Date: Sun, 10 Apr 2011 22:29:41 +0000 Subject: [PATCH] bug fixes --- Robust/src/Runtime/garbage.c | 44 ++++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a/Robust/src/Runtime/garbage.c b/Robust/src/Runtime/garbage.c index 1df73122..615747f2 100644 --- a/Robust/src/Runtime/garbage.c +++ b/Robust/src/Runtime/garbage.c @@ -115,7 +115,7 @@ __thread SESEcommon* seseCommon; dst=copy; } #else #define ENQUEUE(orig, dst) \ - if (orig>=curr_heapbase&&orignext; } } @@ -721,6 +715,19 @@ void collect(struct garbagelist * stackptr) { struct ArrayObject *ao=(struct ArrayObject *) ptr; struct ArrayObject *ao_cpy=(struct ArrayObject *) cpy; SENQUEUE((void *)ao->___objlocation___, *((void **)&ao_cpy->___objlocation___)); +#endif +#ifdef THREADS + { + pointer=pointerarray[OBJECTTYPE]; + //handle object class + INTPTR size=pointer[0]; + int i; + for(i=1; i<=size; i++) { + unsigned int offset=pointer[i]; + void * objptr=*((void **)(((char *)ptr)+offset)); + ENQUEUE(objptr, *((void **)(((char *)cpy)+offset))); + } + } #endif } else if (((INTPTR)pointer)==1) { /* Array of pointers */ @@ -739,6 +746,19 @@ void collect(struct garbagelist * stackptr) { void *objptr=((void **)(((char *)&ao->___length___)+sizeof(int)))[i]; ENQUEUE(objptr, ((void **)(((char *)&ao_cpy->___length___)+sizeof(int)))[i]); } +#ifdef THREADS + { + pointer=pointerarray[OBJECTTYPE]; + //handle object class + INTPTR size=pointer[0]; + int i; + for(i=1; i<=size; i++) { + unsigned int offset=pointer[i]; + void * objptr=*((void **)(((char *)ptr)+offset)); + ENQUEUE(objptr, *((void **)(((char *)cpy)+offset))); + } + } +#endif } else { INTPTR size=pointer[0]; int i; -- 2.34.1