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

Gas charges to use Name.t instead of string #897

Merged
merged 1 commit into from
Oct 20, 2020
Merged

Conversation

jjcnn
Copy link
Contributor

@jjcnn jjcnn commented Oct 20, 2020

Gas charge AST nodes refer to program variables, so they need to use Name.t (for an appropriate Name struct) instead of string. This means that they need to be disambiguated.

Most of the code in this PR is entirely brain-dead boilerplate, except for the small change in EvalUtil.ml. The use of gas charge nodes introduces an extra dependency between Gas.ml and Syntax.ml, which makes it impossible to use different syntax structs in EvalUtil.ml and Gas.ml. I have solved this by setting EvalSyntax = Gas.GasSyntax, which I think makes sense since we would expect to charge gas based on the syntax being evaluated.

I worry that this will stop working on my current disambiguation branch, but I'll find out when I merge master to that branch.

@jjcnn jjcnn merged commit 32f7572 into master Oct 20, 2020
@anton-trunov anton-trunov deleted the disambiguate_gas_charge branch August 9, 2022 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants