Closed ghallak closed 1 year ago
@radrow Notice how the local function X.g
is called .X.g
. I'm using an existing function (aeso_fcode_to_fate:make_function_name/1
) to get the functions names. I don't think we need this distinction in the names between local function and entrypoints. Should it just be called g
instead of .X.g
?
Yes, let's make it just g. I think you can hack it around by calling that make name with the env set to entrypoint/nonprivate or something like that
I have made the change here f0db4fb96b9b6edcada96291d656a45c3eb1b924 and here is how the new output looks like:
variables_registers =>
#{{"C","f","x"} => {var,2},
{"C","f","y"} => {var,1},
{"C","g","x"} => {var,0},
{"C","q","x"} => {arg,0},
{"C","x","a"} => {var,0},
{"X","f","g"} => {var,0},
{"X","f","h"} => {var,1},
{"X","g","g"} => {var,0},
{"X","g","z"} => {arg,0}}
@hanssv I have added a compiler option that enables/disables the returning of the newly introduced map here ee37e187e892c32303370919ee048a21ec18e25f.
This PR will change the result of the compilation to include a mapping from variables to fate registers.
Code example:
Registers in the compilation result: