-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Vm: Use wrapper types to enforce API separation
Similar to VmPages, remove the state type argument from Vm and introduce a VmRef type that serves as a reference to a Vm in a particular state. The various VmRef types are then used to implement the appropriate functionality for a VM in that state. This immediately enables a couple of small cleanups: finalize() no longer needs to consume the Vm struct and we can now implement drop() for Vm. Signed-off-by: Andrew Bresticker <[email protected]>
- Loading branch information
1 parent
c9b4abf
commit 9699abf
Showing
5 changed files
with
369 additions
and
382 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
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.