mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-19 11:51:22 +00:00
Implement {get,set}_points_used.
This commit is contained in:
@ -13,7 +13,7 @@ use crate::{
|
||||
table::Table,
|
||||
typed_func::{Func, Wasm, WasmTrapInfo, WasmTypeList},
|
||||
types::{FuncIndex, FuncSig, GlobalIndex, LocalOrImport, MemoryIndex, TableIndex, Type, Value},
|
||||
vm,
|
||||
vm::{self, InternalField},
|
||||
};
|
||||
use smallvec::{smallvec, SmallVec};
|
||||
use std::{mem, ptr::NonNull, sync::Arc};
|
||||
@ -372,6 +372,14 @@ impl Instance {
|
||||
pub fn module(&self) -> Module {
|
||||
Module::new(Arc::clone(&self.module))
|
||||
}
|
||||
|
||||
pub fn get_internal(&self, field: &InternalField) -> u64 {
|
||||
self.inner.backing.internals.0[field.index()]
|
||||
}
|
||||
|
||||
pub fn set_internal(&mut self, field: &InternalField, value: u64) {
|
||||
self.inner.backing.internals.0[field.index()] = value;
|
||||
}
|
||||
}
|
||||
|
||||
impl InstanceInner {
|
||||
|
Reference in New Issue
Block a user