|
@@ -27,7 +27,7 @@ let dump_types com pretty =
|
|
| [] -> ""
|
|
| [] -> ""
|
|
| l -> Printf.sprintf "<%s>" (String.concat ", " (List.map s_type_param l))
|
|
| l -> Printf.sprintf "<%s>" (String.concat ", " (List.map s_type_param l))
|
|
in
|
|
in
|
|
- List.iter (fun mt ->
|
|
|
|
|
|
+ let f mt =
|
|
let path = Type.t_path mt in
|
|
let path = Type.t_path mt in
|
|
let buf,close = create_dumpfile_from_path com path in
|
|
let buf,close = create_dumpfile_from_path com path in
|
|
let print fmt = Printf.kprintf (fun s -> Buffer.add_string buf s) fmt in
|
|
let print fmt = Printf.kprintf (fun s -> Buffer.add_string buf s) fmt in
|
|
@@ -117,11 +117,14 @@ let dump_types com pretty =
|
|
(String.concat " " (List.map (fun t -> " from " ^ s_type t) a.a_from))
|
|
(String.concat " " (List.map (fun t -> " from " ^ s_type t) a.a_from))
|
|
(String.concat " " (List.map (fun t -> " to " ^ s_type t) a.a_to));
|
|
(String.concat " " (List.map (fun t -> " to " ^ s_type t) a.a_to));
|
|
);
|
|
);
|
|
- close();
|
|
|
|
- ) com.types
|
|
|
|
|
|
+ close()
|
|
|
|
+ in
|
|
|
|
+ Parallel.run_in_new_pool (fun pool ->
|
|
|
|
+ Parallel.run_parallel_on_array pool (Array.of_list com.types) f
|
|
|
|
+ )
|
|
|
|
|
|
let dump_record com =
|
|
let dump_record com =
|
|
- List.iter (fun mt ->
|
|
|
|
|
|
+ let f mt =
|
|
let buf,close = create_dumpfile_from_path com (t_path mt) in
|
|
let buf,close = create_dumpfile_from_path com (t_path mt) in
|
|
let s = match mt with
|
|
let s = match mt with
|
|
| TClassDecl c -> Printer.s_tclass "" c
|
|
| TClassDecl c -> Printer.s_tclass "" c
|
|
@@ -130,11 +133,14 @@ let dump_record com =
|
|
| TAbstractDecl a -> Printer.s_tabstract "" a
|
|
| TAbstractDecl a -> Printer.s_tabstract "" a
|
|
in
|
|
in
|
|
Buffer.add_string buf s;
|
|
Buffer.add_string buf s;
|
|
- close();
|
|
|
|
- ) com.types
|
|
|
|
|
|
+ close()
|
|
|
|
+ in
|
|
|
|
+ Parallel.run_in_new_pool (fun pool ->
|
|
|
|
+ Parallel.run_parallel_on_array pool (Array.of_list com.types) f
|
|
|
|
+ )
|
|
|
|
|
|
let dump_position com =
|
|
let dump_position com =
|
|
- List.iter (fun mt ->
|
|
|
|
|
|
+ let f mt =
|
|
match mt with
|
|
match mt with
|
|
| TClassDecl c ->
|
|
| TClassDecl c ->
|
|
let buf,close = create_dumpfile_from_path com (t_path mt) in
|
|
let buf,close = create_dumpfile_from_path com (t_path mt) in
|
|
@@ -153,7 +159,10 @@ let dump_position com =
|
|
close();
|
|
close();
|
|
| _ ->
|
|
| _ ->
|
|
()
|
|
()
|
|
- ) com.types
|
|
|
|
|
|
+ in
|
|
|
|
+ Parallel.run_in_new_pool (fun pool ->
|
|
|
|
+ Parallel.run_parallel_on_array pool (Array.of_list com.types) f
|
|
|
|
+ )
|
|
|
|
|
|
let dump_types com =
|
|
let dump_types com =
|
|
match Common.defined_value_safe com Define.Dump with
|
|
match Common.defined_value_safe com Define.Dump with
|