Add the internals field and necessary structures for metering.

This commit is contained in:
losfair
2019-05-17 01:10:21 +08:00
parent 4e5ac24517
commit 6aa87a0bbf
6 changed files with 46 additions and 4 deletions

View File

@ -17,6 +17,7 @@ use wasmparser::{Operator, Type as WpType};
pub enum Event<'a, 'b> {
Internal(InternalEvent),
Wasm(&'b Operator<'a>),
WasmOwned(Operator<'a>),
}
pub enum InternalEvent {
@ -39,7 +40,9 @@ impl fmt::Debug for InternalEvent {
}
}
pub struct BkptInfo {}
pub struct BkptInfo {
pub throw: unsafe extern "C" fn () -> !,
}
pub trait ModuleCodeGenerator<FCG: FunctionCodeGenerator<E>, RM: RunnableModule, E: Debug> {
/// Creates a new module code generator.