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

Yul: Object contains dialect #15534

Merged
merged 1 commit into from
Oct 31, 2024
Merged

Yul: Object contains dialect #15534

merged 1 commit into from
Oct 31, 2024

Conversation

clonker
Copy link
Member

@clonker clonker commented Oct 22, 2024

Changes the yul::Object to contain its yul::Dialect in anticipation of the changes introduced in PR #15347.

@clonker clonker force-pushed the yul_object_contains_dialect branch 2 times, most recently from b19e741 to a154d0a Compare October 23, 2024 06:54
matheusaaguiar
matheusaaguiar previously approved these changes Oct 24, 2024
libyul/Object.h Outdated Show resolved Hide resolved
Copy link
Member

@cameel cameel left a comment

Choose a reason for hiding this comment

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

Can you also include the part where the dialect is stored in Object and actually used?

matheusaaguiar
matheusaaguiar previously approved these changes Oct 29, 2024
@clonker
Copy link
Member Author

clonker commented Oct 30, 2024

Is it contextualized enough now @cameel?

@cameel
Copy link
Member

cameel commented Oct 30, 2024

Haven't managed to get back to this yet, but I think I'll have some time for that later today.

Copy link
Member

@cameel cameel left a comment

Choose a reason for hiding this comment

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

Yeah, it's better now. I can now see why the change is incomplete (the dialect is only needed for the new AST node types), but in that case taking it as far as possible still makes more sense. And removes more code from the original PR.

Overall this looks good, but there's one test helper where the dialect is not being set from the right source.

I also mentioned that the dialect belongs in the AST and should be passed with it all the way from parsing to printing. I think we should refactor it that way eventually, but it does not have to be now.

libsolidity/codegen/CompilerContext.cpp Show resolved Hide resolved
test/libyul/Common.cpp Outdated Show resolved Hide resolved
test/libyul/CompilabilityChecker.cpp Outdated Show resolved Hide resolved
@cameel cameel added the 🟡 PR review label label Oct 30, 2024
@clonker clonker merged commit fca0bd3 into develop Oct 31, 2024
73 checks passed
@clonker clonker deleted the yul_object_contains_dialect branch October 31, 2024 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor 🟡 PR review label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants