mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-06-15 06:51:07 +00:00
implement immutable variables codegen (#70)
This commit is contained in:
@@ -183,6 +183,7 @@ where
|
||||
&mut self,
|
||||
context: &mut revive_llvm_context::PolkaVMContext<D>,
|
||||
) -> anyhow::Result<()> {
|
||||
revive_llvm_context::PolkaVMImmutableDataLoadFunction.declare(context)?;
|
||||
let mut entry = revive_llvm_context::PolkaVMEntryFunction::default();
|
||||
entry.declare(context)?;
|
||||
|
||||
@@ -199,6 +200,7 @@ where
|
||||
revive_llvm_context::PolkaVMFunctionDeployCode,
|
||||
revive_llvm_context::PolkaVMFunctionRuntimeCode,
|
||||
revive_llvm_context::PolkaVMFunctionEntry,
|
||||
revive_llvm_context::PolkaVMFunctionImmutableDataLoad,
|
||||
]
|
||||
.into_iter()
|
||||
{
|
||||
@@ -216,6 +218,7 @@ where
|
||||
|
||||
fn into_llvm(self, context: &mut revive_llvm_context::PolkaVMContext<D>) -> anyhow::Result<()> {
|
||||
if self.identifier.ends_with("_deployed") {
|
||||
revive_llvm_context::PolkaVMImmutableDataLoadFunction.into_llvm(context)?;
|
||||
revive_llvm_context::PolkaVMRuntimeCodeFunction::new(self.code).into_llvm(context)?;
|
||||
} else {
|
||||
revive_llvm_context::PolkaVMDeployCodeFunction::new(self.code).into_llvm(context)?;
|
||||
|
||||
Reference in New Issue
Block a user