Combine VisibleTranslationState and TranslationState (#1076)

`VisibleTranslationState` was a wrapper around a `TranslationState` that was
meant to public API consumers outside of this crate. However, the internal
`TranslationState` and all its methods were still publicly exposed! This commit
simplifies and remedies the situation by combining them into a single
`TranslationState` type. Most of its methods are only `pub(crate)` now, not
visible to the entire world. The only methods that are `pub` are the ones that
`VisibleTranslationState` exposed.
This commit is contained in:
Nick Fitzgerald
2019-09-25 12:07:54 -07:00
committed by Sean Stangl
parent 46ab1b4103
commit 8c3072c774
4 changed files with 42 additions and 50 deletions

View File

@@ -62,7 +62,7 @@ pub use crate::environ::{
};
pub use crate::func_translator::FuncTranslator;
pub use crate::module_translator::translate_module;
pub use crate::state::VisibleTranslationState;
pub use crate::state::TranslationState;
pub use crate::translation_utils::{
get_vmctx_value_label, DefinedFuncIndex, DefinedGlobalIndex, DefinedMemoryIndex,
DefinedTableIndex, FuncIndex, Global, GlobalIndex, GlobalInit, Memory, MemoryIndex,