-
Notifications
You must be signed in to change notification settings - Fork 22
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
fn rav1d_worker_task
: Refactor state machine
#671
Conversation
rav1d_worker_task
fn rav1d_worker_task
: Refactor state machine
7509587
to
ef6b864
Compare
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.
I think https://github.com/memorysafety/rav1d/pull/671/files#r1449731224 is the only thing that's wrong, though I made some other suggestions that would IMO greatly help readability.
ef6b864
to
4b3f2a2
Compare
Thanks for the useful feedback, I've applied everything except for the labeled block for |
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.
There's that one // next:
comment I think you should add back, but otherwise everything LGTM now. I slightly prefer actual labeled blocks vs. a // label:
comment, but the indentation isn't great either, so it's fine as is.
`rav1d_worker_task` involves complex control flow with gotos, and therefore was transpiled into a state machine. This refactoring restores the original structure with minimal additional structured control flow to emulate gotos.
4b3f2a2
to
d28be39
Compare
rav1d_worker_task
involves complex control flow with gotos, and therefore was transpiled into a state machine. This refactoring restores the original structure with minimal additional structured control flow to emulate gotos.