Skip to content

Commit c00031a

Browse files
chore: update deps
Signed-off-by: Henry Gressmann <mail@henrygressmann.de>
1 parent a3ca2af commit c00031a

File tree

12 files changed

+67
-59
lines changed

12 files changed

+67
-59
lines changed

Cargo.lock

Lines changed: 49 additions & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ default-members=[".", "crates/tinywasm", "crates/types", "crates/parser"]
44
resolver="2"
55

66
[workspace.dependencies]
7-
wast="217"
8-
wat="1.217"
7+
wast="218"
8+
wat="1.218"
99
eyre="0.6"
1010
log="0.4"
1111
pretty_env_logger="0.5"

crates/parser/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ repository.workspace=true
99
rust-version.workspace=true
1010

1111
[dependencies]
12-
wasmparser={version="0.217", default-features=false, features=["validate", "features"]}
12+
wasmparser={version="0.218", default-features=false, features=["validate", "features"]}
1313
log={workspace=true, optional=true}
1414
tinywasm-types={version="0.8.0-alpha.0", path="../types", default-features=false}
1515

crates/parser/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ impl Parser {
6666
custom_page_sizes: true,
6767

6868
gc_types: true,
69+
stack_switching: false,
6970
component_model: false,
7071
component_model_nested_names: false,
7172
component_model_values: false,

crates/parser/src/visit.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use wasmparser::{FuncValidator, FuncValidatorAllocations, FunctionBody, VisitOpe
88

99
struct ValidateThenVisit<'a, R: WasmModuleResources>(usize, &'a mut FunctionBuilder<R>);
1010
macro_rules! validate_then_visit {
11-
($( @$proposal:ident $op:ident $({ $($arg:ident: $argty:ty),* })? => $visit:ident)*) => {$(
11+
($( @$proposal:ident $op:ident $({ $($arg:ident: $argty:ty),* })? => $visit:ident ($($ann:tt)*))*) => {$(
1212
fn $visit(&mut self $($(,$arg: $argty)*)?) -> Self::Output {
1313
self.1.$visit($($($arg.clone()),*)?);
1414
self.1.validator_visitor(self.0).$visit($($($arg),*)?)?;
@@ -118,8 +118,8 @@ impl<R: WasmModuleResources> FunctionBuilder<R> {
118118
}
119119

120120
macro_rules! impl_visit_operator {
121-
($(@$proposal:ident $op:ident $({ $($arg:ident: $argty:ty),* })? => $visit:ident)*) => {
122-
$(impl_visit_operator!(@@$proposal $op $({ $($arg: $argty),* })? => $visit);)*
121+
($(@$proposal:ident $op:ident $({ $($arg:ident: $argty:ty),* })? => $visit:ident ($($ann:tt)*))*) => {
122+
$(impl_visit_operator!(@@$proposal $op $({ $($arg: $argty),* })? => $visit ($($ann:tt)*));)*
123123
};
124124

125125
(@@mvp $($rest:tt)* ) => {};
@@ -129,15 +129,15 @@ macro_rules! impl_visit_operator {
129129
(@@bulk_memory $($rest:tt)* ) => {};
130130
(@@tail_call $($rest:tt)* ) => {};
131131
// (@@simd $($rest:tt)* ) => {};
132-
(@@$proposal:ident $op:ident $({ $($arg:ident: $argty:ty),* })? => $visit:ident) => {
132+
(@@$proposal:ident $op:ident $({ $($arg:ident: $argty:ty),* })? => $visit:ident ($($ann:tt)*)) => {
133133
#[cold]
134134
fn $visit(&mut self $($(,$arg: $argty)*)?) {
135135
self.unsupported(stringify!($visit))
136136
}
137137
};
138138
}
139139

140-
impl<'a, R: WasmModuleResources> wasmparser::VisitOperator<'a> for FunctionBuilder<R> {
140+
impl<R: WasmModuleResources> wasmparser::VisitOperator<'_> for FunctionBuilder<R> {
141141
type Output = ();
142142
wasmparser::for_each_operator!(impl_visit_operator);
143143

crates/tinywasm/src/interpreter/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
pub(crate) mod executor;
22
pub(crate) mod num_helpers;
3+
// pub(crate) mod simd;
34
pub(crate) mod stack;
45
mod values;
56

crates/tinywasm/src/reference.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ pub struct MemoryRef<'a>(pub(crate) &'a MemoryInstance);
1616
#[derive(Debug)]
1717
pub struct MemoryRefMut<'a>(pub(crate) &'a mut MemoryInstance);
1818

19-
impl<'a> MemoryRefLoad for MemoryRef<'a> {
19+
impl MemoryRefLoad for MemoryRef<'_> {
2020
/// Load a slice of memory
2121
fn load(&self, offset: usize, len: usize) -> Result<&[u8]> {
2222
self.0.load(offset, len)
2323
}
2424
}
2525

26-
impl<'a> MemoryRefLoad for MemoryRefMut<'a> {
26+
impl MemoryRefLoad for MemoryRefMut<'_> {
2727
/// Load a slice of memory
2828
fn load(&self, offset: usize, len: usize) -> Result<&[u8]> {
2929
self.0.load(offset, len)

crates/tinywasm/src/store/table.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ impl TableInstance {
4949

5050
pub(crate) fn get(&self, addr: TableAddr) -> Result<&TableElement> {
5151
// self.elements.get(addr as usize).ok_or_else(|| Error::Trap(Trap::UndefinedElement { index: addr as usize }))
52-
self.elements.get(addr as usize).ok_or_else(|| {
52+
self.elements.get(addr as usize).ok_or({
5353
Error::Trap(Trap::TableOutOfBounds { offset: addr as usize, len: 1, max: self.elements.len() })
5454
})
5555
}
@@ -135,7 +135,7 @@ impl TableInstance {
135135

136136
pub(crate) fn init(&mut self, offset: i32, init: &[TableElement]) -> Result<()> {
137137
let offset = offset as usize;
138-
let end = offset.checked_add(init.len()).ok_or_else(|| {
138+
let end = offset.checked_add(init.len()).ok_or({
139139
Error::Trap(crate::Trap::TableOutOfBounds { offset, len: init.len(), max: self.elements.len() })
140140
})?;
141141

0 commit comments

Comments
 (0)