Add calling convention to function signatures

This commit is contained in:
Brandon Fish
2019-05-26 14:44:17 -05:00
parent cc4b1871d0
commit f42ca84480
2 changed files with 20 additions and 22 deletions

View File

@ -9,7 +9,6 @@ use std::sync::Arc;
use wasmer_runtime_core::cache::{Artifact, Error as CacheError};
use cranelift_codegen::isa::CallConv;
use wasmer_runtime_core::{
backend::{Backend, CompilerConfig},
error::CompileResult,
@ -169,26 +168,6 @@ impl From<Converter<ir::Signature>> for FuncSig {
}
}
impl From<Converter<&FuncSig>> for ir::Signature {
fn from(sig: Converter<&FuncSig>) -> Self {
ir::Signature {
params: sig
.0
.params()
.iter()
.map(|params| Converter(*params).into())
.collect::<Vec<_>>(),
returns: sig
.0
.returns()
.iter()
.map(|returns| Converter(*returns).into())
.collect::<Vec<_>>(),
call_conv: CallConv::SystemV, // TODO should come from isa
}
}
}
impl From<Converter<ir::Type>> for Type {
fn from(ty: Converter<ir::Type>) -> Self {
match ty.0 {