mirror of
https://github.com/fluencelabs/parity-wasm
synced 2025-06-12 06:21:40 +00:00
Validator extracted.
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
//! WebAssembly interpreter module.
|
||||
|
||||
use std::any::TypeId;
|
||||
use validation;
|
||||
|
||||
/// Custom user error.
|
||||
pub trait UserError: 'static + ::std::fmt::Display + ::std::fmt::Debug {
|
||||
@ -116,6 +117,18 @@ impl<U> From<U> for Error where U: UserError + Sized {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<validation::Error> for Error {
|
||||
fn from(e: validation::Error) -> Self {
|
||||
Error::Validation(e.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
impl From<::common::stack::Error> for Error {
|
||||
fn from(e: ::common::stack::Error) -> Self {
|
||||
Error::Stack(e.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
mod native;
|
||||
mod imports;
|
||||
mod memory;
|
||||
@ -124,7 +137,6 @@ mod program;
|
||||
mod runner;
|
||||
mod stack;
|
||||
mod table;
|
||||
mod validator;
|
||||
mod value;
|
||||
mod variable;
|
||||
|
||||
|
Reference in New Issue
Block a user