Project

General

Profile

« Previous | Next » 

Revision 61e0c3c4

Added by Guillaume DAVY about 4 years ago

Ada:
- Correct the merge with lustrec-seal
- Improve support for builtin function(still work to do)
- Add generation of a gpr file for lib(without main).
- Add var initialisation in the reset, still work to do.

View differences:

src/backends/Ada/ada_backend_adb.ml
170 170
     @param fmt the formater to print on
171 171
     @param machine the machine
172 172
  **)
173
  let pp_step_definition typed_submachines fmt m = pp_procedure_definition
174
        pp_step_procedure_name
175
        (pp_step_prototype m)
176
        (pp_machine_var_decl NoMode)
177
        (pp_machine_instr typed_submachines m)
178
        fmt
179
        (m.mstep.step_locals, m.mstep.step_instrs)
173
  let pp_step_definition typed_submachines fmt m =
174
    pp_procedure_definition
175
      pp_step_procedure_name
176
      (pp_step_prototype m)
177
      (pp_machine_var_decl NoMode)
178
      (pp_machine_instr typed_submachines m)
179
      fmt
180
      (m.mstep.step_locals, m.mstep.step_instrs)
180 181

  
181 182
  (** Print the definition of the reset procedure from a machine.
182 183

  
......
184 185
     @param fmt the formater to print on
185 186
     @param machine the machine
186 187
  **)
187
  let pp_reset_definition typed_submachines fmt m = pp_procedure_definition
188
        pp_reset_procedure_name
189
        (pp_reset_prototype m)
190
        (pp_machine_var_decl NoMode)
191
        (pp_machine_instr typed_submachines m)
192
        fmt
193
        ([], m.minit)
188
  let pp_reset_definition typed_submachines fmt m =
189
    let build_assign = function var ->
190
      mkinstr (MStateAssign (var, mk_default_value var.var_type))
191
    in
192
    let assigns = List.map build_assign m.mmemory in
193
    pp_procedure_definition
194
      pp_reset_procedure_name
195
      (pp_reset_prototype m)
196
      (pp_machine_var_decl NoMode)
197
      (pp_machine_instr typed_submachines m)
198
      fmt
199
      ([], assigns@m.minit)
194 200

  
195 201
  (** Print the package definition(ads) of a machine.
196 202
    It requires the list of all typed instance.

Also available in: Unified diff