-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(swingset): implement comms GC, wire everything into place
This is the big switch to activate comms GC. All the new code is in `gc-comms.js`, which creates the "gcKit". `dispatch()` was changed to assemble GC actions arriving from the kernel into a single "GC" structure, with all three kinds of actions. * this anticipates a future kernel change that lumps all three GC-related dispatch types into a single message, and mirrors the remote protocol which does exactly that * we first filter out any kfrefs (vrefs) for meta-objects, like the "controller" (root object) and the receivers, because we aren't prepared to drop these * after all dispatch operations (message send, promise resolution notification, and all GC operations), we call the new `processGC()` to perform any necessary GC actiity `gc-comms.js` follows the same pattern as `delivery.js`: * two inbound conversion functions (`gcFromKernel` and `gcFromRemote`) to handle GC requests arriving from either source * two outbound conversion functions (`gcToKernel` and `gcToRemote`) to emit syscalls or remote-protocol messages that express GC requests * the end-of-crank `processGC()` function * this calls `processMaybeFree()` to check on everything whose refcount touched zero during the crank * that returns a set of actions which need to be taken * the actions are sorted into the kernel or remote that is affected, then request messages are generated for syscalls and/or transmission refs #3306
- Loading branch information
Showing
3 changed files
with
363 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.