-
Notifications
You must be signed in to change notification settings - Fork 214
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
SwingSet: Consolidate kernel run queue syscalls #4593
Conversation
* @param {string} kref Target of the message | ||
* @param {string} method The message verb | ||
* @param {*} args The message arguments | ||
* @param {ResolutionPolicy=} policy How the kernel should handle an eventual |
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.
@warner, this method had a duplicate JSDoc depending on where you grabbed it from. I carried the stricter type of ResolutionPolicy
here, but that causes a type error on line 105 below (if (policy !== 'none')
), since 'none'
is not a valid ResolutionPolicy
.
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.
Hm, I think that comparison should have been sendOnly
. But grepping for queueToKref
in test/
, I see a whole lot of 'none'
getting used, and no sendOnly
.
Could you try replacing sendOnly
with none
in the type definition (and docs), and see if the tests all pass? If so, 'none' it is.
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 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.
Looks good, modulo that one type problem.
* @param {string} kref Target of the message | ||
* @param {string} method The message verb | ||
* @param {*} args The message arguments | ||
* @param {ResolutionPolicy=} policy How the kernel should handle an eventual |
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.
Hm, I think that comparison should have been sendOnly
. But grepping for queueToKref
in test/
, I see a whole lot of 'none'
getting used, and no sendOnly
.
Could you try replacing sendOnly
with none
in the type definition (and docs), and see if the tests all pass? If so, 'none' it is.
That was it! |
81bfb53
to
a03e508
Compare
Description
This change is preliminary refactor before #4542 and #3465, and just moves some code around. The goal is to consolidate the implementation of syscalls that impact the run queue into a single place. After this I believe all operations that result in a message to be added to the run queue transit through one of the methods of
kernelQueue.js
, except for thecreate-vat
message.Security Considerations
None
Documentation Considerations
N/A
Testing Considerations
Since this only moves code, no tests are added or removed, and all tests pass.