Transform ranges and simple expressions (#63)

This commit is contained in:
Yury Delendik
2019-08-08 22:44:45 -05:00
committed by Dan Gohman
parent 36b4ff8031
commit 4f04d7d873
20 changed files with 2701 additions and 867 deletions

View File

@@ -1,4 +1,4 @@
use crate::address_map::ModuleAddressMap;
use crate::address_map::{ModuleAddressMap, ValueLabelsRanges};
use crate::compilation::{CodeAndJTOffsets, Compilation, Relocations};
use crate::module::Module;
use crate::module_environ::FunctionBodyData;
@@ -102,9 +102,17 @@ pub struct ModuleCacheData {
compilation: Compilation,
relocations: Relocations,
address_transforms: ModuleAddressMap,
value_ranges: ValueLabelsRanges,
stack_slots: PrimaryMap<DefinedFuncIndex, ir::StackSlots>,
}
type ModuleCacheDataTupleType = (Compilation, Relocations, ModuleAddressMap);
type ModuleCacheDataTupleType = (
Compilation,
Relocations,
ModuleAddressMap,
ValueLabelsRanges,
PrimaryMap<DefinedFuncIndex, ir::StackSlots>,
);
struct Sha256Hasher(Sha256);
@@ -225,11 +233,19 @@ impl ModuleCacheData {
compilation: data.0,
relocations: data.1,
address_transforms: data.2,
value_ranges: data.3,
stack_slots: data.4,
}
}
pub fn to_tuple(self) -> ModuleCacheDataTupleType {
(self.compilation, self.relocations, self.address_transforms)
(
self.compilation,
self.relocations,
self.address_transforms,
self.value_ranges,
self.stack_slots,
)
}
}