mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-23 21:51:32 +00:00
Flatten tuple in return type, conditionally remove more jit debug code
This commit is contained in:
@ -121,7 +121,7 @@ pub trait ModuleCodeGenerator<FCG: FunctionCodeGenerator<E>, RM: RunnableModule,
|
||||
fn finalize(
|
||||
self,
|
||||
module_info: &ModuleInfo,
|
||||
) -> Result<((RM, Option<DebugMetadata>), Box<dyn CacheGen>), E>;
|
||||
) -> Result<(RM, Option<DebugMetadata>, Box<dyn CacheGen>), E>;
|
||||
|
||||
/// Creates a module from cache.
|
||||
unsafe fn from_cache(cache: Artifact, _: Token) -> Result<ModuleInner, CacheError>;
|
||||
@ -273,11 +273,11 @@ impl<
|
||||
};
|
||||
let mut chain = (self.middleware_chain_generator)();
|
||||
let info = crate::parse::read_module(wasm, &mut mcg, &mut chain, &compiler_config)?;
|
||||
let ((exec_context, compile_debug_info), cache_gen) =
|
||||
mcg.finalize(&info.read().unwrap())
|
||||
.map_err(|x| CompileError::InternalError {
|
||||
msg: format!("{:?}", x),
|
||||
})?;
|
||||
let (exec_context, compile_debug_info, cache_gen) = mcg
|
||||
.finalize(&info.read().unwrap())
|
||||
.map_err(|x| CompileError::InternalError {
|
||||
msg: format!("{:?}", x),
|
||||
})?;
|
||||
|
||||
#[cfg(feature = "generate-debug-information")]
|
||||
{
|
||||
|
@ -66,6 +66,7 @@ pub mod vmcalls;
|
||||
pub use trampoline_x64 as trampoline;
|
||||
#[cfg(unix)]
|
||||
pub mod fault;
|
||||
#[cfg(feature = "generate-debug-information")]
|
||||
pub mod jit_debug;
|
||||
pub mod state;
|
||||
#[cfg(feature = "managed")]
|
||||
|
@ -16,6 +16,7 @@ use crate::{
|
||||
};
|
||||
|
||||
use crate::backend::CacheGen;
|
||||
#[cfg(feature = "generate-debug-information")]
|
||||
use crate::jit_debug;
|
||||
use indexmap::IndexMap;
|
||||
use std::collections::HashMap;
|
||||
@ -83,6 +84,7 @@ pub struct ModuleInfo {
|
||||
/// will be generated.
|
||||
pub generate_debug_info: bool,
|
||||
|
||||
#[cfg(feature = "generate-debug-information")]
|
||||
#[serde(skip)]
|
||||
/// Resource manager of debug information being used by a debugger.
|
||||
pub debug_info_manager: jit_debug::JITCodeDebugInfoManager,
|
||||
|
@ -92,6 +92,7 @@ pub fn read_module<
|
||||
custom_sections: HashMap::new(),
|
||||
|
||||
generate_debug_info: compiler_config.should_generate_debug_info(),
|
||||
#[cfg(feature = "generate-debug-information")]
|
||||
debug_info_manager: Default::default(),
|
||||
}));
|
||||
|
||||
|
Reference in New Issue
Block a user