Use OCAMLPARAM's objects in toplevel

Only the non-native one (it does not support OCAMLPARAM at all atm).
master
Marc Lasson 2016-05-18 14:04:28 +02:00
parent 210d7aeafa
commit 0fd2964dff
2 changed files with 7 additions and 1 deletions

View File

@ -32,6 +32,8 @@ val implicit_modules : string list ref
(* return the list of objfiles, after OCAMLPARAM and List.rev *)
val get_objfiles : with_ocamlparam:bool -> string list
val last_objfiles : string list ref
val first_objfiles : string list ref
type filename = string

View File

@ -25,7 +25,11 @@ let prepare ppf =
Toploop.set_paths ();
try
let res =
List.for_all (Topdirs.load_file ppf) (List.rev !preload_objects) in
let objects =
List.rev (!preload_objects @ !first_objfiles)
in
List.for_all (Topdirs.load_file ppf) objects
in
!Toploop.toplevel_startup_hook ();
res
with x ->