Branch: Tag:

2000-06-12

2000-06-12 21:41:41 by Martin Stjernholm <mast@lysator.liu.se>

Fixed another bug with GC_DONT_POP.

Rev: src/gc.c:1.95
Rev: src/gc.h:1.50
Rev: src/testsuite.in:1.302

1: - test_true([["$Id: testsuite.in,v 1.301 2000/06/12 13:52:32 mast Exp $"]]); + test_true([["$Id: testsuite.in,v 1.302 2000/06/12 21:41:41 mast Exp $"]]);      cond([[all_constants()->_verify_internals]],   [[
1698:    return gc()>0;    ]],1)    -  test_any([[mapping q=([ "t":class {} ()]); gc(); if(!objectp(q->t)) return -1; set_weak_flag(q,1); gc(); if(objectp(q->t)) return -2; return 0;]],0); -  -  test_do([[class bar { object foo; void create(void|object tmp) { foo=tmp; } }; -  object o=bar(),o2=o; -  for(int e=0;e<10000;e++) o=bar(o); -  o2->foo=o; -  o=o2=0; -  gc(); -  ]]) +     test_true([[    object o = class{}();    mapping m = ([class{}(): o, o: class{}()]);
2330:    live[1]->x = live[0];    dead[0]->x = dead[0];    }}), +  ({1, 2, 0, 2, lambda() { // 60 +  live[0]->x = dead_nested[0], live[0]->y = dead_nested[0]; +  dead[0]->x = dead[0], dead[0]->y = dead_nested[0]; +  dead[1]->x = dead[1], dead[1]->y = dead_nested[1]; +  dead_nested[0]->x = live[0], dead_nested[0]->y = dead_nested[1]; +  }}), +  ({1, 2, 0, 2, lambda() { // 61 +  live[0]->x = dead_nested[0], live[0]->y = dead_nested[0]; +  dead[0]->x = dead[0], dead[0]->y = dead_nested[0]; +  dead[1]->x = dead[1], dead[1]->y = dead_nested[1]; +  dead_nested[0]->y = live[0], dead_nested[0]->x = dead_nested[1]; +  }}),    // ({3, 0, 0, 0, lambda() { // Not possible without weak refs directly in objects.    // live[0]->x = live[0], live[0]->v[0] = live[1];    // live[1]->x = live[1], live[1]->w[0] = live[2];
2398:    werror ("%60s\r", "");    if (test_failed) error ("GC destruct order test failed.\n");    }]]) +  +  test_any([[mapping q=([ "t":class {} ()]); gc(); if(!objectp(q->t)) return -1; set_weak_flag(q,1); gc(); if(objectp(q->t)) return -2; return 0;]],0); +  +  test_do([[class bar { object foo; void create(void|object tmp) { foo=tmp; } }; +  object o=bar(),o2=o; +  for(int e=0;e<10000;e++) o=bar(o); +  o2->foo=o; +  o=o2=0; +  gc();    ]]) -  + ]])      cond([[ sizeof( cpp("__AUTO_BIGNUM__")/"__AUTO_BIGNUM__" ) == 1 ]],   [[