Return mapping from variables to registers in fate compilation #902

Merged
ghallak merged 13 commits from ghallak/vars-registers-map into master 2022-10-25 15:42:03 +09:00
Showing only changes of commit f9b8114c0c - Show all commits

View File

@ -180,7 +180,7 @@ ast_to_fcode(Code, Options) ->
fun (_, FC) -> optimize(FC, Options) end,
maps:get(child_con_env, Env1)
)},
Env3 = Env2#{ saved_fresh_names => get(saved_fresh_names) },
Env3 = Env2#{ saved_fresh_names := get(saved_fresh_names) },
clear_fresh_names(),
clear_saved_fresh_names(),
{Env3, FCode2}.
@ -238,7 +238,8 @@ init_env(Options) ->
["Chain", "GAAttachTx"] => #con_tag{ tag = 21, arities = ChainTxArities }
},
options => Options,
functions => #{}
functions => #{},
saved_fresh_names => #{}
}.
-spec builtins() -> builtins().