diff --git a/schala-repl/src/language.rs b/schala-repl/src/language.rs index 28fb33c..14ab7ee 100644 --- a/schala-repl/src/language.rs +++ b/schala-repl/src/language.rs @@ -8,7 +8,7 @@ pub struct LLVMCodeString(pub String); pub struct EvalOptions { pub debug: DebugOptions, pub execution_method: ExecutionMethod, - pub debug_stages: HashSet, + pub debug_passes: HashSet, } #[derive(Debug, Serialize, Deserialize)] pub enum ExecutionMethod { @@ -167,7 +167,7 @@ macro_rules! pass_chain_helper { { let pass_name = stringify!($pass); let output = { - let ref debug_set = $options.debug_stages; + let ref debug_set = $options.debug_passes; let debug_handle: Option<&mut UnfinishedComputation> = if debug_set.contains(pass_name) { Some(&mut $comp) } else { diff --git a/schala-repl/src/lib.rs b/schala-repl/src/lib.rs index 128a1d9..9ba5891 100644 --- a/schala-repl/src/lib.rs +++ b/schala-repl/src/lib.rs @@ -288,25 +288,25 @@ impl Repl { } } fn handle_debug(&mut self, commands: Vec<&str>) -> Option { - let stages = self.get_cur_language().get_stages(); + let passes = self.get_cur_language().get_stages(); match commands.get(1) { - Some(&"stages") => Some(stages.into_iter().intersperse(format!(" -> ")).collect()), + Some(&"passes") => Some(passes.into_iter().intersperse(format!(" -> ")).collect()), b @ Some(&"show") | b @ Some(&"hide") => { let show = b == Some(&"show"); - let debug_stage: String = match commands.get(2) { + let debug_pass: String = match commands.get(2) { Some(s) => s.to_string(), None => return Some(format!("Must specify a stage to debug")), }; - if let Some(stage) = stages.iter().find(|stage_name| **stage_name == debug_stage) { - let msg = format!("{} debug for stage {}", if show { "Enabling" } else { "Disabling" }, debug_stage); + if let Some(stage) = passes.iter().find(|stage_name| **stage_name == debug_pass) { + let msg = format!("{} debug for stage {}", if show { "Enabling" } else { "Disabling" }, debug_pass); if show { - self.options.debug_stages.insert(stage.clone()); + self.options.debug_passes.insert(stage.clone()); } else { - self.options.debug_stages.remove(stage); + self.options.debug_passes.remove(stage); } Some(msg) } else { - Some(format!("Couldn't find stage: {}", debug_stage)) + Some(format!("Couldn't find stage: {}", debug_pass)) } }, _ => Some(format!("Unknown debug command"))