Update dependencies (#30)

* dev-test: update dependencies

* update wasmparser: 0.99.0 -> 0.101.1

Remove `i64` generation fix for elements as they only contain `reftype` and not `i64`

* update wasmparser: 0.101.1 -> 0.103.0

See <https://github.com/bytecodealliance/wasm-tools/pull/957> for more information

* update wasmparser: 0.103.0 -> 0.106.0

* update wasmparser: 0.106.0 -> 0.107.0
This commit is contained in:
wackbyte
2023-06-26 17:19:12 -04:00
committed by GitHub
parent ef18bb1172
commit bbaa60e8c2
7 changed files with 22 additions and 19 deletions
+1 -1
View File
@@ -4,4 +4,4 @@ version = "0.12.0"
edition = "2021"
[dependencies]
wasmparser = "0.99.0"
wasmparser = "0.107.0"
+6 -5
View File
@@ -2,8 +2,7 @@ use std::collections::HashMap;
use wasmparser::{
BlockType, Data, Element, Export, ExternalKind, FunctionBody, Global, Import, LocalsReader,
MemoryType, Name, NameSectionReader, Parser, Payload, Result, TableType, Type, TypeRef,
ValType,
MemoryType, Name, NameSectionReader, Parser, Payload, Result, Table, Type, TypeRef, ValType,
};
#[derive(PartialEq, Eq, Clone, Copy)]
@@ -58,7 +57,7 @@ pub struct Module<'a> {
type_section: Vec<Type>,
import_section: Vec<Import<'a>>,
func_section: Vec<u32>,
table_section: Vec<TableType>,
table_section: Vec<Table<'a>>,
memory_section: Vec<MemoryType>,
global_section: Vec<Global<'a>>,
export_section: Vec<Export<'a>>,
@@ -173,7 +172,7 @@ impl<'a> Module<'a> {
}
#[must_use]
pub fn table_section(&self) -> &[TableType] {
pub fn table_section(&self) -> &[Table] {
&self.table_section
}
@@ -256,7 +255,9 @@ impl<'a> TypeInfo<'a> {
}
pub(crate) fn by_type_index(&self, index: usize) -> (usize, usize) {
let Type::Func(ty) = &self.type_list[index];
let Type::Func(ty) = &self.type_list[index] else {
unreachable!("type at func index must be a func type");
};
(ty.params().len(), ty.results().len())
}