diff options
author | Stephen Dolan <sdolan@janestreet.com> | 2023-01-27 21:04:52 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-27 21:04:52 +0000 |
commit | 33699c86256c95dba5d0ff94f79c62a417ce8fd9 (patch) | |
tree | 254c2cca807fdbabdca1d4a5f55b15e66905e437 /asmcomp | |
parent | 309e36cd099b678a46b671731109415cdd6ba35f (diff) | |
download | ocaml-33699c86256c95dba5d0ff94f79c62a417ce8fd9.tar.gz |
Load frametables of dynlink'd modules in batch (#11935)
Diffstat (limited to 'asmcomp')
-rw-r--r-- | asmcomp/asmlink.ml | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/asmcomp/asmlink.ml b/asmcomp/asmlink.ml index dd5c069558..7021f8c3d1 100644 --- a/asmcomp/asmlink.ml +++ b/asmcomp/asmlink.ml @@ -235,7 +235,9 @@ let make_startup_file ~ppf_dump units_list ~crc_interfaces = List.flatten (List.map (fun (info,_,_) -> info.ui_defines) units_list) in compile_phrase (Cmm_helpers.entry_point name_list); let units = List.map (fun (info,_,_) -> info) units_list in - List.iter compile_phrase (Cmm_helpers.generic_functions false units); + List.iter compile_phrase + (Cmm_helpers.emit_preallocated_blocks [] (* add gc_roots (for dynlink) *) + (Cmm_helpers.generic_functions false units)); Array.iteri (fun i name -> compile_phrase (Cmm_helpers.predef_exception i name)) Runtimedef.builtin_exceptions; @@ -260,7 +262,8 @@ let make_shared_startup_file ~ppf_dump units = Compilenv.reset "_shared_startup"; Emit.begin_assembly (); List.iter compile_phrase - (Cmm_helpers.generic_functions true (List.map fst units)); + (Cmm_helpers.emit_preallocated_blocks [] (* add gc_roots (for dynlink) *) + (Cmm_helpers.generic_functions true (List.map fst units))); compile_phrase (Cmm_helpers.plugin_header units); compile_phrase (Cmm_helpers.global_table |