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

refac: separate compiler and parser #123

Merged
merged 38 commits into from
Sep 3, 2024

Conversation

sayon
Copy link
Contributor

@sayon sayon commented Aug 10, 2024

What ❔

Parameterize parser with previously LLVM-specific details (i.e. function attributes).

Why ❔

LLVM-specific logic has to be decoupled from the parser so that parser can be decoupled from the compiler and reused in other contexts.

Copy link

codecov bot commented Aug 10, 2024

Codecov Report

Attention: Patch coverage is 73.96509% with 522 lines in your changes missing coverage. Please review.

Project coverage is 53.03%. Comparing base (1d861cb) to head (e94cd66).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
era-yul/src/yul/printer.rs 55.35% 125 Missing ⚠️
...ser/statement/expression/function_call/verbatim.rs 2.08% 47 Missing ⚠️
era-yul/src/yul/visitor/mod.rs 0.00% 41 Missing ⚠️
era-yul/src/yul/parser/statement/mod.rs 53.52% 33 Missing ⚠️
...y/src/yul/parser/statement/variable_declaration.rs 23.68% 29 Missing ⚠️
era-yul/src/yul/parser/statement/assignment.rs 39.58% 29 Missing ⚠️
...ty/src/yul/parser/statement/function_definition.rs 46.66% 24 Missing ⚠️
era-yul/src/yul/parser/type.rs 12.50% 21 Missing ⚠️
...l/parser/statement/expression/function_call/mod.rs 54.54% 20 Missing ⚠️
era-yul/src/util/counter.rs 0.00% 18 Missing ⚠️
... and 24 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #123      +/-   ##
==========================================
+ Coverage   52.59%   53.03%   +0.43%     
==========================================
  Files         106      129      +23     
  Lines       14761    15346     +585     
==========================================
+ Hits         7764     8138     +374     
- Misses       6997     7208     +211     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sayon sayon force-pushed the iz-cpr-1493-extract-yul-parser-into-a-separate-crate branch from 3e96f39 to 122660a Compare August 10, 2024 15:58
@sayon sayon changed the title [WIP] decouple LLVM specifics from YUL parser [refac] Decouple LLVM specifics from YUL parser Aug 10, 2024
@sayon sayon requested a review from hedgar2017 August 10, 2024 22:40
@sayon sayon force-pushed the iz-cpr-1493-extract-yul-parser-into-a-separate-crate branch 3 times, most recently from fcc3df0 to 4a43d5d Compare August 12, 2024 12:05
@sayon sayon marked this pull request as draft August 12, 2024 12:14
hedgar2017
hedgar2017 previously approved these changes Aug 12, 2024
Copy link
Collaborator

@hedgar2017 hedgar2017 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanx.

@sayon sayon force-pushed the iz-cpr-1493-extract-yul-parser-into-a-separate-crate branch from 4a43d5d to bbea151 Compare August 12, 2024 14:32
@sayon sayon marked this pull request as ready for review August 12, 2024 16:22
@sayon sayon requested a review from hedgar2017 August 12, 2024 16:22
src/yul/parser/type.rs Outdated Show resolved Hide resolved
@hedgar2017 hedgar2017 changed the title [refac] Decouple LLVM specifics from YUL parser refac: decouple LLVM specifics from YUL parser Aug 14, 2024
@sayon sayon force-pushed the iz-cpr-1493-extract-yul-parser-into-a-separate-crate branch from b0fdf9f to b7a71db Compare August 23, 2024 11:48
@sayon sayon force-pushed the iz-cpr-1493-extract-yul-parser-into-a-separate-crate branch from aa4aa5a to cefb4ba Compare August 26, 2024 19:17
@sayon
Copy link
Contributor Author

sayon commented Aug 29, 2024

@hedgar2017 ready for review

@sayon sayon requested a review from hedgar2017 August 29, 2024 07:15
era-compiler-solidity/src/project/contract/mod.rs Outdated Show resolved Hide resolved
era-yul/src/lib.rs Outdated Show resolved Hide resolved
era-yul/src/util/printer/mod.rs Outdated Show resolved Hide resolved
era-yul/src/yul/visitor/mod.rs Show resolved Hide resolved
era-yul/src/yul/visitor/mod.rs Outdated Show resolved Hide resolved
era-yul/tests/printer.rs Outdated Show resolved Hide resolved
hedgar2017
hedgar2017 previously approved these changes Aug 31, 2024
Copy link
Collaborator

@hedgar2017 hedgar2017 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
Please fix the tests and we'll merge.

Copy link
Collaborator

@hedgar2017 hedgar2017 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably need to fix our release pipeline after this patch. I'll check it and get back here.

@hedgar2017 hedgar2017 merged commit ea067e5 into main Sep 3, 2024
23 checks passed
@hedgar2017 hedgar2017 deleted the iz-cpr-1493-extract-yul-parser-into-a-separate-crate branch September 3, 2024 10:58
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.

2 participants