/[gcl]/gcl/o/sgbc.c
ViewVC logotype

Diff of /gcl/o/sgbc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.29 by camm, Sun Sep 18 02:48:59 2005 UTC revision 1.30 by camm, Thu Oct 6 20:30:08 2005 UTC
# Line 99  sgc_mark_cons(object x) { Line 99  sgc_mark_cons(object x) {
99        
100   MARK_CAR:   MARK_CAR:
101    if (!is_marked_or_free(x->c.c_car)) {    if (!is_marked_or_free(x->c.c_car)) {
102      if (type_of(x->c.c_car) == t_cons) {      if (consp(x->c.c_car)) {
103        mark(x->c.c_car);        mark(x->c.c_car);
104        sgc_mark_cons(x->c.c_car);        sgc_mark_cons(x->c.c_car);
105      } else      } else
# Line 112  sgc_mark_cons(object x) { Line 112  sgc_mark_cons(object x) {
112    return;    return;
113   WRITABLE_CDR:   WRITABLE_CDR:
114    if (is_marked_or_free(x)) return;    if (is_marked_or_free(x)) return;
115    if (type_of(x) == t_cons) {    if (consp(x)) {
116      mark(x);      mark(x);
117      goto BEGIN;      goto BEGIN;
118    }    }
# Line 710  sgc_mark_phase(void) { Line 710  sgc_mark_phase(void) {
710            object x = (object) p;            object x = (object) p;
711            if (SGC_OR_M(x))            if (SGC_OR_M(x))
712              continue;              continue;
713            if (type_of(x)==t_cons) {            if (consp(x)) {
714              mark(x);              mark(x);
715              sgc_mark_cons(x);              sgc_mark_cons(x);
716            } else            } else
# Line 851  sgc_sweep_phase(void) { Line 851  sgc_sweep_phase(void) {
851            unmark(x);            unmark(x);
852            continue;            continue;
853          }          }
854          if(!is_cons(x) && x->d.s == SGC_NORMAL)          if(!valid_cdr(x) && x->d.s == SGC_NORMAL)
855            continue;            continue;
856                    
857          /* it is ok to free x */          /* it is ok to free x */
# Line 884  sgc_sweep_phase(void) { Line 884  sgc_sweep_phase(void) {
884                    
885          SET_LINK(x,f);          SET_LINK(x,f);
886          make_free(x);          make_free(x);
887          if (!is_cons(x)) x->d.s = (int)SGC_RECENT;          if (!valid_cdr(x)) x->d.s = (int)SGC_RECENT;
888          f = x;          f = x;
889          k++;          k++;
890        }        }
# Line 1505  sgc_start(void) { Line 1505  sgc_start(void) {
1505  #endif  #endif
1506          if (ON_SGC_PAGE(f)) {          if (ON_SGC_PAGE(f)) {
1507            SET_LINK(f,x);            SET_LINK(f,x);
1508            if (!is_cons(f)) f->d.s = SGC_RECENT;            if (!valid_cdr(f)) f->d.s = SGC_RECENT;
1509            x=f;            x=f;
1510            count++;            count++;
1511          } else {          } else {
1512            SET_LINK(f,y);            SET_LINK(f,y);
1513            if (!is_cons(f)) f->d.s = SGC_NORMAL;            if (!valid_cdr(f)) f->d.s = SGC_NORMAL;
1514            y=f;            y=f;
1515          }          }
1516          f=next;          f=next;
# Line 1617  sgc_quit(void) { Line 1617  sgc_quit(void) {
1617              if (type_map[i]==t && (sgc_type_map[i] & SGC_PAGE_FLAG))              if (type_map[i]==t && (sgc_type_map[i] & SGC_PAGE_FLAG))
1618                for (p= pagetochar(i),j = tm->tm_nppage;                for (p= pagetochar(i),j = tm->tm_nppage;
1619                     j > 0; --j, p += tm->tm_size)                     j > 0; --j, p += tm->tm_size)
1620                  if (!is_cons((object)p))  ((object) p)->d.s = SGC_NORMAL;                  if (!valid_cdr((object)p))  ((object) p)->d.s = SGC_NORMAL;
1621          }          }
1622        }        }
1623      }      }

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.30

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26