mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-06-21 22:01:01 +00:00
@@ -30,20 +30,20 @@ impl EVMLA {
|
||||
}
|
||||
}
|
||||
|
||||
impl<D> revive_llvm_context::EraVMWriteLLVM<D> for EVMLA
|
||||
impl<D> revive_llvm_context::PolkaVMWriteLLVM<D> for EVMLA
|
||||
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<()> {
|
||||
self.assembly.declare(context)
|
||||
}
|
||||
|
||||
fn into_llvm(
|
||||
self,
|
||||
context: &mut revive_llvm_context::EraVMContext<D>,
|
||||
context: &mut revive_llvm_context::PolkaVMContext<D>,
|
||||
) -> anyhow::Result<()> {
|
||||
self.assembly.into_llvm(context)
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ pub enum IR {
|
||||
EVMLA(EVMLA),
|
||||
/// The LLVM IR source code.
|
||||
LLVMIR(LLVMIR),
|
||||
/// The EraVM assembly source code.
|
||||
/// The PolkaVM assembly source code.
|
||||
ZKASM(ZKASM),
|
||||
}
|
||||
|
||||
@@ -67,13 +67,13 @@ impl IR {
|
||||
}
|
||||
}
|
||||
|
||||
impl<D> revive_llvm_context::EraVMWriteLLVM<D> for IR
|
||||
impl<D> revive_llvm_context::PolkaVMWriteLLVM<D> for IR
|
||||
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<()> {
|
||||
match self {
|
||||
Self::Yul(inner) => inner.declare(context),
|
||||
@@ -85,7 +85,7 @@ where
|
||||
|
||||
fn into_llvm(
|
||||
self,
|
||||
context: &mut revive_llvm_context::EraVMContext<D>,
|
||||
context: &mut revive_llvm_context::PolkaVMContext<D>,
|
||||
) -> anyhow::Result<()> {
|
||||
match self {
|
||||
Self::Yul(inner) => inner.into_llvm(context),
|
||||
|
||||
@@ -31,20 +31,20 @@ impl Yul {
|
||||
}
|
||||
}
|
||||
|
||||
impl<D> revive_llvm_context::EraVMWriteLLVM<D> for Yul
|
||||
impl<D> revive_llvm_context::PolkaVMWriteLLVM<D> for Yul
|
||||
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<()> {
|
||||
self.object.declare(context)
|
||||
}
|
||||
|
||||
fn into_llvm(
|
||||
self,
|
||||
context: &mut revive_llvm_context::EraVMContext<D>,
|
||||
context: &mut revive_llvm_context::PolkaVMContext<D>,
|
||||
) -> anyhow::Result<()> {
|
||||
self.object.into_llvm(context)
|
||||
}
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
//! The contract EraVM assembly source code.
|
||||
//! The contract PolkaVM assembly source code.
|
||||
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
/// The contract EraVM assembly source code.
|
||||
/// The contract PolkaVM assembly source code.
|
||||
#[derive(Debug, Serialize, Deserialize, Clone)]
|
||||
#[allow(clippy::upper_case_acronyms)]
|
||||
pub struct ZKASM {
|
||||
/// The EraVM assembly file path.
|
||||
/// The PolkaVM assembly file path.
|
||||
pub path: String,
|
||||
/// The EraVM assembly source code.
|
||||
/// The PolkaVM assembly source code.
|
||||
pub source: String,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user