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

Try to merge copyHeaders into copyStructures. #3739

Merged
merged 2 commits into from
Nov 29, 2022

Conversation

fruffy
Copy link
Collaborator

@fruffy fruffy commented Nov 29, 2022

Follow up on #3726.

return statement;
const auto& srcInfo = statement->srcInfo;
auto* retval = new IR::IndexedVector<IR::StatOrDecl>();
if (const auto* list = statement->right->to<IR::ListExpression>()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this cannot happen anymore, these should have been replaced with StructExpressions.
This is a leftover from when we didn't have StructExpressions.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

So where in the compiler do ListExpressions still exist? They are useful in that StructExpressions require NamedExpressions, a specific type of Expression.

Copy link
Contributor

Choose a reason for hiding this comment

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

They may still exist before the type checker replaces them with struct expressions. They show up as initializers for various data structures.

@fruffy fruffy merged commit 76d1b07 into main Nov 29, 2022
@fruffy fruffy deleted the fruffy/copy_structures_merge branch November 30, 2022 13:59
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.

3 participants