Instantiate nested modules for module linking (#2447)
This commit implements the interpretation necessary of the instance section of the module linking proposal. Instantiating a module which itself has nested instantiated instances will now instantiate the nested instances properly. This isn't all that useful without the ability to alias exports off the result, but we can at least observe the side effects of instantiation through the `start` function. cc #2094
This commit is contained in:
@@ -3,8 +3,9 @@
|
||||
use crate::environ::{ModuleEnvironment, WasmResult};
|
||||
use crate::sections_translator::{
|
||||
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,
|
||||
parse_function_section, parse_global_section, parse_import_section, parse_instance_section,
|
||||
parse_memory_section, parse_name_section, parse_start_section, parse_table_section,
|
||||
parse_type_section,
|
||||
};
|
||||
use crate::state::ModuleTranslationState;
|
||||
use cranelift_codegen::timing;
|
||||
@@ -116,7 +117,7 @@ pub fn translate_module<'data>(
|
||||
}
|
||||
Payload::InstanceSection(s) => {
|
||||
validator.instance_section(&s)?;
|
||||
unimplemented!("module linking not implemented yet")
|
||||
parse_instance_section(s, environ)?;
|
||||
}
|
||||
Payload::AliasSection(s) => {
|
||||
validator.alias_section(&s)?;
|
||||
|
||||
Reference in New Issue
Block a user