1
0
mirror of https://github.com/fluencelabs/wasmer synced 2025-04-03 08:21:04 +00:00

Fix clif backend

This commit is contained in:
Lachlan Sneff 2019-02-22 16:20:26 -08:00
parent df03d00e74
commit 07c8975304
4 changed files with 4 additions and 5 deletions

@ -43,7 +43,7 @@ impl Compiler for CraneliftCompiler {
let isa = get_isa(); let isa = get_isa();
let mut module = module::Module::new(wasm); let mut module = module::Module::new();
let module_env = module_env::ModuleEnv::new(&mut module, &*isa); let module_env = module_env::ModuleEnv::new(&mut module, &*isa);
let func_bodies = module_env.translate(wasm)?; let func_bodies = module_env.translate(wasm)?;

@ -7,7 +7,7 @@ use cranelift_wasm;
use hashbrown::HashMap; use hashbrown::HashMap;
use std::sync::Arc; use std::sync::Arc;
use wasmer_runtime_core::cache::{Artifact, Error as CacheError, WasmHash}; use wasmer_runtime_core::cache::{Artifact, Error as CacheError};
use wasmer_runtime_core::{ use wasmer_runtime_core::{
backend::Backend, backend::Backend,
@ -25,7 +25,7 @@ pub struct Module {
} }
impl Module { impl Module {
pub fn new(wasm: &[u8]) -> Self { pub fn new() -> Self {
Self { Self {
info: ModuleInfo { info: ModuleInfo {
memories: Map::new(), memories: Map::new(),

@ -4,7 +4,6 @@ use crate::{
}; };
use cranelift_codegen::{ir, isa}; use cranelift_codegen::{ir, isa};
use cranelift_wasm::{self, translate_module, FuncTranslator, ModuleEnvironment}; use cranelift_wasm::{self, translate_module, FuncTranslator, ModuleEnvironment};
use std::sync::Arc;
use wasmer_runtime_core::{ use wasmer_runtime_core::{
error::{CompileError, CompileResult}, error::{CompileError, CompileResult},
module::{ module::{

@ -202,7 +202,7 @@ impl FuncResolverBuilder {
pub fn finalize( pub fn finalize(
mut self, mut self,
signatures: &SliceMap<SigIndex, Arc<FuncSig>>, signatures: &SliceMap<SigIndex, FuncSig>,
trampolines: Arc<Trampolines>, trampolines: Arc<Trampolines>,
handler_data: HandlerData, handler_data: HandlerData,
) -> CompileResult<(FuncResolver, BackendCache)> { ) -> CompileResult<(FuncResolver, BackendCache)> {