-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Refactor init checker: Extract reusable code #16705
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
Conversation
bd03307
to
408bec3
Compare
* | ||
* `changed == false` implies that the fixed point has been reached. | ||
*/ | ||
protected var changed: Boolean = false |
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.
Is changed
part of the cache? Is the heap now intended to be independent of the cache? Should changed
and hasChanged
be renamed to indicate that they are about the heap?
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.
Yes, changed
is part of the cache, it's not related to the heap.
7faa4bf
to
464fa5d
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.
Otherwise LGTM.
* cache.last = cache.current | ||
* cache.current = Empty | ||
* cache.changed = false | ||
* iterate(outputCache, emptyCache) |
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.
If iterate
is a recursive call to def iterate
above, then def iterate
should have these two explicit parameters.
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.
That's changed in the last commit.
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.
Oh, sorry, yes, you're right.
Refactor init checker: Extract reusable code