static void extern_record_location_r(CAML_R, value obj) { header_t hdr; //printf("FFFFFFFFFF 100\n"); if (extern_ignore_sharing) return; //printf("FFFFFFFFFF 200\n"); if (extern_trail_cur == extern_trail_limit) { struct trail_block * new_block = malloc(sizeof(struct trail_block)); if (new_block == NULL) extern_out_of_memory_r(ctx); new_block->previous = extern_trail_block; extern_trail_block = new_block; extern_trail_cur = extern_trail_block->entries; extern_trail_limit = extern_trail_block->entries + ENTRIES_PER_TRAIL_BLOCK; } //printf("FFFFFFFFFF 300\n"); hdr = Hd_val(obj); extern_trail_cur->obj = obj | Colornum_hd(hdr); extern_trail_cur->field0 = Field(obj, 0); extern_trail_cur++; //printf("FFFFFFFFFF 500\n"); Hd_val(obj) = Bluehd_hd(hdr); Field(obj, 0) = (value) obj_counter; obj_counter++; //printf("FFFFFFFFFF 1000\n"); }
static void extern_record_location(value obj) { header_t hdr; if (extern_trail_cur == extern_trail_limit) { struct trail_block * new_block = malloc(sizeof(struct trail_block)); if (new_block == NULL) extern_out_of_memory(); new_block->previous = extern_trail_block; extern_trail_block = new_block; extern_trail_cur = extern_trail_block->entries; extern_trail_limit = extern_trail_block->entries + ENTRIES_PER_TRAIL_BLOCK; } // Set the blue color on current object header hdr = Hd_val(obj); extern_trail_cur->obj = obj | Colornum_hd(hdr); // Save the object first field extern_trail_cur->field0 = Field(obj, 0); extern_trail_cur++; Hd_val(obj) = Bluehd_hd(hdr); // Set the current counter in first field Field(obj, 0) = (value) obj_counter; obj_counter++; }