profile: measure defer{} statements too
parent
fde929ee30
commit
73106b5f5e
|
@ -130,15 +130,15 @@ fn (mut g Gen) gen_fn_decl(it ast.FnDecl) {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn (mut g Gen) write_defer_stmts_when_needed() {
|
fn (mut g Gen) write_defer_stmts_when_needed() {
|
||||||
|
if g.defer_stmts.len > 0 {
|
||||||
|
g.write_defer_stmts()
|
||||||
|
}
|
||||||
if g.defer_profile_code.len > 0 {
|
if g.defer_profile_code.len > 0 {
|
||||||
g.writeln('')
|
g.writeln('')
|
||||||
g.writeln('\t// defer_profile_code')
|
g.writeln('\t// defer_profile_code')
|
||||||
g.writeln(g.defer_profile_code)
|
g.writeln(g.defer_profile_code)
|
||||||
g.writeln('')
|
g.writeln('')
|
||||||
}
|
}
|
||||||
if g.defer_stmts.len > 0 {
|
|
||||||
g.write_defer_stmts()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn (mut g Gen) fn_args(args []table.Arg, is_variadic bool) {
|
fn (mut g Gen) fn_args(args []table.Arg, is_variadic bool) {
|
||||||
|
|
Loading…
Reference in New Issue