rename llvm-context crate

Signed-off-by: xermicus <cyrill@parity.io>
This commit is contained in:
xermicus
2024-05-01 15:45:09 +02:00
parent 9b341853b4
commit 72515254fe
55 changed files with 529 additions and 529 deletions
+9 -9
View File
@@ -37,7 +37,7 @@ pub struct EtherealIR {
/// The all-inlined function.
pub entry_function: Function,
/// The recursive functions.
pub recursive_functions: BTreeMap<era_compiler_llvm_context::EraVMFunctionBlockKey, Function>,
pub recursive_functions: BTreeMap<revive_llvm_context::EraVMFunctionBlockKey, Function>,
}
impl EtherealIR {
@@ -53,7 +53,7 @@ impl EtherealIR {
pub fn new(
solc_version: semver::Version,
extra_metadata: ExtraMetadata,
blocks: HashMap<era_compiler_llvm_context::EraVMFunctionBlockKey, Block>,
blocks: HashMap<revive_llvm_context::EraVMFunctionBlockKey, Block>,
) -> anyhow::Result<Self> {
let mut entry_function = Function::new(solc_version.clone(), FunctionType::new_initial());
let mut recursive_functions = BTreeMap::new();
@@ -78,9 +78,9 @@ impl EtherealIR {
///
pub fn get_blocks(
solc_version: semver::Version,
code_type: era_compiler_llvm_context::EraVMCodeType,
code_type: revive_llvm_context::EraVMCodeType,
instructions: &[Instruction],
) -> anyhow::Result<HashMap<era_compiler_llvm_context::EraVMFunctionBlockKey, Block>> {
) -> anyhow::Result<HashMap<revive_llvm_context::EraVMFunctionBlockKey, Block>> {
let mut blocks = HashMap::with_capacity(Self::BLOCKS_HASHMAP_DEFAULT_CAPACITY);
let mut offset = 0;
@@ -91,7 +91,7 @@ impl EtherealIR {
&instructions[offset..],
)?;
blocks.insert(
era_compiler_llvm_context::EraVMFunctionBlockKey::new(
revive_llvm_context::EraVMFunctionBlockKey::new(
code_type,
block.key.tag.clone(),
),
@@ -104,13 +104,13 @@ impl EtherealIR {
}
}
impl<D> era_compiler_llvm_context::EraVMWriteLLVM<D> for EtherealIR
impl<D> revive_llvm_context::EraVMWriteLLVM<D> for EtherealIR
where
D: era_compiler_llvm_context::EraVMDependency + Clone,
D: revive_llvm_context::EraVMDependency + Clone,
{
fn declare(
&mut self,
context: &mut era_compiler_llvm_context::EraVMContext<D>,
context: &mut revive_llvm_context::EraVMContext<D>,
) -> anyhow::Result<()> {
self.entry_function.declare(context)?;
@@ -123,7 +123,7 @@ where
fn into_llvm(
self,
context: &mut era_compiler_llvm_context::EraVMContext<D>,
context: &mut revive_llvm_context::EraVMContext<D>,
) -> anyhow::Result<()> {
context.evmla_mut().stack = vec![];