Changeset 2864


Ignore:
Timestamp:
Mar 13, 2013, 2:27:55 PM (4 years ago)
Author:
sacerdot
Message:

I must have drunk yesterday: all RTL passes are printed correctly; the
pass that used to fail was RTLabs which is NOT a back-end pass.

Location:
driver
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • driver/backendPrinter.ml

    r2860 r2864  
    122122let rTL_printing_params =
    123123 { Extracted.Joint_printer.print_pass_ind = printing_pass_independent_params
    124  ; print_acc_a_reg = (fun _ -> "FOO")(*Obj.magic print_register*)
    125  ; print_acc_b_reg = (fun _ -> "FOO")(*Obj.magic print_register*)
    126  ; print_acc_a_arg = (fun _ -> "FOO")(*Obj.magic (print_argument print_register)*)
    127  ; print_acc_b_arg = (fun _ -> "FOO")(*Obj.magic (print_argument print_register)*)
    128  ; print_dpl_reg = (fun _ -> "FOO")(*Obj.magic print_register*)
    129  ; print_dph_reg = (fun _ -> "FOO")(*Obj.magic print_register*)
    130  ; print_dpl_arg = (fun _ -> "FOO")(*Obj.magic (print_argument print_register)*)
    131  ; print_dph_arg = (fun _ -> "FOO")(*Obj.magic (print_argument print_register)*)
    132  ; print_snd_arg = (fun _ -> "FOO")(*Obj.magic (print_argument print_register)*)
    133  ; print_pair_move = (fun _ -> "FOO")(*Obj.magic
     124 ; print_acc_a_reg = Obj.magic print_register
     125 ; print_acc_b_reg = Obj.magic print_register
     126 ; print_acc_a_arg = Obj.magic (print_argument print_register)
     127 ; print_acc_b_arg = Obj.magic (print_argument print_register)
     128 ; print_dpl_reg = Obj.magic print_register
     129 ; print_dph_reg = Obj.magic print_register
     130 ; print_dpl_arg = Obj.magic (print_argument print_register)
     131 ; print_dph_arg = Obj.magic (print_argument print_register)
     132 ; print_snd_arg = Obj.magic (print_argument print_register)
     133 ; print_pair_move = Obj.magic
    134134    (fun {Extracted.Types.fst = reg; snd = arg} ->
    135       print_register reg ^ " " ^ print_argument print_register arg)*)
    136  ; print_call_args = (fun _ -> "FOO")(*Obj.magic
    137     (fun l -> String.concat " " (List.map (print_argument print_register) l))*)
    138  ; print_call_dest = (fun _ -> "FOO")(*Obj.magic
    139     (fun l -> String.concat " " (List.map print_register l))*)
     135      print_register reg ^ " " ^ print_argument print_register arg)
     136 ; print_call_args = Obj.magic
     137    (fun l -> String.concat " " (List.map (print_argument print_register) l))
     138 ; print_call_dest = Obj.magic
     139    (fun l -> String.concat " " (List.map print_register l))
    140140 ; print_ext_seq = (fun rtl_seq -> assert false )
    141141 }
     
    176176    l)
    177177
    178 let print_program pass program =
    179  let f =
     178let print_program pass (program : Extracted.Preamble.__) =
     179 let lines =
    180180  match pass with
    181    | Extracted.Compiler.Rtlabs_pass ->
    182       Extracted.RTL_printer.print_RTL_program rTL_printing_params
    183181   | Extracted.Compiler.Rtl_separate_pass ->
    184182      Extracted.RTL_printer.print_RTL_program rTL_printing_params
     183       (Extracted.Types.fst (Obj.magic program))
    185184   | Extracted.Compiler.Rtl_uniq_pass ->
    186185      Extracted.RTL_printer.print_RTL_program rTL_printing_params
     186       (Extracted.Types.fst (Obj.magic program))
    187187   | Extracted.Compiler.Ltl_pass ->
    188188      Extracted.LTL_printer.print_LTL_program joint_LTL_LIN_printing_params
    189    | _ -> fun _ -> Extracted.List.Nil
     189       (Extracted.Types.fst (Obj.magic program))
     190   | _ -> Extracted.List.Nil
    190191 in
    191   "\n" ^ print_graph (f (Obj.magic program)) ^ "\n"
     192  "\n" ^ print_graph lines ^ "\n"
  • driver/cerco.ml

    r2860 r2864  
    4242  let rec infinity = Extracted.Nat.S infinity in
    4343  (fun pass prog ->
    44     print_string (BackendPrinter.print_program pass (fst (Obj.magic prog)));
     44    print_string (BackendPrinter.print_program pass prog);
    4545    Extracted.Semantics.run_and_print pass prog infinity
    4646     (fun p -> print_endline ("\n" ^ string_of_pass p ^ ":"); Extracted.Types.It)
Note: See TracChangeset for help on using the changeset viewer.