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

Abstract Syntax Tree Cleanups and Resolver Rewrite #75

Closed
0x19 opened this issue Aug 15, 2023 · 3 comments
Closed

Abstract Syntax Tree Cleanups and Resolver Rewrite #75

0x19 opened this issue Aug 15, 2023 · 3 comments
Assignees
Labels
ast Abstract Syntax Tree bug Something isn't working enhancement New feature or request high priority High Priority Tasks

Comments

@0x19
Copy link
Contributor

0x19 commented Aug 15, 2023

I have no idea what the heck it was in my head that current approach could be useful (which still will be for edge cases) but in order to resolve forwarded statements, with current approach logic of the code needs to become so complex that I just dislike idea of moving forward with it. Therefore, will introduce following changes into the code base:

  • Sources sorted based on graph and topological sorting algorithms in order to sort imports by the lowest requirement to the highest. This will help to a point.
  • to be defined, not sure what yet...
  • Get at least a bit more code coverage and documentation done in the process... It's ridiculous that AST which is a base package is becoming less and less documented and tested.

Currently we get panics because type descriptions cannot be found, including forward contract creations that cannot be discovered in time which results in us needing to write t_unknown_{nodeId} and later on processing them in the resolver. You see, I bored myself already by just typing this thing down. That would be a shit so complex that anyone trying, including me, look into the codebase would just evaporate from the project. Therefore, lets build something performant and nice to look at.

For example, this one right here -> https://bscscan.com/address/0x7a4af156379f512de147ed3b96393047226d923f#code, jumps from contract/statement to a contract/statement like it's a candy season and thus, the reason where I've discovered numerous of panics and well... Let's fix it.

Fun to talk with myself.

@0x19 0x19 added bug Something isn't working enhancement New feature or request ast Abstract Syntax Tree high priority High Priority Tasks labels Aug 15, 2023
@0x19 0x19 self-assigned this Aug 15, 2023
@0x19 0x19 changed the title Abstract Syntax Tree Resolver Rewrite Abstract Syntax Tree Cleanups and Resolver Rewrite Aug 15, 2023
@0x19
Copy link
Contributor Author

0x19 commented Aug 15, 2023

Topological sorting is resolved: #76 It improves speed of figuring out code almost without using references which is a big win!

@0x19
Copy link
Contributor Author

0x19 commented Aug 16, 2023

Another round of bugfixes, especially node resolution and tree building #77.

@0x19
Copy link
Contributor Author

0x19 commented Aug 17, 2023

Completed!

@0x19 0x19 closed this as completed Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ast Abstract Syntax Tree bug Something isn't working enhancement New feature or request high priority High Priority Tasks
Projects
None yet
Development

No branches or pull requests

1 participant