Remove sink arguments from compile_and_emit

The data can be accessed after the fact using context.mach_compile_result
This commit is contained in:
bjorn3
2022-01-11 18:17:29 +01:00
parent 55d722db05
commit b803514d55
13 changed files with 155 additions and 138 deletions

View File

@@ -554,8 +554,6 @@ pub trait Module {
&mut self,
func: FuncId,
ctx: &mut Context,
trap_sink: &mut dyn binemit::TrapSink,
stack_map_sink: &mut dyn binemit::StackMapSink,
) -> ModuleResult<ModuleCompiledFunction>;
/// Define a function, taking the function body from the given `bytes`.
@@ -656,10 +654,8 @@ impl<M: Module> Module for &mut M {
&mut self,
func: FuncId,
ctx: &mut Context,
trap_sink: &mut dyn binemit::TrapSink,
stack_map_sink: &mut dyn binemit::StackMapSink,
) -> ModuleResult<ModuleCompiledFunction> {
(**self).define_function(func, ctx, trap_sink, stack_map_sink)
(**self).define_function(func, ctx)
}
fn define_function_bytes(