remove near calls

Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
This commit is contained in:
Cyrill Leutwiler
2024-10-11 15:23:27 +02:00
parent e131eebf50
commit 49d2157a84
4 changed files with 2 additions and 142 deletions
@@ -48,12 +48,6 @@ pub struct Function<'ctx> {
}
impl<'ctx> Function<'ctx> {
/// The near call ABI function prefix.
pub const ZKSYNC_NEAR_CALL_ABI_PREFIX: &'static str = "ZKSYNC_NEAR_CALL";
/// The near call ABI exception handler name.
pub const ZKSYNC_NEAR_CALL_ABI_EXCEPTION_HANDLER: &'static str = "ZKSYNC_CATCH_NEAR_CALL";
/// The stack hashmap default capacity.
const STACK_HASHMAP_INITIAL_CAPACITY: usize = 64;
@@ -433,12 +433,6 @@ where
let pointer = self.build_alloca(self.word_type(), "return_pointer");
FunctionReturn::primitive(pointer)
}
size if name.starts_with(Function::ZKSYNC_NEAR_CALL_ABI_PREFIX) => {
let first_argument = value.get_first_param().expect("Always exists");
let r#type = self.structure_type(vec![self.word_type(); size].as_slice());
let pointer = first_argument.into_pointer_value();
FunctionReturn::compound(Pointer::new(r#type, AddressSpace::Stack, pointer), size)
}
size => {
self.set_basic_block(entry_block);
let pointer = self.build_alloca(