2
0
Simon Krajewski 6 жил өмнө
parent
commit
afd974a043

+ 8 - 1
src/generators/genhl.ml

@@ -3227,7 +3227,14 @@ and make_fun ?gen_content ctx name fidx f cthis cparent =
 	} in
 	ctx.m <- old;
 	Hashtbl.add ctx.defined_funs fidx ();
-	let f = if ctx.optimize then Hlopt.optimize ctx.dump_out (DynArray.get ctx.cstrings.arr) f else f in
+	let f = if ctx.optimize then begin
+		let t = Timer.timer ["generate";"hl";"opt"] in
+		let f = Hlopt.optimize ctx.dump_out (DynArray.get ctx.cstrings.arr) f in
+		t();
+		f
+	end else
+		f
+	in
 	DynArray.add ctx.cfunctions f;
 	capt