Changeset 3025


Ignore:
Timestamp:
Mar 28, 2013, 11:21:44 PM (4 years ago)
Author:
sacerdot
Message:
  1. two syntax errors in instrumented files fixed
  2. the compiler now is compliant with the -o option
Location:
driver
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • driver/acc.ml

    r3020 r3025  
    6464  let style = Cost_instrumented (l_costmap,s_costmap) in
    6565  let instrumented = ClightPrinter.print_program style labelled in
    66   let filename = Filename.chop_extension filename ^ "-instrumented.c" in
     66  let filename =
     67   (match Options.get_output_files () with
     68      None -> Filename.chop_extension filename
     69    | Some s -> s) ^ "-instrumented.c" in
    6770  let och = open_out filename in
    6871  output_string och instrumented;
  • driver/clightPrinter.ml

    r2792 r3025  
    418418  | Cost_instrumented (_,scm) ->
    419419    let cost = stack_cost_for scm id in
    420     fprintf p "__stack_cost_incr(%d);@ " cost;
     420    fprintf p "__stack_size_incr(%d);@ " cost;
    421421    return_cost := Some cost
    422422  );
     
    660660      fprintf str_formatter "void __stack_size_incr(int incr) {@\n";
    661661      fprintf str_formatter "  __stack_size = __stack_size + incr;@\n";
    662       fprintf str_formatter "  __stack_size_max = __stack_size_max < __stack_size ? __stack_size : __stack_size_max@\n}@\n@\n"
     662      fprintf str_formatter "  __stack_size_max = __stack_size_max < __stack_size ? __stack_size : __stack_size_max;@\n}@\n@\n"
    663663  | _ -> ());
    664664  print_program_2 str_formatter prog;
Note: See TracChangeset for help on using the changeset viewer.