mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-06-18 00:01:04 +00:00
Contract calls (#19)
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
use inkwell::values::BasicValue;
|
||||
|
||||
use crate::polkavm::context::address_space::AddressSpace;
|
||||
use crate::polkavm::context::function::llvm_runtime::LLVMRuntime;
|
||||
use crate::polkavm::context::Context;
|
||||
use crate::polkavm::Dependency;
|
||||
|
||||
@@ -40,23 +39,6 @@ where
|
||||
Ok(result.into_int_value())
|
||||
}
|
||||
|
||||
/// Generates an exception.
|
||||
pub fn throw<D>(context: &Context<D>)
|
||||
where
|
||||
D: Dependency + Clone,
|
||||
{
|
||||
context.build_call(
|
||||
context.llvm_runtime().cxa_throw,
|
||||
&[context
|
||||
.llvm()
|
||||
.ptr_type(AddressSpace::Stack.into())
|
||||
.get_undef()
|
||||
.as_basic_value_enum(); 3],
|
||||
LLVMRuntime::FUNCTION_CXA_THROW,
|
||||
);
|
||||
context.build_unreachable();
|
||||
}
|
||||
|
||||
/// Returns the full list of arguments for an external call.
|
||||
/// Performs the extra ABI data padding and adds the mimic call extra argument.
|
||||
pub fn external_call_arguments<'ctx, D>(
|
||||
|
||||
Reference in New Issue
Block a user