From adfa325f48a76661866b437f6b751c135a086657 Mon Sep 17 00:00:00 2001 From: Ulf Norell Date: Tue, 3 Sep 2019 14:11:30 +0200 Subject: [PATCH] Don't use `_main` for the AEVM top entrypoint --- src/aeso_icode_to_asm.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/aeso_icode_to_asm.erl b/src/aeso_icode_to_asm.erl index b9e6042..422d36f 100644 --- a/src/aeso_icode_to_asm.erl +++ b/src/aeso_icode_to_asm.erl @@ -27,7 +27,7 @@ convert(#{ contract_name := _ContractName }, _Options) -> %% Create a function dispatcher - DispatchFun = {"_main", [], [{"arg", "_"}], + DispatchFun = {"%main", [], [{"arg", "_"}], {switch, {var_ref, "arg"}, [{{tuple, [fun_hash(Fun), {tuple, make_args(Args)}]}, @@ -44,7 +44,7 @@ convert(#{ contract_name := _ContractName %% taken from the stack StopLabel = make_ref(), StatefulStopLabel = make_ref(), - MainFunction = lookup_fun(Funs, "_main"), + MainFunction = lookup_fun(Funs, "%main"), StateTypeValue = aeso_ast_to_icode:type_value(StateType),