Skip to content

Commit

Permalink
doc(runtime-core) Add missing doc on vm::FuncCtx.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hywan committed Nov 12, 2019
1 parent cf33bf8 commit 22abd8e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/runtime-core/src/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -551,14 +551,17 @@ pub struct FuncCtx {
}

impl FuncCtx {
/// Offset to `vmctx`.
pub fn offset_vmctx() -> u8 {
0 * (mem::size_of::<usize>() as u8)
}

/// Offset to `func_env`.
pub fn offset_func_env() -> u8 {
1 * (mem::size_of::<usize>() as u8)
}

/// Size of a `FuncCtx`.
pub fn size() -> u8 {
mem::size_of::<Self>() as u8
}
Expand Down

0 comments on commit 22abd8e

Please sign in to comment.