Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variable mangling is unimplemented #29

Open
egroge opened this issue Sep 10, 2020 · 0 comments
Open

Variable mangling is unimplemented #29

egroge opened this issue Sep 10, 2020 · 0 comments
Labels
deferred Not a current priority ewasm Code generation for the eWASM system for Ethereum move ir Code generation for Libra

Comments

@egroge
Copy link
Collaborator

egroge commented Sep 10, 2020

When implementing typestates, the compiler creates a hidden variable called _contract_state. This then means that if the writer of a flint program tries to create a variable of the same name in the same scope, there will be an error that they are unable to explain. This issue is not specific to typestates - any local variable created for any reason potentially throws up this naming conflict.

To fix this, variable mangling, whereby variable names are somehow transformed if there is a conflict, should be implemented in both targets. This was previously implemented in move, but it was inconsistent and difficult to work with, so it has been unimplemented to make way for a new mangling design.

@egroge egroge added move ir Code generation for Libra ewasm Code generation for the eWASM system for Ethereum deferred Not a current priority labels Sep 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deferred Not a current priority ewasm Code generation for the eWASM system for Ethereum move ir Code generation for Libra
Projects
None yet
Development

No branches or pull requests

1 participant