-
Notifications
You must be signed in to change notification settings - Fork 24
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
chore: clean up for loops and breaks #1234
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Commit: 1b9f504 |
@@ -815,7 +781,8 @@ impl<F: PrimeField32 + TwoAdicField, EF: ExtensionField<F> + TwoAdicField> IfCom | |||
} | |||
} | |||
|
|||
// Zipped for loop -- loop extends over the first entry in starts and ends | |||
// Zipped for loop -- loop extends over the first entry in starts and end0 | |||
// ATTENTION: starting with starts[0] > end0 will lead to undefined behavior. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit scary in the VM case: is there any way we could prevent this at compile time?
Is it basically only used to iterate through arrays and in the range(0, ?)
cases (where it's safe)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, only via builder.zip()
and builder.range()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, truly was a cleanup, no behavior changes.
builder.iter()
compile_zip!
toiter_zip!
Closes INT-3015