diff --git a/lib/runtime-core/src/state.rs b/lib/runtime-core/src/state.rs index ed5f1fff7..c2d25c763 100644 --- a/lib/runtime-core/src/state.rs +++ b/lib/runtime-core/src/state.rs @@ -768,7 +768,7 @@ pub mod x64 { let mut results: Vec = vec![]; let mut was_baseline = true; - for i in 0.. { + for _ in 0.. { let ret_addr = initial_address.take().unwrap_or_else(|| { let x = *stack; stack = stack.offset(1); diff --git a/lib/runtime-core/src/tiering.rs b/lib/runtime-core/src/tiering.rs index b30da6128..4c5b85055 100644 --- a/lib/runtime-core/src/tiering.rs +++ b/lib/runtime-core/src/tiering.rs @@ -184,7 +184,7 @@ pub fn run_tiering ShellExitOperation>( baseline.context_mut().local_functions = optimized.context_mut().local_functions; } - // TODO: Fix this for optimized version. + // Assuming we do not want to do breakpoint-based debugging on optimized backends. let breakpoints = baseline.module.runnable_module.get_breakpoints(); let ctx = baseline.context_mut() as *mut _; let ret = with_ctx(ctx, || { @@ -209,15 +209,15 @@ pub fn run_tiering ShellExitOperation>( } }); if let Err(e) = ret { - if let Some(new_image) = e.downcast_ref::() { + if let Ok(new_image) = e.downcast::() { // Tier switch event if !was_sigint_triggered_fault() && opt_state.outcome.lock().unwrap().is_some() { - resume_image = Some(new_image.clone()); + resume_image = Some(*new_image); continue; } let op = interactive_shell(InteractiveShellContext { - image: Some(new_image.clone()), + image: Some(*new_image), patched: n_versions.get() > 1, }); match op { diff --git a/src/bin/wasmer.rs b/src/bin/wasmer.rs index 28d47f0ed..e12c0db94 100644 --- a/src/bin/wasmer.rs +++ b/src/bin/wasmer.rs @@ -705,21 +705,13 @@ fn interactive_shell(mut ctx: InteractiveShellContext) -> ShellExitOperation { } } "continue" | "c" => { - if ctx.patched { - println!("Error: Continueing execution is not yet supported on patched code."); + if let Some(image) = ctx.image.take() { + return ShellExitOperation::ContinueWith(image); } else { - if let Some(image) = ctx.image.take() { - return ShellExitOperation::ContinueWith(image); - } else { - println!("Program state not available, cannot continue execution"); - } + println!("Program state not available, cannot continue execution"); } } "backtrace" | "bt" => { - if ctx.patched { - println!("Warning: Backtrace on patched code might be inaccurate."); - } - if let Some(ref image) = ctx.image { println!("{}", image.execution_state.colored_output()); } else {