Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

collect signatures directly in the right collection #144

Merged
merged 1 commit into from
Oct 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/compiler/src/translator/sections.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ use crate::{WasmError, WasmResult};
use core::convert::TryFrom;
use std::boxed::Box;
use std::collections::HashMap;
use std::sync::Arc;
use std::vec::Vec;
use wasmer_types::entity::packed_option::ReservedValue;
use wasmer_types::entity::EntityRef;
Expand Down Expand Up @@ -60,14 +61,14 @@ pub fn parse_type_section(

for entry in types {
if let Ok(TypeDef::Func(WPFunctionType { params, returns })) = entry {
let sig_params: Vec<Type> = params
let sig_params: Arc<[Type]> = params
.iter()
.map(|ty| {
wptype_to_type(*ty)
.expect("only numeric types are supported in function signatures")
})
.collect();
let sig_returns: Vec<Type> = returns
let sig_returns: Arc<[Type]> = returns
.iter()
.map(|ty| {
wptype_to_type(*ty)
Expand Down