- {
- struct ___Object___ * tagset=tagd->flagptr;
-
- if(tagset==NULL) {
- tagd->flagptr=obj;
- } else if (tagset->type!=OBJECTARRAYTYPE) {
-#ifdef PRECISE_GC
- int ptrarray[]={2, (int) ptr, (int) obj, (int)tagd};
- struct ArrayObject * ao=allocate_newarray(&ptrarray,OBJECTARRAYTYPE,OBJECTARRAYINTERVAL);
- obj=(struct ___Object___ *)ptrarray[2];
- tagd=(struct ___TagDescriptor___ *)ptrarray[3];
-#else
- struct ArrayObject * ao=allocate_newarray(OBJECTARRAYTYPE,OBJECTARRAYINTERVAL);
-#endif
- ARRAYSET(ao, struct ___Object___ *, 0, tagd->flagptr);
- ARRAYSET(ao, struct ___Object___ *, 1, obj);
- ao->___cachedCode___=2;
- tagd->flagptr=(struct ___Object___ *)ao;
- } else {
- struct ArrayObject *ao=(struct ArrayObject *) tagset;
- if (ao->___cachedCode___<ao->___length___) {
- ARRAYSET(ao, struct ___Object___*, ao->___cachedCode___++, obj);
- } else {
- int i;
-#ifdef PRECISE_GC
- int ptrarray[]={2, (int) ptr, (int) obj, (int)tagd};
- struct ArrayObject * aonew=allocate_newarray(&ptrarray,OBJECTARRAYTYPE,OBJECTARRAYINTERVAL+ao->___length___);
- obj=(struct ___Object___ *)ptrarray[2];
- tagd=(struct ___TagDescriptor___ *)ptrarray[3];
- ao=(struct ArrayObject *)tagd->flagptr;
-#else
- struct ArrayObject * aonew=allocate_newarray(OBJECTARRAYTYPE,OBJECTARRAYINTERVAL);
-#endif
- aonew->___cachedCode___=ao->___cachedCode___+1;
- for(i=0;i<ao->___length___;i++) {
- ARRAYSET(aonew, struct ___Object___*, i, ARRAYGET(ao, struct ___Object___*, i));
- }
- ARRAYSET(aonew, struct ___Object___ *, ao->___cachedCode___, obj);
- tagd->flagptr=(struct ___Object___ *) ao;
- }
- }
- }