Revision 09d7b39f
Added by Guillaume DAVY about 4 years ago
src/backends/Ada/ada_backend.ml | ||
---|---|---|
72 | 72 |
fprintf fmt "%a.gpr" pp_package_name main_machine |
73 | 73 |
|
74 | 74 |
|
75 |
let get_typed_instances machines m = |
|
76 |
let submachines = List.map (get_machine machines) m.minstances in |
|
75 |
let get_typed_submachines machines m = |
|
76 |
let instances = List.filter (fun (id, _) -> not (is_builtin_fun id)) m.mcalls in |
|
77 |
let submachines = List.map (get_machine machines) instances in |
|
77 | 78 |
List.map2 |
78 | 79 |
(fun instance submachine -> |
79 | 80 |
let ident = (fst instance) in |
80 | 81 |
ident, (get_substitution m ident submachine, submachine)) |
81 |
m.minstances submachines
|
|
82 |
instances submachines |
|
82 | 83 |
|
83 | 84 |
(** Main function of the Ada backend. It calls all the subfunction creating all |
84 | 85 |
the file and fill them with Ada code representing the machines list given. |
... | ... | |
92 | 93 |
let module Adb = Ada_backend_adb.Main in |
93 | 94 |
let module Wrapper = Ada_backend_wrapper.Main in |
94 | 95 |
|
95 |
let typed_instances_machines =
|
|
96 |
List.map (get_typed_instances machines) machines in
|
|
96 |
let typed_submachines =
|
|
97 |
List.map (get_typed_submachines machines) machines in
|
|
97 | 98 |
|
98 |
let _machines = List.combine typed_instances_machines machines in
|
|
99 |
let _machines = List.combine typed_submachines machines in
|
|
99 | 100 |
|
100 |
let _pp_filename ext fmt (typed_instances, machine) =
|
|
101 |
let _pp_filename ext fmt (typed_submachines, machine) =
|
|
101 | 102 |
pp_machine_filename ext fmt machine in |
102 | 103 |
|
103 | 104 |
(* Extract the main machine if there is one *) |
Also available in: Unified diff
Ada: Add generation of step calls and refactor prototypes and ads printing to handle staless
instance.