Skip to content

Commit

Permalink
chore: move runtime error stringification to testsuite runner
Browse files Browse the repository at this point in the history
Signed-off-by: nerodesu017 <[email protected]>
  • Loading branch information
nerodesu017 committed Dec 17, 2024
1 parent 0857971 commit 14f2dd5
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions src/core/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,31 +31,6 @@ pub enum RuntimeError {
// "unreachable"
}

impl RuntimeError {
#[cfg(debug_assertions)]
pub fn to_wasm_testsuite_string(&self) -> alloc::string::String {
match self {
Self::DivideBy0 => "integer divide by zero",
Self::UnrepresentableResult => "integer overflow",
Self::FunctionNotFound => todo!(),
Self::StackSmash => todo!(),
Self::BadConversionToInteger => "invalid conversion to integer",

Self::MemoryAccessOutOfBounds => "out of bounds memory access",
Self::TableAccessOutOfBounds => "out of bounds table access",
Self::ElementAccessOutOfBounds => todo!(),

Self::UninitializedElement => "uninitialized element",
Self::SignatureMismatch => "indirect call type mismatch",
Self::ExpectedAValueOnTheStack => todo!(),

Self::UndefinedTableIndex => "undefined element",
// _ => "",
}
.to_string()
}
}

#[derive(Debug, PartialEq, Eq, Clone)]
pub enum StoreInstantiationError {
ActiveDataWriteOutOfBounds,
Expand Down

0 comments on commit 14f2dd5

Please sign in to comment.