diff options
Diffstat (limited to 'crates/parser')
| -rw-r--r-- | crates/parser/src/conversion.rs | 1 | ||||
| -rw-r--r-- | crates/parser/src/module.rs | 8 |
2 files changed, 7 insertions, 2 deletions
diff --git a/crates/parser/src/conversion.rs b/crates/parser/src/conversion.rs index 79069e1..7c10d62 100644 --- a/crates/parser/src/conversion.rs +++ b/crates/parser/src/conversion.rs @@ -107,7 +107,6 @@ pub(crate) fn convert_module_tables<T: IntoIterator<Item = wasmparser::Result<wa table_types: T, ) -> Result<Vec<TableType>> { let table_type = table_types.into_iter().map(|table| convert_module_table(table?)).collect::<Result<Vec<_>>>()?; - Ok(table_type) } diff --git a/crates/parser/src/module.rs b/crates/parser/src/module.rs index 5bc6a7e..f5c01ac 100644 --- a/crates/parser/src/module.rs +++ b/crates/parser/src/module.rs @@ -112,7 +112,6 @@ impl ModuleReader { if !self.table_types.is_empty() { return Err(ParseError::DuplicateSection("Table section".into())); } - debug!("Found table section"); validator.table_section(&reader)?; self.table_types = conversion::convert_module_tables(reader)?; @@ -140,6 +139,13 @@ impl ModuleReader { validator.data_section(&reader)?; self.data = conversion::convert_module_data_sections(reader)?; } + DataCountSection { count, range } => { + debug!("Found data count section"); + if !self.data.is_empty() { + return Err(ParseError::DuplicateSection("Data count section".into())); + } + validator.data_count_section(count, &range)?; + } CodeSectionStart { count, range, .. } => { debug!("Found code section ({} functions)", count); if !self.code.is_empty() { |
