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

clean up boilerplate generation #333

Open
ivoysey opened this issue May 21, 2021 · 1 comment
Open

clean up boilerplate generation #333

ivoysey opened this issue May 21, 2021 · 1 comment
Assignees

Comments

@ivoysey
Copy link
Collaborator

ivoysey commented May 21, 2021

this is the list of changes i made at one point while working on debugging tests; it constitutes a bunch of small things we could do smarter instead of hard coding them into the mustache file.

01 - remove the constructor call
02 - rename to get rid of the "_30" suffix that might matter
03 - remove the "shift_right" call and inline it instead like we do
04 - remove default case in dispatch table we don't have
05 - remove setting things to the i256 zero explicitly (yul spec says it
should do this anyway and we don't do it)
06 - remove the function that gives the definition from 5, now deadcode
07 - remove the variable _4 and expr_19 from main (now dead code)
08 - remove expr_22_functionIdentifier from main (now dead code)
09 - remove convert_t_rational_9 (now dead)
10 - remove convert_t_rational_4 and only use
11 - replace hex constants with integer ones (0x04 -> 4, 0x09 -> 9)

@ivoysey
Copy link
Collaborator Author

ivoysey commented Aug 18, 2021

https://docs.soliditylang.org/en/latest/internals/variable_cleanup.html a lot of the things we currently omit are these sorts of hygiene conditions; that's fine for now but will not be fine always

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant