rename PassiveElemIndex to ElemIndex and same for PassiveDataIndex (#1188)
* rename PassiveElemIndex to ElemIndex and same for PassiveDataIndex (#1411) * rename PassiveDataIndex to DataIndex * rename PassiveElemIndex to ElemIndex * Apply renamings to wasmtime as well * Run rustfmt Co-authored-by: csmoe <csmoe@msn.com>
This commit is contained in:
@@ -10,9 +10,8 @@
|
||||
use crate::environ::{ModuleEnvironment, WasmError, WasmResult};
|
||||
use crate::state::ModuleTranslationState;
|
||||
use crate::translation_utils::{
|
||||
tabletype_to_type, type_to_type, FuncIndex, Global, GlobalIndex, GlobalInit, Memory,
|
||||
MemoryIndex, PassiveDataIndex, PassiveElemIndex, SignatureIndex, Table, TableElementType,
|
||||
TableIndex,
|
||||
tabletype_to_type, type_to_type, DataIndex, ElemIndex, FuncIndex, Global, GlobalIndex,
|
||||
GlobalInit, Memory, MemoryIndex, SignatureIndex, Table, TableElementType, TableIndex,
|
||||
};
|
||||
use crate::{wasm_unsupported, HashMap};
|
||||
use core::convert::TryFrom;
|
||||
@@ -345,7 +344,7 @@ pub fn parse_element_section<'data>(
|
||||
)?
|
||||
}
|
||||
ElementKind::Passive => {
|
||||
let index = PassiveElemIndex::from_u32(index as u32);
|
||||
let index = ElemIndex::from_u32(index as u32);
|
||||
environ.declare_passive_element(index, segments)?;
|
||||
}
|
||||
ElementKind::Declared => return Err(wasm_unsupported!("element kind declared")),
|
||||
@@ -404,7 +403,7 @@ pub fn parse_data_section<'data>(
|
||||
)?;
|
||||
}
|
||||
DataKind::Passive => {
|
||||
let index = PassiveDataIndex::from_u32(index as u32);
|
||||
let index = DataIndex::from_u32(index as u32);
|
||||
environ.declare_passive_data(index, data)?;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user