From 27702b5a5d00514df408b19b00d9f9bf88dccc55 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Thu, 27 Aug 2020 18:07:28 +0200 Subject: [PATCH] fast: update V with v up instead of git pull --- cmd/tools/fast/fast.v | 4 ++-- vlib/v/gen/fn.v | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cmd/tools/fast/fast.v b/cmd/tools/fast/fast.v index e8130dc2e0..f9d914eac8 100644 --- a/cmd/tools/fast/fast.v +++ b/cmd/tools/fast/fast.v @@ -15,9 +15,9 @@ fn main() { println('fast.html generator\n') // Fetch the last commit's hash println('Fetching updates...') - ret := os.system('git pull --rebase') + ret := os.system('$vdir/v up') if ret != 0 { - println('failed to git pull') + println('failed to update V') return } mut commit_hash := exec('git rev-parse HEAD') diff --git a/vlib/v/gen/fn.v b/vlib/v/gen/fn.v index 7cdf9e3804..0b5aba4daa 100644 --- a/vlib/v/gen/fn.v +++ b/vlib/v/gen/fn.v @@ -636,9 +636,10 @@ fn (mut g Gen) call_args(args []ast.CallArg, expected_types []table.Type) { g.expr(arg.expr) } else if use_tmp_var_autofree { for name in g.tmp_arg_vars_to_free { - // Save expressions in temp variables so that they can be freed later. + // We saved expressions in temp variables so that they can be freed later. // `foo(str + str2) => x := str + str2; foo(x); x.free()` // g.write('_arg_expr_${g.called_fn_name}_$i') + // Use these variables here. if name.contains('_$i') { g.write(name) }