vihaco_module::host
host¶
vihaco_module::host
classFrameMemory¶source
vihaco_module::host::FrameMemory
Rust trait.
pub trait FrameMemory: StackFrame + StackMemorymethodframe_base¶source
vihaco_module::host::FrameMemory::frame_base
methodget_local¶source
vihaco_module::host::FrameMemory::get_local
fn get_local(&self, index: usize) -> Result<&<Self as >::Value>Parameters
| Name | Type | Description |
|---|---|---|
index | usize |
Returns
Result<&<Self as >::Value>
methodget_local_mut¶source
vihaco_module::host::FrameMemory::get_local_mut
Signature
fn get_local_mut(&mut self, index: usize) -> Result<&mut <Self as >::Value>Parameters
| Name | Type | Description |
|---|---|---|
index | usize |
Returns
Result<&mut <Self as >::Value>
classGetProgramInfo¶source
vihaco_module::host::GetProgramInfo
Rust trait.
pub trait GetProgramInfoAssociated items
| Name | Type | Description |
|---|---|---|
Type | type Type | associated type |
Value | type Value | associated type |
methodget_constant¶source
vihaco_module::host::GetProgramInfo::get_constant
fn get_constant(&self, id: ConstantId) -> Result<&<Self as >::Value>Parameters
| Name | Type | Description |
|---|---|---|
id | ConstantId |
Returns
Result<&<Self as >::Value>
methodget_function¶source
vihaco_module::host::GetProgramInfo::get_function
Signature
fn get_function(&self, index: usize) -> Result<FunctionInfo<<Self as >::Type>>Parameters
| Name | Type | Description |
|---|---|---|
index | usize |
Returns
Result<FunctionInfo<<Self as >::Type>>
methodget_string¶source
vihaco_module::host::GetProgramInfo::get_string
fn get_string(&self, index: usize) -> Result<&String>Parameters
| Name | Type | Description |
|---|---|---|
index | usize |
Returns
Result<&String>
classProgramCounter¶source
vihaco_module::host::ProgramCounter
Rust trait.
pub trait ProgramCounterAssociated items
| Name | Type | Description |
|---|---|---|
Instruction | type Instruction | associated type |
methodget_instruction¶source
vihaco_module::host::ProgramCounter::get_instruction
fn get_instruction(&self, pc: u32) -> Result<&<Self as >::Instruction>Parameters
| Name | Type | Description |
|---|---|---|
pc | u32 |
Returns
Result<&<Self as >::Instruction>
Get the instruction at the given program counter without advancing it.
sourcemethodnext_instruction¶source
vihaco_module::host::ProgramCounter::next_instruction
fn next_instruction(&mut self) -> Result<&<Self as >::Instruction>Returns
Result<&<Self as >::Instruction>
Get the current instruction and advance the program counter by 1.
sourcemethodpc¶source
vihaco_module::host::ProgramCounter::pc
methodpc_mut¶source
vihaco_module::host::ProgramCounter::pc_mut
fn pc_mut(&mut self) -> &mut u32Returns
&mut u32
Get a mutable reference to the program counter.
sourcemethodpeek_instruction¶source
vihaco_module::host::ProgramCounter::peek_instruction
fn peek_instruction(&self) -> Result<&<Self as >::Instruction>Returns
Result<&<Self as >::Instruction>
Peek the current instruction without advancing the program counter.
sourceclassStackFrame¶source
vihaco_module::host::StackFrame
Rust trait.
classStackMemory¶source
vihaco_module::host::StackMemory
Rust trait.
pub trait StackMemoryAssociated items
| Name | Type | Description |
|---|---|---|
Value | type Value | associated type |
methodstack¶source
vihaco_module::host::StackMemory::stack
methodstack_get¶source
vihaco_module::host::StackMemory::stack_get
fn stack_get(&self, pos: usize) -> Result<&<Self as >::Value>Parameters
| Name | Type | Description |
|---|---|---|
pos | usize |
Returns
Result<&<Self as >::Value>
methodstack_get_mut¶source
vihaco_module::host::StackMemory::stack_get_mut
Signature
fn stack_get_mut(&mut self, pos: usize) -> Result<&mut <Self as >::Value>Parameters
| Name | Type | Description |
|---|---|---|
pos | usize |
Returns
Result<&mut <Self as >::Value>
methodstack_is_empty¶source
vihaco_module::host::StackMemory::stack_is_empty
methodstack_len¶source
vihaco_module::host::StackMemory::stack_len
methodstack_mut¶source
vihaco_module::host::StackMemory::stack_mut
methodstack_pop¶source
vihaco_module::host::StackMemory::stack_pop
methodstack_push¶source
vihaco_module::host::StackMemory::stack_push
methodstack_top¶source
vihaco_module::host::StackMemory::stack_top
methodstack_top_mut¶source
vihaco_module::host::StackMemory::stack_top_mut
fn stack_top_mut(&mut self) -> Result<&mut <Self as >::Value>Returns
Result<&mut <Self as >::Value>
classStdout¶source
vihaco_module::host::Stdout
Rust trait.