rename target to polkavm

Signed-off-by: xermicus <cyrill@parity.io>
This commit is contained in:
xermicus
2024-05-02 08:47:44 +02:00
parent 9fc24af355
commit 336fc63f1d
112 changed files with 876 additions and 873 deletions
@@ -175,35 +175,35 @@ impl Object {
}
}
impl<D> revive_llvm_context::EraVMWriteLLVM<D> for Object
impl<D> revive_llvm_context::PolkaVMWriteLLVM<D> for Object
where
D: revive_llvm_context::EraVMDependency + Clone,
D: revive_llvm_context::PolkaVMDependency + Clone,
{
fn declare(
&mut self,
context: &mut revive_llvm_context::EraVMContext<D>,
context: &mut revive_llvm_context::PolkaVMContext<D>,
) -> anyhow::Result<()> {
let mut entry = revive_llvm_context::EraVMEntryFunction::default();
let mut entry = revive_llvm_context::PolkaVMEntryFunction::default();
entry.declare(context)?;
let mut runtime = revive_llvm_context::EraVMRuntime::new(
revive_llvm_context::EraVMAddressSpace::Heap,
let mut runtime = revive_llvm_context::PolkaVMRuntime::new(
revive_llvm_context::PolkaVMAddressSpace::Heap,
);
runtime.declare(context)?;
revive_llvm_context::EraVMDeployCodeFunction::new(
revive_llvm_context::EraVMDummyLLVMWritable::default(),
revive_llvm_context::PolkaVMDeployCodeFunction::new(
revive_llvm_context::PolkaVMDummyLLVMWritable::default(),
)
.declare(context)?;
revive_llvm_context::EraVMRuntimeCodeFunction::new(
revive_llvm_context::EraVMDummyLLVMWritable::default(),
revive_llvm_context::PolkaVMRuntimeCodeFunction::new(
revive_llvm_context::PolkaVMDummyLLVMWritable::default(),
)
.declare(context)?;
for name in [
revive_llvm_context::EraVMRuntime::FUNCTION_DEPLOY_CODE,
revive_llvm_context::EraVMRuntime::FUNCTION_RUNTIME_CODE,
revive_llvm_context::EraVMRuntime::FUNCTION_ENTRY,
revive_llvm_context::PolkaVMRuntime::FUNCTION_DEPLOY_CODE,
revive_llvm_context::PolkaVMRuntime::FUNCTION_RUNTIME_CODE,
revive_llvm_context::PolkaVMRuntime::FUNCTION_ENTRY,
]
.into_iter()
{
@@ -211,7 +211,7 @@ where
.get_function(name)
.expect("Always exists")
.borrow_mut()
.set_yul_data(revive_llvm_context::EraVMFunctionYulData::default());
.set_yul_data(revive_llvm_context::PolkaVMFunctionYulData::default());
}
entry.into_llvm(context)?;
@@ -221,13 +221,13 @@ where
fn into_llvm(
self,
context: &mut revive_llvm_context::EraVMContext<D>,
context: &mut revive_llvm_context::PolkaVMContext<D>,
) -> anyhow::Result<()> {
if self.identifier.ends_with("_deployed") {
revive_llvm_context::EraVMRuntimeCodeFunction::new(self.code)
revive_llvm_context::PolkaVMRuntimeCodeFunction::new(self.code)
.into_llvm(context)?;
} else {
revive_llvm_context::EraVMDeployCodeFunction::new(self.code)
revive_llvm_context::PolkaVMDeployCodeFunction::new(self.code)
.into_llvm(context)?;
}
@@ -236,8 +236,8 @@ where
object.into_llvm(context)?;
}
None => {
let runtime = revive_llvm_context::EraVMRuntime::new(
revive_llvm_context::EraVMAddressSpace::Heap,
let runtime = revive_llvm_context::PolkaVMRuntime::new(
revive_llvm_context::PolkaVMAddressSpace::Heap,
);
runtime.into_llvm(context)?;
}