Obsidian
Obsidian copied to clipboard
clean up boilerplate generation
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)
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