|
@@ -895,7 +895,7 @@ try
|
|
|
if String.length input > 0 && (input.[0] = '[' || input.[0] = '{') then begin
|
|
if String.length input > 0 && (input.[0] = '[' || input.[0] = '{') then begin
|
|
|
did_something := true;
|
|
did_something := true;
|
|
|
force_typing := true;
|
|
force_typing := true;
|
|
|
- DisplayJson.parse_input com input measure_times
|
|
|
|
|
|
|
+ DisplayJson.parse_input com input Timer.measure_times
|
|
|
end else
|
|
end else
|
|
|
DisplayOutput.handle_display_argument com input pre_compilation did_something;
|
|
DisplayOutput.handle_display_argument com input pre_compilation did_something;
|
|
|
),"","display code tips");
|
|
),"","display code tips");
|
|
@@ -906,7 +906,7 @@ try
|
|
|
json_out := Some file
|
|
json_out := Some file
|
|
|
),"<file>","generate JSON types description");
|
|
),"<file>","generate JSON types description");
|
|
|
("Optimization",["--no-output"],[], Arg.Unit (fun() -> no_output := true),"","compiles but does not generate any file");
|
|
("Optimization",["--no-output"],[], Arg.Unit (fun() -> no_output := true),"","compiles but does not generate any file");
|
|
|
- ("Debug",["--times"],[], Arg.Unit (fun() -> measure_times := true),"","measure compilation times");
|
|
|
|
|
|
|
+ ("Debug",["--times"],[], Arg.Unit (fun() -> Timer.measure_times := true),"","measure compilation times");
|
|
|
("Optimization",["--no-inline"],[], define Define.NoInline, "","disable inlining");
|
|
("Optimization",["--no-inline"],[], define Define.NoInline, "","disable inlining");
|
|
|
("Optimization",["--no-opt"],[], Arg.Unit (fun() ->
|
|
("Optimization",["--no-opt"],[], Arg.Unit (fun() ->
|
|
|
com.foptimize <- false;
|
|
com.foptimize <- false;
|
|
@@ -1125,7 +1125,7 @@ with
|
|
|
raise (DisplayOutput.Completion (String.concat "." pack))
|
|
raise (DisplayOutput.Completion (String.concat "." pack))
|
|
|
| DisplayException(DisplayFields Some r) ->
|
|
| DisplayException(DisplayFields Some r) ->
|
|
|
DisplayPosition.display_position#reset;
|
|
DisplayPosition.display_position#reset;
|
|
|
- let fields = if !measure_times then begin
|
|
|
|
|
|
|
+ let fields = if !Timer.measure_times then begin
|
|
|
Timer.close_times();
|
|
Timer.close_times();
|
|
|
(List.map (fun (name,value) ->
|
|
(List.map (fun (name,value) ->
|
|
|
CompletionItem.make_ci_timer ("@TIME " ^ name) value
|
|
CompletionItem.make_ci_timer ("@TIME " ^ name) value
|
|
@@ -1203,7 +1203,7 @@ with
|
|
|
raise (DisplayOutput.Completion s)
|
|
raise (DisplayOutput.Completion s)
|
|
|
| EvalExceptions.Sys_exit i | Hlinterp.Sys_exit i ->
|
|
| EvalExceptions.Sys_exit i | Hlinterp.Sys_exit i ->
|
|
|
ctx.flush();
|
|
ctx.flush();
|
|
|
- if !measure_times then Timer.report_times prerr_endline;
|
|
|
|
|
|
|
+ if !Timer.measure_times then Timer.report_times prerr_endline;
|
|
|
exit i
|
|
exit i
|
|
|
| DisplayOutput.Completion _ as exc ->
|
|
| DisplayOutput.Completion _ as exc ->
|
|
|
raise exc
|
|
raise exc
|
|
@@ -1232,4 +1232,4 @@ with DisplayOutput.Completion c ->
|
|
|
exit 1
|
|
exit 1
|
|
|
);
|
|
);
|
|
|
other();
|
|
other();
|
|
|
-if !measure_times then Timer.report_times prerr_endline
|
|
|
|
|
|
|
+if !Timer.measure_times then Timer.report_times prerr_endline
|