Use update_symbols exported from aebytecode
This commit is contained in:
parent
e3335358ee
commit
0af50160fe
@ -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"}}}
|
||||
|
@ -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",
|
||||
|
@ -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.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user