Move inline breakpoint outside of runtime backend

There was some code smell leaking inline breakpoint implementation into the runtime core backend instead of the compiler itself
This commit is contained in:
Syrus
2019-12-20 18:25:03 -08:00
parent 0419df937e
commit 294cc28135
16 changed files with 214 additions and 139 deletions

View File

@ -2,9 +2,10 @@
//! state could read or updated at runtime. Use cases include generating stack traces, switching
//! generated code from one tier to another, or serializing state of a running instace.
use crate::backend::Backend;
use crate::backend::{Backend, RunnableModule};
use std::collections::BTreeMap;
use std::ops::Bound::{Included, Unbounded};
use std::{cell::RefCell, rc::Rc};
/// An index to a register
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash, Serialize, Deserialize)]
@ -173,7 +174,7 @@ pub struct InstanceImage {
}
/// A `CodeVersion` is a container for a unit of generated code for a module.
#[derive(Debug, Clone)]
// #[derive(Debug, Clone)]
pub struct CodeVersion {
/// Indicates if this code version is the baseline version.
pub baseline: bool,
@ -186,6 +187,9 @@ pub struct CodeVersion {
/// The backend used to compile this module.
pub backend: Backend,
/// `RunnableModule` for this code version.
pub runnable_module: Rc<RefCell<Box<dyn RunnableModule>>>,
}
impl ModuleStateMap {