Project

General

Profile

« Previous | Next » 

Revision 90cc3b8e

Added by LĂ©lio Brun over 3 years ago

some rewriting in C backend pretty-printer

View differences:

src/plugins/mpfr/lustrec_mpfr.ml
47 47
    expr_clock = expr.expr_clock;
48 48
  }
49 49

  
50
let pp_inject_real pp_var pp_val fmt var value =
50
let pp_inject_real pp_var pp_val fmt (var, value) =
51 51
  Format.fprintf fmt "%s(%a, %a, %s);"
52 52
    inject_real_id
53 53
    pp_var var
......
61 61
    expr_clock = expr.expr_clock;
62 62
  }
63 63

  
64
let pp_inject_copy pp_var fmt var value =
64
let pp_inject_copy pp_var fmt (var, value) =
65 65
  Format.fprintf fmt "%s(%a, %a, %s);"
66 66
    inject_copy_id
67 67
    pp_var var
68 68
    pp_var value
69 69
    (mpfr_rnd ())
70 70

  
71
let pp_inject_assign pp_var fmt var value =
71
let pp_inject_assign pp_var fmt (_, value as vv) =
72 72
  if is_const_value value
73 73
  then
74
    pp_inject_real pp_var pp_var fmt var value
74
    pp_inject_real pp_var pp_var fmt vv
75 75
  else
76
    pp_inject_copy pp_var fmt var value
76
    pp_inject_copy pp_var fmt vv
77 77

  
78 78
let pp_inject_init pp_var fmt var =
79 79
  Format.fprintf fmt "%s(%a, %i);"

Also available in: Unified diff