From 0af50160fe1c9dd463cd35606df86bf6fb71793c Mon Sep 17 00:00:00 2001 From: Gaith Hallak Date: Fri, 7 Oct 2022 13:49:14 +0300 Subject: [PATCH] Use update_symbols exported from aebytecode --- rebar.config | 2 +- rebar.lock | 2 +- src/aeso_fcode_to_fate.erl | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/rebar.config b/rebar.config index 1df3a58..ef5bd8e 100644 --- a/rebar.config +++ b/rebar.config @@ -2,7 +2,7 @@ {erl_opts, [debug_info]}. -{deps, [ {aebytecode, {git, "https://github.com/aeternity/aebytecode.git", {tag, "v3.1.1"}}} +{deps, [ {aebytecode, {git, "https://github.com/aeternity/aebytecode.git", {tag, "v3.2.0"}}} , {getopt, "1.0.1"} , {eblake2, "1.0.0"} , {jsx, {git, "https://github.com/talentdeficit/jsx.git", {tag, "2.8.0"}}} diff --git a/rebar.lock b/rebar.lock index a1be66e..85a9709 100644 --- a/rebar.lock +++ b/rebar.lock @@ -1,7 +1,7 @@ {"1.2.0", [{<<"aebytecode">>, {git,"https://github.com/aeternity/aebytecode.git", - {ref,"8269dbd71e9011921c60141636f1baa270a0e784"}}, + {ref,"2a0a397afad6b45da52572170f718194018bf33c"}}, 0}, {<<"aeserialization">>, {git,"https://github.com/aeternity/aeserialization.git", diff --git a/src/aeso_fcode_to_fate.erl b/src/aeso_fcode_to_fate.erl index 63fc7b8..3d00356 100644 --- a/src/aeso_fcode_to_fate.erl +++ b/src/aeso_fcode_to_fate.erl @@ -79,13 +79,12 @@ compile(ChildContracts, FCode, Options) -> SFuns = functions_to_scode(ChildContracts, ContractName, Functions, Options), SFuns1 = optimize_scode(SFuns, Options), FateCode = to_basic_blocks(SFuns1), - Symbols = aeb_fate_code:symbols(FateCode), ChildSymbols = maps:from_list( [ {make_function_id(FName), make_function_name(FName)} || {_, #{functions := ChildFuns}} <- maps:to_list(ChildContracts), FName <- maps:keys(ChildFuns) ]), - FateCode1 = setelement(3, FateCode, maps:merge(Symbols, ChildSymbols)), + FateCode1 = aeb_fate_code:update_symbols(FateCode, ChildSymbols), ?debug(compile, Options, "~s\n", [aeb_fate_asm:pp(FateCode)]), FateCode1.