Project

General

Profile

Revision 96f5fe18 src/c_backend.ml

View differences:

src/c_backend.ml
333 333
let pp_instance_call m self fmt i (inputs: value_t list) (outputs: var_decl list) =
334 334
 try (* stateful node instance *)
335 335
   let (n,_) = List.assoc i m.minstances in
336
   fprintf fmt "%s_step (%a%t%a%t%s->%s);"
337
     (node_name n)
336
   fprintf fmt "%a (%a%t%a%t%s->%s);"
337
     pp_machine_step_name (node_name n)
338 338
     (Utils.fprintf_list ~sep:", " (pp_c_val self (pp_c_var_read m))) inputs
339 339
     (Utils.pp_final_char_if_non_empty ", " inputs) 
340 340
     (Utils.fprintf_list ~sep:", " (pp_c_var_write m)) outputs
......
343 343
     i
344 344
 with Not_found -> (* stateless node instance *)
345 345
   let (n,_) = List.assoc i m.mcalls in
346
   fprintf fmt "%s (%a%t%a);"
347
     (node_name n)
346
   fprintf fmt "%a (%a%t%a);"
347
     pp_machine_step_name (node_name n)
348 348
     (Utils.fprintf_list ~sep:", " (pp_c_val self (pp_c_var_read m))) inputs
349 349
     (Utils.pp_final_char_if_non_empty ", " inputs) 
350 350
     (Utils.fprintf_list ~sep:", " (pp_c_var_write m)) outputs 
......
504 504
    self
505 505

  
506 506
let print_stateless_prototype fmt (name, inputs, outputs) =
507
  fprintf fmt "void %s (@[<v>@[%a%t@]@,@[%a@]@,@])"
508
    name
507
  fprintf fmt "void %a (@[<v>@[%a%t@]@,@[%a@]@,@])"
508
    pp_machine_step_name name
509 509
    (Utils.fprintf_list ~sep:",@ " pp_c_decl_input_var) inputs
510 510
    (Utils.pp_final_char_if_non_empty ",@ " inputs) 
511 511
    (Utils.fprintf_list ~sep:",@ " pp_c_decl_output_var) outputs

Also available in: Unified diff