mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-06-17 10:01:05 +00:00
@@ -100,6 +100,7 @@ impl Expression {
|
||||
/// Converts the expression into an LLVM value.
|
||||
pub fn into_llvm<'ctx, D>(
|
||||
self,
|
||||
//bindings: &[String],
|
||||
context: &mut revive_llvm_context::PolkaVMContext<'ctx, D>,
|
||||
) -> anyhow::Result<Option<revive_llvm_context::PolkaVMArgument<'ctx>>>
|
||||
where
|
||||
|
||||
@@ -99,6 +99,17 @@ where
|
||||
mut self,
|
||||
context: &mut revive_llvm_context::PolkaVMContext<'ctx, D>,
|
||||
) -> anyhow::Result<()> {
|
||||
let pointers: Vec<revive_llvm_context::PolkaVMPointer<'ctx>> = self
|
||||
.bindings
|
||||
.into_iter()
|
||||
.map(|binding| {
|
||||
context
|
||||
.current_function()
|
||||
.borrow_mut()
|
||||
.stack_variable_pointer(binding.inner, context)
|
||||
})
|
||||
.collect();
|
||||
/*
|
||||
if self.bindings.len() == 1 {
|
||||
let identifier = self.bindings.remove(0);
|
||||
context.set_debug_location(self.location.line, 0, None)?;
|
||||
@@ -213,6 +224,7 @@ where
|
||||
})?;
|
||||
context.build_store(pointer, value)?;
|
||||
}
|
||||
*/
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -70,10 +70,11 @@ impl Type {
|
||||
D: revive_llvm_context::PolkaVMDependency + Clone,
|
||||
{
|
||||
match self {
|
||||
Self::Bool => context.integer_type(revive_common::BIT_LENGTH_BOOLEAN),
|
||||
Self::Int(bitlength) => context.integer_type(bitlength),
|
||||
//Self::Bool => context.integer_type(revive_common::BIT_LENGTH_BOOLEAN),
|
||||
//Self::Int(bitlength) => context.integer_type(bitlength),
|
||||
Self::UInt(bitlength) => context.integer_type(bitlength),
|
||||
Self::Custom(_) => context.word_type(),
|
||||
//Self::Custom(_) => context.word_type(),
|
||||
_ => panic!("oh no"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user