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
@@ -6,17 +6,17 @@
/// Translates the unconditional jump.
///
pub fn unconditional<D>(
context: &mut era_compiler_llvm_context::EraVMContext<D>,
context: &mut revive_llvm_context::EraVMContext<D>,
destination: num::BigUint,
stack_hash: md5::Digest,
) -> anyhow::Result<()>
where
D: era_compiler_llvm_context::EraVMDependency + Clone,
D: revive_llvm_context::EraVMDependency + Clone,
{
let code_type = context
.code_type()
.ok_or_else(|| anyhow::anyhow!("The contract code part type is undefined"))?;
let block_key = era_compiler_llvm_context::EraVMFunctionBlockKey::new(code_type, destination);
let block_key = revive_llvm_context::EraVMFunctionBlockKey::new(code_type, destination);
let block = context
.current_function()
@@ -32,24 +32,24 @@ where
/// Translates the conditional jump.
///
pub fn conditional<D>(
context: &mut era_compiler_llvm_context::EraVMContext<D>,
context: &mut revive_llvm_context::EraVMContext<D>,
destination: num::BigUint,
stack_hash: md5::Digest,
stack_height: usize,
) -> anyhow::Result<()>
where
D: era_compiler_llvm_context::EraVMDependency + Clone,
D: revive_llvm_context::EraVMDependency + Clone,
{
let code_type = context
.code_type()
.ok_or_else(|| anyhow::anyhow!("The contract code part type is undefined"))?;
let block_key = era_compiler_llvm_context::EraVMFunctionBlockKey::new(code_type, destination);
let block_key = revive_llvm_context::EraVMFunctionBlockKey::new(code_type, destination);
let condition_pointer = context.evmla().stack[stack_height]
.to_llvm()
.into_pointer_value();
let condition = context.build_load(
era_compiler_llvm_context::EraVMPointer::new_stack_field(context, condition_pointer),
revive_llvm_context::EraVMPointer::new_stack_field(context, condition_pointer),
format!("conditional_{block_key}_condition").as_str(),
)?;
let condition = context.builder().build_int_compare(