Ignore:
Timestamp:
Mar 13, 2013, 2:02:57 AM (7 years ago)
Author:
sacerdot
Message:

RTL printing, core dumps ATM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • driver/backendPrinter.ml

    r2859 r2860  
    118118     "ACC_A " ^ print_byte byte
    119119
     120let print_register n = "r_" ^ string_of_pos n
     121
     122let rTL_printing_params =
     123 { 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
     134    (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))*)
     140 ; print_ext_seq = (fun rtl_seq -> assert false )
     141 }
     142
     143
    120144let joint_LTL_LIN_printing_params =
    121145 { Extracted.Joint_printer.print_pass_ind = printing_pass_independent_params
     
    152176    l)
    153177
    154 let print_LTL_program program =
    155  let res =
    156   Extracted.LTL_printer.print_LTL_program joint_LTL_LIN_printing_params program
     178let print_program pass program =
     179 let f =
     180  match pass with
     181   | Extracted.Compiler.Rtlabs_pass ->
     182      Extracted.RTL_printer.print_RTL_program rTL_printing_params
     183   | Extracted.Compiler.Rtl_separate_pass ->
     184      Extracted.RTL_printer.print_RTL_program rTL_printing_params
     185   | Extracted.Compiler.Rtl_uniq_pass ->
     186      Extracted.RTL_printer.print_RTL_program rTL_printing_params
     187   | Extracted.Compiler.Ltl_pass ->
     188      Extracted.LTL_printer.print_LTL_program joint_LTL_LIN_printing_params
     189   | _ -> fun _ -> Extracted.List.Nil
    157190 in
    158   "\n" ^ print_graph res ^ "\n"
     191  "\n" ^ print_graph (f (Obj.magic program)) ^ "\n"
Note: See TracChangeset for help on using the changeset viewer.