| 224 | } |
| 225 | |
| 226 | gc_node::~gc_node() { |
| 227 | gc_check_break(gc_id); |
| 228 | if ( gc_owner ) { |
| 229 | // Node is being deleted outside of gc_sweep. |
| 230 | // During the migration period, this can happen legitimately when old code |
| 231 | // paths delete TypeDecl. In DAS_GC_DEBUG mode, assert to catch bugs. |
| 232 | #if DAS_GC_DEBUG |
| 233 | if ( !gc_owner->gc_collecting ) { |
| 234 | DAS_FATAL_LOG("gc_node id=%" PRIu64 " deleted outside of gc_sweep\n", gc_id); |
| 235 | DAS_ASSERTF(false, "gc_node id=%" PRIu64 " deleted outside of gc_sweep", gc_id); |
| 236 | } |
| 237 | #endif |
| 238 | gc_owner->gc_unlink(this); |
| 239 | } |
| 240 | if ( gc_is_alive() ) { |
| 241 | gc_magic = GC_MAGIC_DEAD; |
| 242 | } |
| 243 | } |
| 244 | |
| 245 | void gc_node::gc_unlink() { |
| 246 | if ( gc_owner ) { |
no test coverage detected