remove the zkasm format

Signed-off-by: xermicus <cyrill@parity.io>
This commit is contained in:
xermicus
2024-05-08 10:48:01 +02:00
parent 169740eb5e
commit b55669f5c5
15 changed files with 28 additions and 215 deletions
@@ -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(()),
}
}
}