Rename parse_elements_section.

In WebAssembly documentation, it's the "element" section.
This commit is contained in:
Dan Gohman
2018-10-18 22:44:51 -07:00
parent 54ab1ea533
commit 8cd1b87917
2 changed files with 4 additions and 4 deletions

View File

@@ -3,7 +3,7 @@
use cranelift_codegen::timing; use cranelift_codegen::timing;
use environ::{ModuleEnvironment, WasmError, WasmResult}; use environ::{ModuleEnvironment, WasmError, WasmResult};
use sections_translator::{ use sections_translator::{
parse_code_section, parse_data_section, parse_elements_section, parse_export_section, parse_code_section, parse_data_section, parse_element_section, parse_export_section,
parse_function_section, parse_function_signatures, parse_global_section, parse_import_section, parse_function_section, parse_function_signatures, parse_global_section, parse_import_section,
parse_memory_section, parse_start_section, parse_table_section, parse_memory_section, parse_start_section, parse_table_section,
}; };
@@ -88,7 +88,7 @@ pub fn translate_module<'data>(
code: SectionCode::Element, code: SectionCode::Element,
.. ..
} => { } => {
parse_elements_section(&mut parser, environ)?; parse_element_section(&mut parser, environ)?;
next_input = ParserInput::Default; next_input = ParserInput::Default;
} }
ParserState::BeginSection { ParserState::BeginSection {

View File

@@ -360,8 +360,8 @@ pub fn parse_table_section(parser: &mut Parser, environ: &mut ModuleEnvironment)
Ok(()) Ok(())
} }
/// Retrieves the tables from the table section /// Retrieves the elements from the element section
pub fn parse_elements_section( pub fn parse_element_section(
parser: &mut Parser, parser: &mut Parser,
environ: &mut ModuleEnvironment, environ: &mut ModuleEnvironment,
) -> WasmResult<()> { ) -> WasmResult<()> {