Function

Struct Function 

Source
pub struct Function { /* private fields */ }

Implementations§

Source§

impl Function

Source

pub fn compile(&self)

Source

pub fn alloca(&self, size: c_long) -> Value

Source

pub fn dump(&self) -> Result<String, Error>

Source

pub fn to_closure<T>(&self) -> T

Source

pub fn insn_call_native( &self, native_func: *mut c_void, params: Vec<Value>, return_type: Option<JitType>, ) -> Value

Source

pub fn arg(&self, idx: i32) -> Result<Value, Exception>

Source

pub fn insn_mult(&mut self, left: &Value, right: &Value) -> Value

Source

pub fn insn_add(&mut self, left: &Value, right: &Value) -> Value

Source

pub fn insn_pow(&mut self, left: &Value, right: &Value) -> Value

Source

pub fn insn_rem(&mut self, left: &Value, right: &Value) -> Value

Source

pub fn insn_div(&mut self, left: &Value, right: &Value) -> Value

Source

pub fn insn_sub(&mut self, left: &Value, right: &Value) -> Value

Source

pub fn insn_eq(&mut self, left: &Value, right: &Value) -> Value

Source

pub fn insn_and(&mut self, left: &Value, right: &Value) -> Value

Source

pub fn insn_or(&mut self, left: &Value, right: &Value) -> Value

Source

pub fn insn_xor(&mut self, left: &Value, right: &Value) -> Value

Source

pub fn insn_le(&mut self, left: &Value, right: &Value) -> Value

Source

pub fn insn_lt(&mut self, left: &Value, right: &Value) -> Value

Source

pub fn insn_ge(&mut self, left: &Value, right: &Value) -> Value

Source

pub fn insn_gt(&mut self, left: &Value, right: &Value) -> Value

Source

pub fn insn_ne(&mut self, left: &Value, right: &Value) -> Value

Source

pub fn insn_acos(&mut self, value: &Value) -> Value

Source

pub fn insn_asin(&mut self, value: &Value) -> Value

Source

pub fn insn_atan(&mut self, value: &Value) -> Value

Source

pub fn insn_cos(&mut self, value: &Value) -> Value

Source

pub fn insn_cosh(&mut self, value: &Value) -> Value

Source

pub fn insn_exp(&mut self, value: &Value) -> Value

Source

pub fn insn_log(&mut self, value: &Value) -> Value

Source

pub fn insn_log10(&mut self, value: &Value) -> Value

Source

pub fn insn_sin(&mut self, value: &Value) -> Value

Source

pub fn insn_sinh(&mut self, value: &Value) -> Value

Source

pub fn insn_sqrt(&mut self, value: &Value) -> Value

Source

pub fn insn_tan(&mut self, value: &Value) -> Value

Source

pub fn insn_tanh(&mut self, value: &Value) -> Value

Source

pub fn insn_return(&mut self, value: &Value)

Source

pub fn insn_not(&mut self, value: &Value) -> Value

Source

pub fn insn_branch(&self, label: &mut Label)

Source

pub fn insn_branch_if(&self, value: &Value, label: &mut Label)

Source

pub fn insn_branch_if_not(&self, value: &Value, label: &mut Label)

Source

pub fn insn_load(&mut self, ptr: &Value) -> Value

Source

pub fn insn_store(&mut self, ptr: &Value, value: &Value)

Source

pub fn insn_call(&mut self, function: &Function, args: Vec<Value>) -> Value

Source

pub fn insn_load_relative( &mut self, base_ptr: &Value, offset_bytes: c_long, typ: &JitType, ) -> Value

Source

pub fn create_value_int(&mut self) -> Value

Source

pub fn create_value_void_ptr(&mut self) -> Value

Source

pub fn create_value_float32(&mut self) -> Value

Source

pub fn create_value_float64(&mut self) -> Value

Source

pub fn insn_label(&self, label: &mut Label)

Source

pub fn insn_ceil(&self, value: &Value) -> Value

Source

pub fn insn_floor(&self, value: &Value) -> Value

Source

pub fn insn_rint(&self, value: &Value) -> Value

Source

pub fn insn_round(&self, value: &Value) -> Value

Source

pub fn insn_trunc(&self, value: &Value) -> Value

Source

pub fn insn_load_elem_address( &self, base_addr: &Value, index: &Value, elem_type: &JitType, ) -> Value

Source

pub fn create_float32_constant(&mut self, constant_value: c_float) -> Value

Source

pub fn create_float64_constant(&mut self, constant_value: c_double) -> Value

Source

pub fn create_long_constant(&mut self, constant_value: c_long) -> Value

Source

pub fn create_sbyte_constant(&mut self, constant_value: c_char) -> Value

Source

pub fn create_ubyte_constant(&mut self, constant_value: c_uchar) -> Value

Source

pub fn create_short_constant(&mut self, constant_value: c_long) -> Value

Source

pub fn create_ushort_constant(&mut self, constant_value: c_ulong) -> Value

Source

pub fn create_int_constant(&mut self, constant_value: c_int) -> Value

Source

pub fn create_ulong_constant(&mut self, constant_value: c_ulong) -> Value

Source

pub fn create_uint_constant(&mut self, constant_value: c_uint) -> Value

Source

pub fn create_nint_constant(&mut self, constant_value: c_int) -> Value

Source

pub fn create_nuint_constant(&mut self, constant_value: c_int) -> Value

Source

pub fn create_void_ptr_constant(&mut self, constant_value: *mut c_void) -> Value

Trait Implementations§

Source§

impl Clone for Function

Source§

fn clone(&self) -> Function

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.