mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-06-15 05:41:08 +00:00
@@ -3,7 +3,6 @@
|
||||
pub mod evmla;
|
||||
pub mod llvm_ir;
|
||||
pub mod yul;
|
||||
pub mod zkasm;
|
||||
|
||||
use std::collections::HashSet;
|
||||
|
||||
@@ -17,7 +16,6 @@ use crate::yul::parser::statement::object::Object;
|
||||
use self::evmla::EVMLA;
|
||||
use self::llvm_ir::LLVMIR;
|
||||
use self::yul::Yul;
|
||||
use self::zkasm::ZKASM;
|
||||
|
||||
/// The contract source code.
|
||||
#[derive(Debug, Serialize, Deserialize, Clone)]
|
||||
@@ -31,8 +29,6 @@ pub enum IR {
|
||||
EVMLA(EVMLA),
|
||||
/// The LLVM IR source code.
|
||||
LLVMIR(LLVMIR),
|
||||
/// The PolkaVM assembly source code.
|
||||
ZKASM(ZKASM),
|
||||
}
|
||||
|
||||
impl IR {
|
||||
@@ -51,18 +47,12 @@ impl IR {
|
||||
Self::LLVMIR(LLVMIR::new(path, source))
|
||||
}
|
||||
|
||||
/// A shortcut constructor.
|
||||
pub fn new_zkasm(path: String, source: String) -> Self {
|
||||
Self::ZKASM(ZKASM::new(path, source))
|
||||
}
|
||||
|
||||
/// Get the list of missing deployable libraries.
|
||||
pub fn get_missing_libraries(&self) -> HashSet<String> {
|
||||
match self {
|
||||
Self::Yul(inner) => inner.get_missing_libraries(),
|
||||
Self::EVMLA(inner) => inner.get_missing_libraries(),
|
||||
Self::LLVMIR(_inner) => HashSet::new(),
|
||||
Self::ZKASM(_inner) => HashSet::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -79,7 +69,6 @@ where
|
||||
Self::Yul(inner) => inner.declare(context),
|
||||
Self::EVMLA(inner) => inner.declare(context),
|
||||
Self::LLVMIR(_inner) => Ok(()),
|
||||
Self::ZKASM(_inner) => Ok(()),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,7 +77,6 @@ where
|
||||
Self::Yul(inner) => inner.into_llvm(context),
|
||||
Self::EVMLA(inner) => inner.into_llvm(context),
|
||||
Self::LLVMIR(_inner) => Ok(()),
|
||||
Self::ZKASM(_inner) => Ok(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user