Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions asmcomp/cmm_helpers.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2809,7 +2809,7 @@ let emit_gc_roots_table ~symbols cont =
(* Build preallocated blocks (used for Flambda [Initialize_symbol]
constructs, and Clambda global module) *)

let preallocate_block cont { Clambda.symbol; exported; tag; fields } =
let preallocate_block cont { Clambda.symbol; exported; tag; fields; block_desc } =
let space =
(* These words will be registered as roots and as such must contain
valid values, in case we are in no-naked-pointers mode. Likewise
Expand All @@ -2827,9 +2827,8 @@ let preallocate_block cont { Clambda.symbol; exported; tag; fields } =
in
let global = Cmmgen_state.(if exported then Global else Local) in
let symb = (symbol, global) in
let data =
emit_block symb (block_header tag (List.length fields)) space
in
let header = block_header ~desc:block_desc tag (List.length fields) in
let data = emit_block symb header space in
Cdata data :: cont

let emit_preallocated_blocks preallocated_blocks cont =
Expand Down
9 changes: 4 additions & 5 deletions middle_end/flambda/simple_value_approx.ml
Original file line number Diff line number Diff line change
Expand Up @@ -679,14 +679,13 @@ let rec meet_descr ~really_import_approx d1 d2 = match d1, d2 with
equal_boxed_int bi1 i1 bi2 i2 ->
d1
| Value_block (tag1, a1, desc1), Value_block (tag2, a2, desc2)
when Tag.compare tag1 tag2 = 0 && Array.length a1 = Array.length a2 ->
when Tag.compare tag1 tag2 = 0 && Array.length a1 = Array.length a2 &&
Block_desc.compare desc1 desc2 = 0
->
let fields =
Array.mapi (fun i v -> meet ~really_import_approx v a2.(i)) a1
in
let desc =
if Block_desc.compare desc1 desc2 = 0 then desc1 else Block_desc.empty
in
Value_block (tag1, fields, desc)
Value_block (tag1, fields, desc1)
| _ -> Value_unknown Other

and meet ~really_import_approx a1 a2 =
Expand Down
Loading