pr 00.1 decouple more code from vm and hardware
This commit is contained in:
@@ -6,8 +6,4 @@ pub mod telemetry;
|
||||
pub mod debugger_protocol;
|
||||
pub mod syscalls;
|
||||
|
||||
// Tipos da VM que fazem parte do contrato (ex.: inspeção de pilha pelo debugger)
|
||||
pub mod virtual_machine {
|
||||
mod value;
|
||||
pub use value::Value;
|
||||
}
|
||||
pub mod virtual_machine;
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
mod value;
|
||||
mod vm_init_error;
|
||||
|
||||
pub use value::Value;
|
||||
pub use vm_init_error::VmInitError;
|
||||
|
||||
#[derive(Debug, PartialEq, Clone)]
|
||||
pub enum VmFault {
|
||||
Trap(u32, String),
|
||||
Panic(String),
|
||||
Unavailable,
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub enum VmInitError<E> {
|
||||
InvalidFormat,
|
||||
UnsupportedFormat,
|
||||
PbsV0LoadFailed(prometeu_bytecode::LoadError),
|
||||
EntrypointNotFound,
|
||||
VerificationFailed(E),
|
||||
}
|
||||
Reference in New Issue
Block a user