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
+12 -12
View File
@@ -11,7 +11,7 @@ use serde::Deserialize;
use serde::Serialize;
use sha3::Digest;
use era_compiler_llvm_context::EraVMWriteLLVM;
use revive_llvm_context::EraVMWriteLLVM;
use crate::build::contract::Contract as ContractBuild;
use crate::project::Project;
@@ -91,13 +91,13 @@ impl Contract {
pub fn compile(
mut self,
project: Project,
optimizer_settings: era_compiler_llvm_context::OptimizerSettings,
optimizer_settings: revive_llvm_context::OptimizerSettings,
is_system_mode: bool,
include_metadata_hash: bool,
debug_config: Option<era_compiler_llvm_context::DebugConfig>,
debug_config: Option<revive_llvm_context::DebugConfig>,
) -> anyhow::Result<ContractBuild> {
let llvm = inkwell::context::Context::create();
let optimizer = era_compiler_llvm_context::Optimizer::new(optimizer_settings);
let optimizer = revive_llvm_context::Optimizer::new(optimizer_settings);
let version = project.version.clone();
let identifier = self.identifier().to_owned();
@@ -129,7 +129,7 @@ impl Contract {
.map_err(|error| anyhow::anyhow!(error.to_string()))?
}
IR::ZKASM(ref zkasm) => {
let build = era_compiler_llvm_context::eravm_build_assembly_text(
let build = revive_llvm_context::eravm_build_assembly_text(
self.path.as_str(),
zkasm.source.as_str(),
metadata_hash,
@@ -145,7 +145,7 @@ impl Contract {
}
_ => llvm.create_module(self.path.as_str()),
};
let mut context = era_compiler_llvm_context::EraVMContext::new(
let mut context = revive_llvm_context::EraVMContext::new(
&llvm,
module,
optimizer,
@@ -153,15 +153,15 @@ impl Contract {
include_metadata_hash,
debug_config,
);
context.set_solidity_data(era_compiler_llvm_context::EraVMContextSolidityData::default());
context.set_solidity_data(revive_llvm_context::EraVMContextSolidityData::default());
match self.ir {
IR::Yul(_) => {
let yul_data = era_compiler_llvm_context::EraVMContextYulData::new(is_system_mode);
let yul_data = revive_llvm_context::EraVMContextYulData::new(is_system_mode);
context.set_yul_data(yul_data);
}
IR::EVMLA(_) => {
let evmla_data =
era_compiler_llvm_context::EraVMContextEVMLAData::new(version.default);
revive_llvm_context::EraVMContextEVMLAData::new(version.default);
context.set_evmla_data(evmla_data);
}
IR::LLVMIR(_) => {}
@@ -206,18 +206,18 @@ impl Contract {
impl<D> EraVMWriteLLVM<D> for Contract
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.ir.declare(context)
}
fn into_llvm(
self,
context: &mut era_compiler_llvm_context::EraVMContext<D>,
context: &mut revive_llvm_context::EraVMContext<D>,
) -> anyhow::Result<()> {
self.ir.into_llvm(context)
}