-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
IncrementalCompact re-iteration is broken #46945
Comments
This is sometimes true, but stateful iterators exist and aren't required to obey it |
Can you give an other example? I take it that would mean it's OK for the second iterator to resume at the point the first left off. I can understand that, but the fact that the |
It is rare to have an iterator that is also mutating, but that is the explicit purpose of this iterator |
I'm not saying it shouldn't mutate, I'm saying that it shouldn't corrupt the IR when using multiple of these stateful iterators. I think this is a legit issue, because of the state is initialized (it disregards the running bb counter). I agree it's rare though (esp. because it's still easy to corrupt the IR when using multiple of these iterators), but it seems like a simple change to fix this at least. |
Normally it should be possible to (partially) iterate an object, and iterate anew using a different iterator. This is not the case with IncrementalCompact.
Set-up, on latest master:
Let's iterate a bit:
The same, but with a new iterator:
So this second iteration resumed where the previous iterator left off, which is wrong, but it also breaks the resulting IR's CFG:
The
!!!
s don't occur if I only iterate using a single iterator.The text was updated successfully, but these errors were encountered: