Ensure that p has a back_edges structure associated with it. */
| 185 | |
| 186 | /* Ensure that p has a back_edges structure associated with it. */ |
| 187 | static void ensure_struct(ptr_t p) |
| 188 | { |
| 189 | ptr_t old_back_ptr = GET_OH_BG_PTR(p); |
| 190 | |
| 191 | if (!((word)old_back_ptr & FLAG_MANY)) { |
| 192 | back_edges *be = new_back_edges(); |
| 193 | be -> flags = 0; |
| 194 | if (0 == old_back_ptr) { |
| 195 | be -> n_edges = 0; |
| 196 | } else { |
| 197 | be -> n_edges = 1; |
| 198 | be -> edges[0] = old_back_ptr; |
| 199 | } |
| 200 | be -> height = HEIGHT_UNKNOWN; |
| 201 | be -> height_gc_no = GC_gc_no - 1; |
| 202 | GC_ASSERT(be >= back_edge_space); |
| 203 | SET_OH_BG_PTR(p, (word)be | FLAG_MANY); |
| 204 | } |
| 205 | } |
| 206 | |
| 207 | /* Add the (forward) edge from p to q to the backward graph. Both p */ |
| 208 | /* q are pointers to the object base, i.e. pointers to an oh. */ |
no test coverage detected