Skip to content

Commit b6b348a

Browse files
committed
Export all item code to stabs on Windows (including e.g. object methods)
1 parent 31aceda commit b6b348a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/boot/be/pe.ml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -792,17 +792,19 @@ let crate_exports (sem:Semant.ctxt) : pe_export array =
792792
pe_export_address_fixup = fixup
793793
}
794794
in
795-
let export_stab_of_fn (node_id, fixup) =
795+
let export_stab_of_item (node_id, code) =
796796
let name = Hashtbl.find sem.Semant.ctxt_all_item_names node_id in
797-
export_stab ("fn$" ^ (Semant.string_of_name name)) fixup
797+
let name' = "item$" ^ (Semant.string_of_name name) in
798+
export_stab name' code.Semant.code_fixup
798799
in
799800
let export_stab_of_glue (glue, code) =
800801
export_stab (Semant.glue_str sem glue) code.Semant.code_fixup
801802
in
802803

803804
let stabs =
804805
Array.of_list (List.concat [
805-
(List.map export_stab_of_fn (htab_pairs sem.Semant.ctxt_fn_fixups));
806+
(List.map export_stab_of_item
807+
(htab_pairs sem.Semant.ctxt_all_item_code));
806808
(List.map export_stab_of_glue (htab_pairs sem.Semant.ctxt_glue_code))
807809
])
808810
in

0 commit comments

Comments
 (0)