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:
Alex Crichton
2020-03-02 08:55:25 -06:00
committed by GitHub
parent 2c5be49af0
commit 8597930eed
10 changed files with 37 additions and 42 deletions

View File

@@ -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)?;
}
}