-
Notifications
You must be signed in to change notification settings - Fork 786
Fix isorecursive canonicalization #5269
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2676,11 +2676,8 @@ bool RecGroupEquator::topLevelEq(HeapType a, HeapType b) const { | |
} | ||
|
||
bool RecGroupEquator::eq(Type a, Type b) const { | ||
if (a == b) { | ||
return true; | ||
} | ||
if (a.isBasic() || b.isBasic()) { | ||
return false; | ||
return a == b; | ||
} | ||
return eq(*getTypeInfo(a), *getTypeInfo(b)); | ||
} | ||
|
@@ -2699,7 +2696,9 @@ bool RecGroupEquator::eq(HeapType a, HeapType b) const { | |
} | ||
auto groupA = a.getRecGroup(); | ||
auto groupB = b.getRecGroup(); | ||
return groupA == groupB || (groupA == newGroup && groupB == otherGroup); | ||
bool selfRefA = groupA == newGroup; | ||
bool selfRefB = groupB == otherGroup; | ||
return (selfRefA && selfRefB) || (!selfRefA && !selfRefB && groupA == groupB); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've forgotten how this code works, sorry. Is I couldn't find code comments explaining how the class There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yes, exactly.
Because we might be comparing heap types that are used in
There are some additional comments on There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Got it, thanks! |
||
} | ||
|
||
bool RecGroupEquator::eq(const TypeInfo& a, const TypeInfo& b) const { | ||
|
Uh oh!
There was an error while loading. Please reload this page.