From 80031cb2b4122b230972092021ae65aa12cf5c18 Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Fri, 11 Jan 2019 13:39:13 +0100 Subject: [PATCH] Add TargetIsa --- lib/module/src/module.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/module/src/module.rs b/lib/module/src/module.rs index 1c495927f4..85d12f0f45 100644 --- a/lib/module/src/module.rs +++ b/lib/module/src/module.rs @@ -506,7 +506,7 @@ where /// Define a function, producing the function body from the given `Context`. pub fn define_function(&mut self, func: FuncId, ctx: &mut Context) -> ModuleResult<()> { - self.define_function_peek_compiled(func, ctx, |_, _| ()) + self.define_function_peek_compiled(func, ctx, |_, _, _| ()) } /// Define a function, allowing to peek at the compiled function and producing the @@ -515,7 +515,7 @@ where &mut self, func: FuncId, ctx: &mut Context, - peek_compiled: impl FnOnce(u32, &Context) -> T, + peek_compiled: impl FnOnce(u32, &Context, &isa::TargetIsa) -> T, ) -> ModuleResult { let (compiled, peek_res) = { let code_size = ctx.compile(self.backend.isa()).map_err(|e| { @@ -535,7 +535,7 @@ where return Err(ModuleError::InvalidImportDefinition(info.decl.name.clone())); } - let peek_res = peek_compiled(code_size, &ctx); + let peek_res = peek_compiled(code_size, &ctx, self.backend.isa()); ( self.backend.define_function(