Skip to content

Commit

Permalink
chore: update wasmparser to v0.118.1
Browse files Browse the repository at this point in the history
  • Loading branch information
greenhat committed Jan 2, 2024
1 parent 5cedd08 commit 26a9f7b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 24 deletions.
12 changes: 1 addition & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend-wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ thiserror.workspace = true
smallvec.workspace = true
log.workspace = true
anyhow.workspace = true
wasmparser = "0.107"
wasmparser = "0.118.1"
derive_more = "0.99"

[dev-dependencies]
Expand Down
17 changes: 5 additions & 12 deletions frontend-wasm/src/module/sections_translator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,18 @@ use miden_diagnostics::DiagnosticsHandler;
use wasmparser::{
Data, DataKind, DataSectionReader, ElementSectionReader, FunctionSectionReader,
GlobalSectionReader, ImportSectionReader, MemorySectionReader, NameSectionReader, Naming,
Operator, Type, TypeRef, TypeSectionReader,
Operator, TypeRef, TypeSectionReader,
};

/// Parses the Type section of the wasm module.
pub fn parse_type_section<'a>(
types: TypeSectionReader<'a>,
environ: &mut ModuleEnvironment<'a>,
diagnostics: &DiagnosticsHandler,
_diagnostics: &DiagnosticsHandler,
) -> WasmResult<()> {
for entry in types {
match entry? {
Type::Func(wasm_func_ty) => {
let ty = convert_func_type(&wasm_func_ty)?;
environ.declare_type_func(ty);
}
Type::Array(_) => {
unsupported_diag!(diagnostics, "Array types are not supported");
}
}
for wasm_func_ty in types.into_iter_err_on_gc_types() {
let ty = convert_func_type(&wasm_func_ty?)?;
environ.declare_type_func(ty);
}
Ok(())
}
Expand Down

0 comments on commit 26a9f7b

Please sign in to comment.