Revert changes

Bring back cvarlist_of_ovarlist with a more 
explicit name to show its specificity
This commit is contained in:
Cédric Pasteur 2011-07-22 10:52:31 +02:00
parent 9fb42a5feb
commit da8956e247
2 changed files with 10 additions and 2 deletions

View file

@ -115,6 +115,14 @@ let copname = function
let cvar_of_vd vd =
name vd.v_ident, ctype_of_otype vd.v_type
let inputlist_of_ovarlist vl =
let cvar_of_ovar vd =
let ty = ctype_of_otype vd.v_type in
let ty = if Linearity.is_linear vd.v_linearity then pointer_to ty else ty in
name vd.v_ident, ty
in
List.map cvar_of_ovar vl
(** @return the unaliased version of a type. *)
let rec unalias_ctype cty = match cty with
| Cty_id ty_name ->
@ -583,7 +591,7 @@ let qn_append q suffix =
(** Builds the argument list of step function*)
let step_fun_args n md =
let args = List.map cvar_of_vd md.m_inputs in
let args = inputlist_of_ovarlist md.m_inputs in
let out_arg = [("out", Cty_ptr (Cty_id (qn_append n "_out")))] in
let context_arg =
if is_stateful n then

View file

@ -216,7 +216,7 @@ let main_def_of_class_def cd =
split (map write_lhs_of_ty_for_vd stepm.m_outputs) in
let printf_calls = List.concat printf_calls in
let cinp = List.map cvar_of_vd stepm.m_inputs in
let cinp = inputlist_of_ovarlist stepm.m_inputs in
let cout = ["res", (Cty_id (qn_append cd.cd_name "_out"))] in
let varlist =