forked from bytecodealliance/wasmtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move ContinuationObject and StackChain to runtime crate (bytecodealli…
…ance#125) This PR moves the definitions of `ContinuationObject`, `ContinuationReference`, `StackChain`, and `StackChainCell` from the `continuations` crate to the `runtime` crate. The latter crate is the more natural home for these types and this move is a preparation step for merging the `wasmtime-fibre` crate into `runtime`. The reason for not storing these types in `continuations` was that we need access to the layout of these types from various other crates that cannot depend on `runtime`. This layout information is provided by the the `offsets` module in the `continuations` crate, containing the offsets of various fields inside these types. Defining these offsets is much easier if we have access to the involved types directly. Now that these types are not defined in `continuations` any more, the offsets are hard-coded instead. New tests in the `runtime` crate check that the offset values don't go out of sync with the actual layout of `ContinuationObject`. In the process, I've changed the types of the offsets to `usize`. This is the more natural choice, instead of the previous `i32`. Moving the definitions into `runtime` also required made doc comments mandatory on certain fields, which I've added.
- Loading branch information
1 parent
7dee03b
commit 395d2c4
Showing
7 changed files
with
286 additions
and
221 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
Oops, something went wrong.