This is a meta issue, see sub-issues for actual work items to help out.
I just spent an embarrassing amount of time debugging a stack overflow (like a dummy, I didn't hit bt immediately...) and it was because has_vtable got caught in an infinite loop (with my local changes).
All of
could be rewritten as graph traversals (or fix point computations). We just have to be careful to consider only the correct edges (eg ignore a class's class members, etc).
If they were re-written as graph traversals (or fix point computations), then they wouldn't be recursive and we wouldn't blow the stack. Additionally, some of these things add a Cell<bool> member that gets set during recursion, and we use this to detect cycles and avoid infinite recursion. These members would not be necessary with either a graph traversal or fix-point computation.
Leaving this as a meta issue for rewriting each of these things.
This is a meta issue, see sub-issues for actual work items to help out.
I just spent an embarrassing amount of time debugging a stack overflow (like a dummy, I didn't hit
btimmediately...) and it was becausehas_vtablegot caught in an infinite loop (with my local changes).All of
has_vtable(Rewritehas_vtablechecks as either graph traversal or fix-point analysis #765)can_derive_copy[_in_array](Rewritecan_derive_copy[_in_array]as either a graph traversal or fix-point analysis #766)can_derive_debug(Rewritecan_derive_debugas either a graph traversal or fix-point analysis #767)is_unsized(Rewriteis_unsizedas a fix-point analysis #768)can_derive_default(Rewritecan_derive_defaultas a fix-point analysis #856)has_destructor(Rewritehas_destructoras a fixed point analysis #927)could be rewritten as graph traversals (or fix point computations). We just have to be careful to consider only the correct edges (eg ignore a class's class members, etc).
If they were re-written as graph traversals (or fix point computations), then they wouldn't be recursive and we wouldn't blow the stack. Additionally, some of these things add a
Cell<bool>member that gets set during recursion, and we use this to detect cycles and avoid infinite recursion. These members would not be necessary with either a graph traversal or fix-point computation.Leaving this as a meta issue for rewriting each of these things.