Repository navigation
Support randomize() on AstMemberSel - #6161
Merged
wsnyder merged 3 commits intoJul 10, 2025
Merged
Conversation
Signed-off-by: Igor Zaworski <izaworski@internships.antmicro.com>
Member
|
Thanks, I'll review tonight, meantime please rename t_complex_randomize to t_randomize_complex_*, thanks. |
Signed-off-by: Igor Zaworski <izaworski@internships.antmicro.com>
wsnyder
reviewed
Jul 9, 2025
Comment on lines
+2650
to
+2664
| auto getElemDTypep = [](const AstNodeDType* dtypep) { | ||
| while (true) { | ||
| if (const AstBracketArrayDType* const bracketArrayp | ||
| = VN_CAST(dtypep, BracketArrayDType)) { | ||
| dtypep = bracketArrayp->childDTypep(); | ||
| } else if (const AstDynArrayDType* const packArrayDTypep | ||
| = VN_CAST(dtypep, DynArrayDType)) { | ||
| dtypep = packArrayDTypep->childDTypep(); | ||
| } else if (const AstQueueDType* const queueDTypep = VN_CAST(dtypep, QueueDType)) { | ||
| dtypep = queueDTypep->childDTypep(); | ||
| } else { | ||
| break; | ||
| } | ||
| } | ||
| return dtypep; |
Member
There was a problem hiding this comment.
Prefer just make a standard function. Use "adtypep" for each variable name inside the if's.
Probably need a ->skipRefp(). Have some of the tests use typedef instead of the types directly to test this.
Signed-off-by: Igor Zaworski <izaworski@internships.antmicro.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduction of support for
randomize() withwith complex expressions containing accessing object members.