mirror of
https://github.com/fluencelabs/wasmer
synced 2025-07-02 01:51:32 +00:00
Clean up, everything works
This commit is contained in:
@ -678,6 +678,7 @@ impl ModuleCodeGenerator<X64FunctionCode, X64ExecutionContext, CodegenError>
|
||||
fn next_function(
|
||||
&mut self,
|
||||
_module_info: Arc<RwLock<ModuleInfo>>,
|
||||
_loc: (u32, u32),
|
||||
) -> Result<&mut X64FunctionCode, CodegenError> {
|
||||
let (mut assembler, mut function_labels, breakpoints, exception_table) =
|
||||
match self.functions.last_mut() {
|
||||
@ -736,7 +737,16 @@ impl ModuleCodeGenerator<X64FunctionCode, X64ExecutionContext, CodegenError>
|
||||
fn finalize(
|
||||
mut self,
|
||||
_: &ModuleInfo,
|
||||
) -> Result<(X64ExecutionContext, Box<dyn CacheGen>), CodegenError> {
|
||||
) -> Result<
|
||||
(
|
||||
(
|
||||
X64ExecutionContext,
|
||||
Option<wasmer_runtime_core::codegen::DebugMetadata>,
|
||||
),
|
||||
Box<dyn CacheGen>,
|
||||
),
|
||||
CodegenError,
|
||||
> {
|
||||
let (assembler, function_labels, breakpoints, exception_table) =
|
||||
match self.functions.last_mut() {
|
||||
Some(x) => (
|
||||
@ -829,16 +839,19 @@ impl ModuleCodeGenerator<X64FunctionCode, X64ExecutionContext, CodegenError>
|
||||
};
|
||||
|
||||
Ok((
|
||||
X64ExecutionContext {
|
||||
code: output,
|
||||
signatures: self.signatures.as_ref().unwrap().clone(),
|
||||
breakpoints: breakpoints,
|
||||
func_import_count: self.func_import_count,
|
||||
function_pointers: out_labels,
|
||||
function_offsets: out_offsets,
|
||||
msm: msm,
|
||||
exception_table,
|
||||
},
|
||||
(
|
||||
X64ExecutionContext {
|
||||
code: output,
|
||||
signatures: self.signatures.as_ref().unwrap().clone(),
|
||||
breakpoints: breakpoints,
|
||||
func_import_count: self.func_import_count,
|
||||
function_pointers: out_labels,
|
||||
function_offsets: out_offsets,
|
||||
msm: msm,
|
||||
exception_table,
|
||||
},
|
||||
None,
|
||||
),
|
||||
Box::new(cache),
|
||||
))
|
||||
}
|
||||
@ -2405,7 +2418,7 @@ impl FunctionCodeGenerator<CodegenError> for X64FunctionCode {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn feed_local(&mut self, _ty: WpType, n: usize) -> Result<(), CodegenError> {
|
||||
fn feed_local(&mut self, _ty: WpType, n: usize, _loc: u32) -> Result<(), CodegenError> {
|
||||
self.num_locals += n;
|
||||
Ok(())
|
||||
}
|
||||
@ -2515,7 +2528,12 @@ impl FunctionCodeGenerator<CodegenError> for X64FunctionCode {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn feed_event(&mut self, ev: Event, module_info: &ModuleInfo) -> Result<(), CodegenError> {
|
||||
fn feed_event(
|
||||
&mut self,
|
||||
ev: Event,
|
||||
module_info: &ModuleInfo,
|
||||
_loc: u32,
|
||||
) -> Result<(), CodegenError> {
|
||||
let a = self.assembler.as_mut().unwrap();
|
||||
|
||||
match ev {
|
||||
|
Reference in New Issue
Block a user