Update wasmparser for exception handling (#2431)

This commit is contained in:
Yury Delendik
2020-11-19 14:08:10 -06:00
committed by GitHub
parent 72811d35ae
commit e34b410381
16 changed files with 131 additions and 41 deletions

View File

@@ -2,9 +2,9 @@
//! to deal with each part of it.
use crate::environ::{ModuleEnvironment, WasmResult};
use crate::sections_translator::{
parse_data_section, parse_element_section, parse_export_section, parse_function_section,
parse_global_section, parse_import_section, parse_memory_section, parse_name_section,
parse_start_section, parse_table_section, parse_type_section,
parse_data_section, parse_element_section, parse_event_section, parse_export_section,
parse_function_section, parse_global_section, parse_import_section, parse_memory_section,
parse_name_section, parse_start_section, parse_table_section, parse_type_section,
};
use crate::state::ModuleTranslationState;
use cranelift_codegen::timing;
@@ -65,6 +65,11 @@ pub fn translate_module<'data>(
parse_memory_section(memories, environ)?;
}
Payload::EventSection(events) => {
validator.event_section(&events)?;
parse_event_section(events, environ)?;
}
Payload::GlobalSection(globals) => {
validator.global_section(&globals)?;
parse_global_section(globals, environ)?;