(table: wasmparser::Table<'_>)
| 95 | } |
| 96 | |
| 97 | pub(crate) fn convert_module_table(table: wasmparser::Table<'_>) -> Result<TableType> { |
| 98 | let size_initial = table.ty.initial.try_into().map_err(|_| { |
| 99 | crate::ParseError::UnsupportedOperator(format!("Table size initial is too large: {}", table.ty.initial)) |
| 100 | })?; |
| 101 | |
| 102 | let size_max = table.ty.maximum.map(|max| max.try_into()).transpose(); |
| 103 | let size_max = |
| 104 | size_max.map_err(|e| crate::ParseError::UnsupportedOperator(format!("Table size max is too large: {e}")))?; |
| 105 | Ok(TableType { element_type: convert_reftype(table.ty.element_type)?, size_initial, size_max }) |
| 106 | } |
| 107 | |
| 108 | pub(crate) fn convert_module_globals( |
| 109 | globals: wasmparser::SectionLimited<'_, wasmparser::Global<'_>>, |
no test coverage detected