From 8e473181ed0ed4bee9d087fd407c73bf3b177711 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Mon, 16 Nov 2020 17:31:34 +0100 Subject: [PATCH] autofree: remove old logic --- vlib/v/gen/fn.v | 6 ------ 1 file changed, 6 deletions(-) diff --git a/vlib/v/gen/fn.v b/vlib/v/gen/fn.v index 7cabd02fd6..ddeecabd07 100644 --- a/vlib/v/gen/fn.v +++ b/vlib/v/gen/fn.v @@ -152,12 +152,6 @@ fn (mut g Gen) gen_fn_decl(it ast.FnDecl, skip bool) { if it.return_type == table.void_type { g.write_defer_stmts_when_needed() } - // - if g.autofree && !g.pref.experimental { - // TODO: remove this, when g.write_autofree_stmts_when_needed works properly - g.writeln('// af scope_vars (fn decl)') - g.autofree_scope_vars(it.body_pos.pos, it.body_pos.line_nr) - } if it.return_type != table.void_type && it.stmts.len > 0 && it.stmts.last() !is ast.Return { default_expr := g.type_default(it.return_type) // TODO: perf?