From 0f45bd4f0d0980a79cf393aac4395d98423a08d9 Mon Sep 17 00:00:00 2001 From: Syrus Date: Fri, 20 Dec 2019 19:12:35 -0800 Subject: [PATCH] Fixed tiering docs --- lib/runtime-core/src/tiering.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/runtime-core/src/tiering.rs b/lib/runtime-core/src/tiering.rs index 0fafa501d2e..e01babb1c61 100644 --- a/lib/runtime-core/src/tiering.rs +++ b/lib/runtime-core/src/tiering.rs @@ -167,12 +167,14 @@ pub unsafe fn run_tiering ShellExitOperation>( let code_ptr = optimized .module .runnable_module + .borrow() .get_code() .unwrap() .as_ptr() as usize; let target_addresses: Vec = optimized .module .runnable_module + .borrow() .get_local_function_offsets() .unwrap() .into_iter() @@ -183,6 +185,7 @@ pub unsafe fn run_tiering ShellExitOperation>( baseline .module .runnable_module + .borrow() .patch_local_function(i - base, target_addresses[i - base]); } @@ -209,17 +212,18 @@ pub unsafe fn run_tiering ShellExitOperation>( baseline.context_mut().local_functions = optimized.context_mut().local_functions; } // Assuming we do not want to do breakpoint-based debugging on optimized backends. - let breakpoints = baseline.module.runnable_module.get_breakpoints(); + let breakpoints = baseline.module.runnable_module.borrow().get_breakpoints(); let ctx = baseline.context_mut() as *mut _; let ret = with_ctx(ctx, || { if let Some(image) = resume_image.take() { let msm = baseline .module .runnable_module + .borrow() .get_module_state_map() .unwrap(); let code_base = - baseline.module.runnable_module.get_code().unwrap().as_ptr() as usize; + baseline.module.runnable_module.borrow().get_code().unwrap().as_ptr() as usize; invoke_call_return_on_stack( &msm, code_base,