Skip to content

Conversation

ChrisDodd
Copy link
Contributor

For some targets/backends, it does not really make sense to convert tuples into structs, but it may be necessary to split up tuple copies into separate copies for each element of the tuple. This change adds that capability to CopyStructures.

@ChrisDodd ChrisDodd requested review from asl and fruffy August 18, 2025 10:56
public:
explicit CopyStructures(TypeMap *typeMap, bool errorOnMethodCall = true,
bool copyHeaders = false, TypeChecking *typeChecking = nullptr) {
bool copyHeaders = false, bool copyTuples = false,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would consider converting this into an option struct. Now that we have C++20 we can also use designated initializers

@fruffy fruffy added the core Topics concerning the core segments of the compiler (frontend, midend, parser) label Sep 12, 2025
@ChrisDodd ChrisDodd added this pull request to the merge queue Sep 29, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Sep 30, 2025
@ChrisDodd ChrisDodd enabled auto-merge September 30, 2025 05:40
@fruffy fruffy disabled auto-merge September 30, 2025 07:56
@fruffy fruffy enabled auto-merge September 30, 2025 07:56
@fruffy fruffy added this pull request to the merge queue Sep 30, 2025
Merged via the queue into p4lang:main with commit 2265f80 Sep 30, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Topics concerning the core segments of the compiler (frontend, midend, parser)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants