From a542612c9f37f8d7c5a48c0c21cc9c454aec9021 Mon Sep 17 00:00:00 2001 From: Ulf Norell Date: Fri, 10 May 2019 12:29:02 +0200 Subject: [PATCH] Minor code simplification --- src/aeso_fcode_to_fate.erl | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/aeso_fcode_to_fate.erl b/src/aeso_fcode_to_fate.erl index 48f25a8..40e3edf 100644 --- a/src/aeso_fcode_to_fate.erl +++ b/src/aeso_fcode_to_fate.erl @@ -241,7 +241,7 @@ to_scode(Env, {remote, Ct, Fun, [{builtin, call_gas_left, _}, Value | Args]}) -> Call = if Env#env.tailpos -> aeb_fate_code:call_tr(?a, Lbl, ?a); true -> aeb_fate_code:call_r(?a, Lbl, ?a) end, - call_to_scode(Env, [to_scode(Env, Value), to_scode(Env, Ct), Call], Args); + call_to_scode(Env, Call, [Ct, Value | Args]); to_scode(Env, {remote, Ct, Fun, [Gas, Value | Args]}) -> %% Gas is limited. @@ -249,10 +249,7 @@ to_scode(Env, {remote, Ct, Fun, [Gas, Value | Args]}) -> Call = if Env#env.tailpos -> aeb_fate_code:call_gtr(?a, Lbl, ?a, ?a); true -> aeb_fate_code:call_gr(?a, Lbl, ?a, ?a) end, - call_to_scode(Env, [to_scode(Env, Gas), - to_scode(Env, Value), - to_scode(Env, Ct), Call], - Args); + call_to_scode(Env, Call, [Ct, Value, Gas | Args]); to_scode(Env, {closure, Fun, FVs}) -> to_scode(Env, {tuple, [{lit, {string, make_function_name(Fun)}}, FVs]});