The unpac monorepo manager self-hosting as a monorepo using unpac
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

refactor minor heaps allocation

This commit refactor the minor heaps allocation process by first rewriting the logic to not
rely on bitmasks and instead move it to a model closer to trunk, introducing a Minor_heap_max configuration variable.
Some bits are removed: the arm64 backend used to expose Minor_heap_align_bits in config.h to the emitter, which is removed for now.
The Is_minor/Is_young changes are now unified as only Is_young (is the value in *any* minor heap at all?) matters.
In a follow up commit, Is_minor will be renamed definitely to Is_yound to follow suit.

+70 -118
+2 -2
asmcomp/cmm_helpers.ml
··· 701 701 box_float dbg (unboxed_float_array_ref arr ofs dbg) 702 702 703 703 let addr_array_set arr ofs newval dbg = 704 - Cop(Cextcall("caml_modify_field_asm", typ_void, false, None), 704 + Cop(Cextcall("caml_modify_field", typ_void, false, None), 705 705 [arr; untag_int ofs dbg; newval], dbg) 706 706 let addr_array_initialize arr ofs newval dbg = 707 707 Cop(Cextcall("caml_initialize_field", typ_void, false, None), ··· 2148 2148 let setfield n ptr init arg1 arg2 dbg = 2149 2149 match assignment_kind ptr init with 2150 2150 | Caml_modify -> 2151 - return_unit dbg (Cop(Cextcall("caml_modify_field_asm", 2151 + return_unit dbg (Cop(Cextcall("caml_modify_field", 2152 2152 typ_void, false, None), 2153 2153 [arg1; Cconst_int (n, dbg); arg2], 2154 2154 dbg))
-17
runtime/amd64.S
··· 110 110 111 111 #define CAML_CONFIG_H_NO_TYPEDEFS 112 112 #include "../runtime/caml/config.h" 113 - .equ Minor_val_bitmask,\ 114 - (1 | ~((1 << (Minor_heap_align_bits + Minor_heap_sel_bits)) - 1)) 115 113 116 114 .set domain_curr_field, 0 117 115 #define DOMAIN_STATE(c_type, name) \ ··· 465 463 jmp GCALL(caml_raise_exn) 466 464 CFI_ENDPROC 467 465 ENDFUNCTION(G(caml_call_realloc_stack)) 468 - 469 - /* runs on C stack with C calling convention. 470 - optimisation: use ocaml calling convention and SAVE_ALL_REGS? 471 - args: C_ARG_1: object, C_ARG_2: field idx, C_ARG_3: new value */ 472 - FUNCTION(G(caml_modify_field_asm)) 473 - CFI_STARTPROC 474 - movq C_ARG_1, %r11 475 - xorq %r14, %r11 476 - testq $Minor_val_bitmask, %r11 477 - jz 1f 478 - jmp GCALL(caml_modify_field) 479 - 1: movq C_ARG_3, 0(C_ARG_1,C_ARG_2,8) 480 - ret 481 - CFI_ENDPROC 482 - ENDFUNCTION(G(caml_modify_field_asm)) 483 466 484 467 FUNCTION(G(caml_call_gc)) 485 468 CFI_STARTPROC
+2 -2
runtime/array.c
··· 296 296 else { 297 297 /* make sure init is not young, to avoid creating 298 298 very many ref table entries */ 299 - if (Is_block(init) && Is_minor(init)) 299 + if (Is_block(init) && Is_young(init)) 300 300 caml_minor_collection(); 301 301 302 - CAMLassert(!(Is_block(init) && Is_minor(init))); 302 + CAMLassert(!(Is_block(init) && Is_young(init))); 303 303 res = caml_alloc(size, 0); 304 304 /* We now know that [init] is not in the minor heap, so there is 305 305 no need to call [caml_initialize]. */
+5 -13
runtime/caml/config.h
··· 212 212 This must be at least [Max_young_wosize + 1]. */ 213 213 #define Minor_heap_min (Max_young_wosize + 1) 214 214 215 - /* There may be at most 1<<Minor_heap_sel_bits minor 216 - heaps allocated */ 217 - #define Minor_heap_sel_bits 7 218 - 219 - /* An entire minor heap must fit inside one region 220 - of size 1 << Minor_heap_align_bits, which determines 221 - the maximum size of the heap */ 222 - #if SIZEOF_PTR <= 4 223 - #define Minor_heap_align_bits 20 224 - #else 225 - #define Minor_heap_align_bits 24 226 - #endif 215 + /* Maximum size of the minor zone (words). 216 + Must be greater than or equal to [Minor_heap_min]. 217 + */ 218 + #define Minor_heap_max (1 << 28) 227 219 228 220 /* Default size of the minor zone. (words) */ 229 221 #define Minor_heap_def 262144 ··· 264 256 #define Percent_to_promote_with_GC 10 265 257 266 258 /* Maximum number of domains */ 267 - #define Max_domains (1 << Minor_heap_sel_bits) 259 + #define Max_domains 128 268 260 269 261 /* Default setting for the major GC slice smoothing window: 1 270 262 (i.e. no smoothing)
+2
runtime/caml/domain.h
··· 103 103 struct domain* caml_domain_of_id(int); 104 104 105 105 CAMLextern atomic_uintnat caml_num_domains_running; 106 + CAMLextern uintnat caml_minor_heaps_base; 107 + CAMLextern uintnat caml_minor_heaps_end; 106 108 107 109 INLINE intnat caml_domain_alone() 108 110 {
+5 -22
runtime/caml/mlvalues.h
··· 204 204 /* Fields are numbered from 0. */ 205 205 #define Field(x, i) (((value *)(x)) [i]) /* Also an l-value. */ 206 206 207 - /* All values which are not blocks in the current domain's minor heap 208 - differ from caml_domain_state in at least one of the bits set in 209 - Young_val_bitmask */ 210 - #define Young_val_bitmask \ 211 - ((uintnat)1 | ~(((uintnat)1 << Minor_heap_align_bits) - (uintnat)1)) 212 - 213 - /* All values which are not blocks in any domain's minor heap differ 214 - from caml_domain_state in at least one of the bits set in 215 - Minor_val_bitmask */ 216 - #define Minor_val_bitmask \ 217 - ((uintnat)1 | ~(((uintnat)1 << (Minor_heap_align_bits + Minor_heap_sel_bits)) - (uintnat)1)) 207 + /* Is_young(val) is true iff val is in the reserved area for minor heaps */ 218 208 219 - 220 - /* Is_young(val) is true iff val is a block in the current domain's minor heap. 221 - Since the minor heap is allocated in one aligned block, this can be tested 222 - via bitmasking. */ 223 209 #define Is_young(val) \ 224 - ((((uintnat)(val) ^ (uintnat)Caml_state) & Young_val_bitmask) == 0) 210 + (CAMLassert (Is_block (val)), \ 211 + (char *)(val) < (char *)caml_minor_heaps_end && \ 212 + (char *)(val) > (char *)caml_minor_heaps_base) 225 213 226 - /* Is_minor(val) is true iff val is a block in any domain's minor heap. */ 227 - #define Is_minor(val) \ 228 - ((((uintnat)(val) ^ (uintnat)Caml_state) & Minor_val_bitmask) == 0) 229 - 230 - #define Is_block_and_young(val) Is_young(val) 231 - #define Is_block_and_minor(val) Is_minor(val) 214 + #define Is_block_and_young(val) (Is_block(val) && Is_young(val)) 232 215 233 216 /* NOTE: [Forward_tag] and [Infix_tag] must be just under 234 217 [No_scan_tag], with [Infix_tag] the lower one.
+15 -14
runtime/domain.c
··· 113 113 114 114 CAMLexport atomic_uintnat caml_num_domains_running; 115 115 116 - static uintnat minor_heaps_base; 116 + CAMLexport uintnat caml_minor_heaps_base; 117 + CAMLexport uintnat caml_minor_heaps_end; 117 118 static __thread dom_internal* domain_self; 118 119 119 120 static int64_t startup_timestamp; ··· 156 157 if (wsize < Minor_heap_min) wsize = Minor_heap_min; 157 158 bs = caml_mem_round_up_pages(Bsize_wsize (wsize)); 158 159 159 - Assert(page_size * 2 < (1 << Minor_heap_align_bits)); 160 - max = (1 << Minor_heap_align_bits) - page_size * 2; 160 + Assert(page_size * 2 < Minor_heap_max); 161 + max = Minor_heap_max - page_size * 2; 161 162 162 163 if (bs > max) bs = max; 163 164 ··· 175 176 caml_mem_decommit((void*)domain_self->minor_heap_area, 176 177 domain_self->minor_heap_area_end - domain_self->minor_heap_area); 177 178 178 - /* we allocate a double buffer to allow early release in minor_gc */ 179 179 wsize = caml_norm_minor_heap_size(wsize); 180 180 181 181 if (!caml_mem_commit((void*)domain_self->minor_heap_area, Bsize_wsize(wsize))) { ··· 336 336 void* heaps_base; 337 337 338 338 /* sanity check configuration */ 339 - if (caml_mem_round_up_pages(1 << Minor_heap_align_bits) != (1 << Minor_heap_align_bits)) 340 - caml_fatal_error("Minor_heap_align_bits misconfigured for this platform"); 339 + if (caml_mem_round_up_pages(Minor_heap_max) != Minor_heap_max) 340 + caml_fatal_error("Minor_heap_max misconfigured for this platform"); 341 341 342 342 /* reserve memory space for minor heaps */ 343 - size = (uintnat)1 << (Minor_heap_sel_bits + Minor_heap_align_bits); 343 + size = (uintnat)Minor_heap_max * Max_domains; 344 344 345 345 heaps_base = caml_mem_map(size*2, size*2, 1 /* reserve_only */); 346 346 if (!heaps_base) caml_raise_out_of_memory(); 347 347 348 - minor_heaps_base = (uintnat) heaps_base; 348 + caml_minor_heaps_base = (uintnat) heaps_base; 349 + caml_minor_heaps_end = (uintnat) heaps_base + size; 349 350 350 351 for (i = 0; i < Max_domains; i++) { 351 352 struct dom_internal* dom = &all_domains[i]; ··· 365 366 dom->backup_thread_running = 0; 366 367 dom->backup_thread_msg = BT_INIT; 367 368 368 - domain_minor_heap_base = minor_heaps_base + 369 - (uintnat)(1 << Minor_heap_align_bits) * (uintnat)i; 369 + domain_minor_heap_base = caml_minor_heaps_base + 370 + (uintnat)Minor_heap_max * (uintnat)i; 370 371 dom->tls_area = domain_minor_heap_base; 371 372 dom->tls_area_end = 372 373 caml_mem_round_up_pages(dom->tls_area + ··· 374 375 dom->minor_heap_area = /* skip guard page */ 375 376 caml_mem_round_up_pages(dom->tls_area_end + 1); 376 377 dom->minor_heap_area_end = 377 - domain_minor_heap_base + (1 << Minor_heap_align_bits); 378 + domain_minor_heap_base + Minor_heap_max; 378 379 } 379 380 380 381 ··· 581 582 } 582 583 583 584 struct domain* caml_owner_of_young_block(value v) { 584 - Assert(Is_minor(v)); 585 - int heap_id = ((uintnat)v - minor_heaps_base) / 586 - (1 << Minor_heap_align_bits); 585 + Assert(Is_young(v)); 586 + int heap_id = ((uintnat)v - caml_minor_heaps_base) / 587 + Minor_heap_max; 587 588 return &all_domains[heap_id].state; 588 589 } 589 590
+2 -2
runtime/fiber.c
··· 475 475 value v; 476 476 value null_stk = Val_ptr(NULL); 477 477 478 - fiber_debug_log("cont: is_block(%d) tag_val(%ul) is_minor(%d)", Is_block(cont), Tag_val(cont), Is_minor(cont)); 478 + fiber_debug_log("cont: is_block(%d) tag_val(%ul) is_young(%d)", Is_block(cont), Tag_val(cont), Is_young(cont)); 479 479 CAMLassert(Is_block(cont) && Tag_val(cont) == Cont_tag); 480 480 481 481 /* this forms a barrier between execution and any other domains 482 482 that might be marking this continuation */ 483 - if (!Is_minor(cont) ) caml_darken_cont(cont); 483 + if (!Is_young(cont) ) caml_darken_cont(cont); 484 484 485 485 /* at this stage the stack is assured to be marked */ 486 486 v = Op_val(cont)[0];
+3 -3
runtime/finalise.c
··· 228 228 CAMLassert (final->old <= final->young); 229 229 for (i = final->old; i < final->young; i++){ 230 230 CAMLassert (Is_block (final->table[i].val)); 231 - if (Is_minor(final->table[i].val) && caml_get_header_val(final->table[i].val) != 0){ 231 + if (Is_young(final->table[i].val) && caml_get_header_val(final->table[i].val) != 0){ 232 232 ++ todo_count; 233 233 } 234 234 } ··· 248 248 for (i = final->old; i < final->young; i++) { 249 249 CAMLassert (Is_block (final->table[i].val)); 250 250 CAMLassert (Tag_val (final->table[i].val) != Forward_tag); 251 - if (Is_minor(final->table[j].val) && caml_get_header_val(final->table[i].val) != 0) { 251 + if (Is_young(final->table[j].val) && caml_get_header_val(final->table[i].val) != 0) { 252 252 /** dead */ 253 253 fi->todo_tail->item[k] = final->table[i]; 254 254 /* The finalisation function is called with unit not with the value */ ··· 269 269 /** update the minor value to the copied major value */ 270 270 for (i = final->old; i < final->young; i++) { 271 271 CAMLassert (Is_block (final->table[i].val)); 272 - if (Is_minor(final->table[i].val)) { 272 + if (Is_young(final->table[i].val)) { 273 273 CAMLassert (caml_get_header_val(final->table[i].val) == 0); 274 274 final->table[i].val = Op_val(final->table[i].val)[0]; 275 275 }
+3 -4
runtime/globroots.c
··· 29 29 CAMLexport caml_root caml_create_root(value init) 30 30 { 31 31 CAMLparam1(init); 32 - 32 + 33 33 value* v = (value*)caml_stat_alloc(sizeof(value)); 34 34 35 35 *v = init; ··· 42 42 CAMLexport caml_root caml_create_root_noexc(value init) 43 43 { 44 44 CAMLparam1(init); 45 - 45 + 46 46 value* v = (value*)caml_stat_alloc_noexc(sizeof(value)); 47 47 48 48 if( v == NULL ) { ··· 95 95 - Otherwise (the root contains a pointer outside of the heap or an integer), 96 96 then neither [caml_global_roots_young] nor [caml_global_roots_old] contain 97 97 it. */ 98 - 98 + 99 99 /* Insertion and deletion */ 100 100 101 101 Caml_inline void caml_insert_global_root(struct skiplist * list, value * r) ··· 307 307 308 308 caml_skiplist_empty(&caml_global_roots_young); 309 309 } 310 -
+4 -4
runtime/major_gc.c
··· 473 473 474 474 475 475 #ifdef DEBUG 476 - #define Is_markable(v) (Is_block(v) && !Is_minor(v) && v != Debug_free_major) 476 + #define Is_markable(v) (Is_block(v) && !Is_young(v) && v != Debug_free_major) 477 477 #else 478 - #define Is_markable(v) (Is_block(v) && !Is_minor(v)) 478 + #define Is_markable(v) (Is_block(v) && !Is_young(v)) 479 479 #endif 480 480 481 481 static void realloc_mark_stack (struct mark_stack* stk) ··· 509 509 value v; 510 510 intnat work; 511 511 512 - CAMLassert(Is_block(e.block) && !Is_minor(e.block)); 512 + CAMLassert(Is_block(e.block) && !Is_young(e.block)); 513 513 CAMLassert(Tag_val(e.block) != Infix_tag); 514 514 CAMLassert(Tag_val(e.block) != Cont_tag); 515 515 CAMLassert(Tag_val(e.block) < No_scan_tag); ··· 629 629 630 630 void caml_darken_cont(value cont) 631 631 { 632 - CAMLassert(Is_block(cont) && !Is_minor(cont) && Tag_val(cont) == Cont_tag); 632 + CAMLassert(Is_block(cont) && !Is_young(cont) && Tag_val(cont) == Cont_tag); 633 633 SPIN_WAIT { 634 634 header_t hd = atomic_load_explicit(Hp_atomic_val(cont), memory_order_relaxed); 635 635 CAMLassert(!Has_status_hd(hd, global.GARBAGE));
+5 -9
runtime/memory.c
··· 133 133 /* HACK: can't assert when get old C-api style pointers 134 134 Assert (Is_block(obj)); */ 135 135 136 - if (!Is_minor(obj)) { 136 + if (!Is_young(obj)) { 137 137 138 138 if (Is_block(old_val)) { 139 139 /* if old is in the minor heap, then this is in a remembered set already */ 140 - if (Is_minor(old_val)) return; 140 + if (Is_young(old_val)) return; 141 141 /* old is a block and in the major heap */ 142 142 caml_darken(0, old_val, 0); 143 143 } 144 144 /* this update is creating a new link from major to minor, remember it */ 145 - if (Is_block_and_minor(new_val)) { 145 + if (Is_block_and_young(new_val)) { 146 146 Ref_table_add(&Caml_state->minor_tables->major_ref, Op_val(obj) + field); 147 147 } 148 148 } ··· 185 185 Assert(0 <= field && field < Wosize_val(obj)); 186 186 #ifdef DEBUG 187 187 /* caml_initialize_field can only be used on just-allocated objects */ 188 - if (Is_minor(obj)) 188 + if (Is_young(obj)) 189 189 Assert(Op_val(obj)[field] == Debug_uninit_minor || 190 190 Op_val(obj)[field] == Val_unit); 191 191 else ··· 204 204 { 205 205 #ifdef DEBUG 206 206 /* caml_initialize_field can only be used on just-allocated objects */ 207 - if (Is_minor((value)fp)) 207 + if (Is_young((value)fp)) 208 208 Assert(*fp == Debug_uninit_minor || 209 209 *fp == Val_unit); 210 210 else ··· 390 390 #ifdef DEBUG 391 391 header_t hd_val (value v) { 392 392 return (header_t)Hd_val(v); 393 - } 394 - 395 - int is_minor(value v) { 396 - return Is_minor(v); 397 393 } 398 394 399 395 int is_young(value v) {
+11 -11
runtime/minor_gc.c
··· 114 114 115 115 #ifdef DEBUG 116 116 extern int caml_debug_is_minor(value val) { 117 - return Is_minor(val); 117 + return Is_young(val); 118 118 } 119 119 120 120 extern int caml_debug_is_major(value val) { 121 - return Is_block(val) && !Is_minor(val); 121 + return Is_block(val) && !Is_young(val); 122 122 } 123 123 #endif 124 124 ··· 260 260 tag_t tag; 261 261 262 262 tail_call: 263 - if (!(Is_block(v) && Is_minor(v))) { 263 + if (!(Is_block(v) && Is_young(v))) { 264 264 /* not a minor block */ 265 265 *p = v; 266 266 return; ··· 397 397 for (i = CAML_EPHE_FIRST_KEY; i < Wosize_val(re->ephe); i++) { 398 398 child = Op_val(re->ephe)[i]; 399 399 if (child != caml_ephe_none 400 - && Is_block (child) && Is_minor(child)) { 400 + && Is_block (child) && Is_young(child)) { 401 401 resolve_infix_val(&child); 402 402 if (get_header_val(child) != 0) { 403 403 /* value not copied to major heap */ ··· 435 435 436 436 f = Op_val (new_v)[0]; 437 437 CAMLassert (!Is_debug_tag(f)); 438 - if (Is_block (f) && Is_minor(f)) { 438 + if (Is_block (f) && Is_young(f)) { 439 439 oldify_one (st, f, Op_val (new_v)); 440 440 } 441 441 for (i = 1; i < Wosize_val (new_v); i++){ 442 442 f = Op_val (v)[i]; 443 443 CAMLassert (!Is_debug_tag(f)); 444 - if (Is_block (f) && Is_minor(f)) { 444 + if (Is_block (f) && Is_young(f)) { 445 445 oldify_one (st, f, Op_val (new_v) + i); 446 446 } else { 447 447 Op_val (new_v)[i] = f; ··· 461 461 value *data = re->offset == CAML_EPHE_DATA_OFFSET 462 462 ? &Ephe_data(re->ephe) 463 463 : &Op_val(re->ephe)[re->offset]; 464 - if (*data != caml_ephe_none && Is_block(*data) && Is_minor(*data) ) { 464 + if (*data != caml_ephe_none && Is_block(*data) && Is_young(*data) ) { 465 465 resolve_infix_val(data); 466 466 if (get_header_val(*data) == 0) { /* Value copied to major heap */ 467 467 *data = Op_val(*data)[0]; ··· 609 609 // We need to verify that all our remembered set entries are now in the major heap or promoted 610 610 for( r = self_minor_tables->major_ref.base ; r < self_minor_tables->major_ref.ptr ; r++ ) { 611 611 // Everything should be promoted 612 - CAMLassert(!Is_minor(*r)); 612 + CAMLassert(!(Is_block(**r)) || !(Is_young(**r))); 613 613 } 614 614 #endif 615 615 ··· 617 617 caml_ev_begin("minor_gc/finalizers/oldify"); 618 618 for (elt = self_minor_tables->custom.base; elt < self_minor_tables->custom.ptr; elt++) { 619 619 value *v = &elt->block; 620 - if (Is_block(*v) && Is_minor(*v)) { 620 + if (Is_block(*v) && Is_young(*v)) { 621 621 if (get_header_val(*v) == 0) { /* value copied to major heap */ 622 622 *v = Op_val(*v)[0]; 623 623 } else { ··· 646 646 for (r = self_minor_tables->major_ref.base; 647 647 r < self_minor_tables->major_ref.ptr; r++) { 648 648 value vnew = **r; 649 - CAMLassert (!Is_block(vnew) || (get_header_val(vnew) != 0 && !Is_minor(vnew))); 649 + CAMLassert (!Is_block(vnew) || (get_header_val(vnew) != 0 && !Is_young(vnew))); 650 650 } 651 651 652 652 for (elt = self_minor_tables->custom.base; elt < self_minor_tables->custom.ptr; elt++) { 653 653 value vnew = elt->block; 654 - CAMLassert (!Is_block(vnew) || (get_header_val(vnew) != 0 && !Is_minor(vnew))); 654 + CAMLassert (!Is_block(vnew) || (get_header_val(vnew) != 0 && !Is_young(vnew))); 655 655 } 656 656 #endif 657 657
+1 -1
runtime/obj.c
··· 191 191 192 192 CAMLprim value caml_obj_is_shared (value obj) 193 193 { 194 - return Val_int(Is_long(obj) || !Is_minor(obj)); 194 + return Val_int(Is_long(obj) || !Is_young(obj)); 195 195 } 196 196 197 197 /* The following functions are used in stdlib/lazy.ml.
+4 -4
runtime/shared_heap.c
··· 411 411 412 412 struct pool* caml_pool_of_shared_block(value v) 413 413 { 414 - Assert (Is_block(v) && !Is_minor(v)); 414 + Assert (Is_block(v) && !Is_young(v)); 415 415 mlsize_t whsize = Whsize_wosize(Wosize_val(v)); 416 416 if (whsize > 0 && whsize <= SIZECLASS_MAX) { 417 417 return (pool*)((uintnat)v &~(POOL_WSIZE * sizeof(value) - 1)); ··· 630 630 struct heap_verify_state* st = st_v; 631 631 if (!Is_block(v)) return; 632 632 633 - if( Is_minor(v) ) { 633 + if( Is_young(v) ) { 634 634 caml_gc_log("minor in heap: %p, hd_val: %lx, p: %p", (value*)v, Hd_val(v), p); 635 635 struct domain* domain = caml_owner_of_young_block(v); 636 636 caml_gc_log("owner: %d, young_start: %p, young_end: %p, young_ptr: %p, young_limit: %p", domain->state->id, domain->state->young_start, domain->state->young_end, domain->state->young_ptr, (void *)domain->state->young_limit); ··· 652 652 static void verify_object(struct heap_verify_state* st, value v) { 653 653 if (!Is_block(v)) return; 654 654 655 - Assert (!Is_minor(v)); 655 + Assert (!Is_young(v)); 656 656 Assert (Hd_val(v)); 657 657 658 658 if (Tag_val(v) == Infix_tag) { ··· 677 677 int i; 678 678 for (i = 0; i < Wosize_val(v); i++) { 679 679 value f = Op_val(v)[i]; 680 - if (Is_minor(v) && Is_minor(f)) { 680 + if (Is_young(v) && Is_young(f)) { 681 681 Assert(caml_owner_of_young_block(v) == 682 682 caml_owner_of_young_block(f)); 683 683 }
+6 -6
runtime/weak.c
··· 111 111 112 112 value elt = Op_val(e)[offset]; 113 113 if (elt != caml_ephe_none && Is_block (elt) && 114 - !Is_minor (elt) && is_unmarked(elt)) { 114 + !Is_young (elt) && is_unmarked(elt)) { 115 115 Op_val(e)[offset] = caml_ephe_none; 116 116 Op_val(e)[CAML_EPHE_DATA_OFFSET] = caml_ephe_none; 117 117 } ··· 139 139 /* Do not short-circuit the pointer */ 140 140 } else { 141 141 Op_val(v)[i] = child = f; 142 - if (Is_block (f) && Is_minor (f)) 142 + if (Is_block (f) && Is_young (f)) 143 143 add_to_ephe_ref_table(&Caml_state->minor_tables->ephe_ref, v, i); 144 144 goto ephemeron_again; 145 145 } 146 146 } 147 147 } 148 148 149 - // FIXME: Is_young -> Is_minor here is probably not what we want, fix this. 150 - if (!Is_minor (child) && is_unmarked(child)) { 149 + // FIXME: Is_young -> Is_young here is probably not what we want, fix this. 150 + if (!Is_young (child) && is_unmarked(child)) { 151 151 release_data = 1; 152 152 Op_val(v)[i] = caml_ephe_none; 153 153 } ··· 174 174 175 175 static void do_set (value e, mlsize_t offset, value v) 176 176 { 177 - if (Is_block(v) && Is_minor(v)) { 177 + if (Is_block(v) && Is_young(v)) { 178 178 value old = Op_val(e)[offset]; 179 179 Op_val(e)[offset] = v; 180 - if (!(Is_block(old) && Is_minor(old))) 180 + if (!(Is_block(old) && Is_young(old))) 181 181 add_to_ephe_ref_table (&Caml_state->minor_tables->ephe_ref, 182 182 e, offset); 183 183 } else {
-2
utils/domainstate.ml.c
··· 16 16 17 17 #define CAML_CONFIG_H_NO_TYPEDEFS 18 18 #include "config.h" 19 - let minor_heap_sel_bits = Minor_heap_sel_bits 20 - let minor_heap_align_bits = Minor_heap_align_bits 21 19 let stack_ctx_words = Stack_ctx_words 22 20 23 21 type t =
-2
utils/domainstate.mli.c
··· 14 14 /* */ 15 15 /**************************************************************************/ 16 16 17 - val minor_heap_sel_bits : int 18 - val minor_heap_align_bits : int 19 17 val stack_ctx_words : int 20 18 21 19 type t =