Re-enable snapshotting.

This commit is contained in:
losfair
2019-08-16 13:08:10 -07:00
parent be4ea764a0
commit dbaa000e96
3 changed files with 8 additions and 16 deletions

View File

@ -768,7 +768,7 @@ pub mod x64 {
let mut results: Vec<WasmFunctionStateDump> = 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);

View File

@ -184,7 +184,7 @@ pub fn run_tiering<F: Fn(InteractiveShellContext) -> 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<F: Fn(InteractiveShellContext) -> ShellExitOperation>(
}
});
if let Err(e) = ret {
if let Some(new_image) = e.downcast_ref::<InstanceImage>() {
if let Ok(new_image) = e.downcast::<InstanceImage>() {
// 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 {