Improve handling of strings for backtraces (#843)
* Improve handling of strings for backtraces Largely avoid storing strings at all in the `wasmtime-*` internal crates, and instead only store strings in a separate global cache specific to the `wasmtime` crate itself. This global cache is inserted and removed from dynamically as modules are created and deallocated, and the global cache is consulted whenever a `Trap` is created to symbolicate any wasm frames. This also avoids the need to thread `module_name` through the jit crates and back, and additionally removes the need for `ModuleSyncString`. * Run rustfmt
This commit is contained in:
@@ -109,13 +109,7 @@ impl Context {
|
||||
self.validate(&data).map_err(SetupError::Validate)?;
|
||||
let debug_info = self.debug_info();
|
||||
|
||||
instantiate(
|
||||
&mut *self.compiler,
|
||||
&data,
|
||||
None,
|
||||
&mut self.namespace,
|
||||
debug_info,
|
||||
)
|
||||
instantiate(&mut *self.compiler, &data, &mut self.namespace, debug_info)
|
||||
}
|
||||
|
||||
/// Return the instance associated with the given name.
|
||||
@@ -146,7 +140,7 @@ impl Context {
|
||||
self.validate(&data).map_err(SetupError::Validate)?;
|
||||
let debug_info = self.debug_info();
|
||||
|
||||
CompiledModule::new(&mut *self.compiler, data, None, debug_info)
|
||||
CompiledModule::new(&mut *self.compiler, data, debug_info)
|
||||
}
|
||||
|
||||
/// If `name` isn't None, register it for the given instance.
|
||||
|
||||
Reference in New Issue
Block a user