Compiler

Struct Compiler 

Source
pub struct Compiler(/* private fields */);

Implementations§

Source§

impl Compiler

Source

pub fn new() -> Self

Source§

impl Compiler

§

impl Compiler

pub fn emit_const( &mut self, op: sljit_s32, dst: sljit_s32, dstw: sljit_sw, init_value: sljit_sw, ) -> Constant

pub fn get_first_const(&mut self) -> Constant

pub fn emit_label(&mut self) -> Label

pub fn emit_aligned_label( &mut self, alignment: sljit_s32, buffers: *mut sljit_read_only_buffer, ) -> Label

pub fn get_first_label(&mut self) -> Label

pub fn set_compiler_memory_error(&mut self)

pub fn compiler_set_user_data(&mut self, user_data: *mut c_void)

pub fn set_current_flags(&mut self, current_flags: sljit_s32)

pub fn get_compiler_error(&mut self) -> sljit_s32

pub fn alloc_memory(&mut self, size: sljit_s32) -> *mut c_void

pub fn compiler_get_allocator_data(&mut self) -> *mut c_void

pub fn compiler_get_user_data(&mut self) -> *mut c_void

pub fn get_executable_offset(&mut self) -> sljit_sw

pub fn get_generated_code_size(&mut self) -> sljit_uw

pub fn emit_enter( &mut self, options: sljit_s32, arg_types: sljit_s32, scratches: sljit_s32, saveds: sljit_s32, local_size: sljit_s32, ) -> sljit_s32

pub fn set_context( &mut self, options: sljit_s32, arg_types: sljit_s32, scratches: sljit_s32, saveds: sljit_s32, local_size: sljit_s32, ) -> sljit_s32

pub fn emit_return_void(&mut self) -> sljit_s32

pub fn emit_return( &mut self, op: sljit_s32, src: sljit_s32, srcw: sljit_sw, ) -> sljit_s32

pub fn emit_return_to(&mut self, src: sljit_s32, srcw: sljit_sw) -> sljit_s32

pub fn emit_op0(&mut self, op: sljit_s32) -> sljit_s32

pub fn emit_op1( &mut self, op: sljit_s32, dst: sljit_s32, dstw: sljit_sw, src: sljit_s32, srcw: sljit_sw, ) -> sljit_s32

pub fn emit_op2( &mut self, op: sljit_s32, dst: sljit_s32, dstw: sljit_sw, src1: sljit_s32, src1w: sljit_sw, src2: sljit_s32, src2w: sljit_sw, ) -> sljit_s32

pub fn emit_op2u( &mut self, op: sljit_s32, src1: sljit_s32, src1w: sljit_sw, src2: sljit_s32, src2w: sljit_sw, ) -> sljit_s32

pub fn emit_op2r( &mut self, op: sljit_s32, dst_reg: sljit_s32, src1: sljit_s32, src1w: sljit_sw, src2: sljit_s32, src2w: sljit_sw, ) -> sljit_s32

pub fn emit_shift_into( &mut self, op: sljit_s32, dst_reg: sljit_s32, src1_reg: sljit_s32, src2_reg: sljit_s32, src3: sljit_s32, src3w: sljit_sw, ) -> sljit_s32

pub fn emit_op_src( &mut self, op: sljit_s32, src: sljit_s32, srcw: sljit_sw, ) -> sljit_s32

pub fn emit_op_dst( &mut self, op: sljit_s32, dst: sljit_s32, dstw: sljit_sw, ) -> sljit_s32

pub fn emit_fop1( &mut self, op: sljit_s32, dst: sljit_s32, dstw: sljit_sw, src: sljit_s32, srcw: sljit_sw, ) -> sljit_s32

pub fn emit_fop2( &mut self, op: sljit_s32, dst: sljit_s32, dstw: sljit_sw, src1: sljit_s32, src1w: sljit_sw, src2: sljit_s32, src2w: sljit_sw, ) -> sljit_s32

pub fn emit_fop2r( &mut self, op: sljit_s32, dst_freg: sljit_s32, src1: sljit_s32, src1w: sljit_sw, src2: sljit_s32, src2w: sljit_sw, ) -> sljit_s32

pub fn emit_fset32(&mut self, freg: sljit_s32, value: sljit_f32) -> sljit_s32

pub fn emit_fset64(&mut self, freg: sljit_s32, value: sljit_f64) -> sljit_s32

pub fn emit_fcopy( &mut self, op: sljit_s32, freg: sljit_s32, reg: sljit_s32, ) -> sljit_s32

pub fn emit_ijump( &mut self, type_: sljit_s32, src: sljit_s32, srcw: sljit_sw, ) -> sljit_s32

pub fn emit_icall( &mut self, type_: sljit_s32, arg_types: sljit_s32, src: sljit_s32, srcw: sljit_sw, ) -> sljit_s32

pub fn emit_op_flags( &mut self, op: sljit_s32, dst: sljit_s32, dstw: sljit_sw, type_: sljit_s32, ) -> sljit_s32

pub fn emit_select( &mut self, type_: sljit_s32, dst_reg: sljit_s32, src1: sljit_s32, src1w: sljit_sw, src2_reg: sljit_s32, ) -> sljit_s32

pub fn emit_fselect( &mut self, type_: sljit_s32, dst_freg: sljit_s32, src1: sljit_s32, src1w: sljit_sw, src2_freg: sljit_s32, ) -> sljit_s32

pub fn emit_mem( &mut self, type_: sljit_s32, reg: sljit_s32, mem: sljit_s32, memw: sljit_sw, ) -> sljit_s32

pub fn emit_mem_update( &mut self, type_: sljit_s32, reg: sljit_s32, mem: sljit_s32, memw: sljit_sw, ) -> sljit_s32

pub fn emit_fmem( &mut self, type_: sljit_s32, freg: sljit_s32, mem: sljit_s32, memw: sljit_sw, ) -> sljit_s32

pub fn emit_fmem_update( &mut self, type_: sljit_s32, freg: sljit_s32, mem: sljit_s32, memw: sljit_sw, ) -> sljit_s32

pub fn emit_simd_mov( &mut self, type_: sljit_s32, vreg: sljit_s32, srcdst: sljit_s32, srcdstw: sljit_sw, ) -> sljit_s32

pub fn emit_simd_replicate( &mut self, type_: sljit_s32, vreg: sljit_s32, src: sljit_s32, srcw: sljit_sw, ) -> sljit_s32

pub fn emit_simd_lane_mov( &mut self, type_: sljit_s32, vreg: sljit_s32, lane_index: sljit_s32, srcdst: sljit_s32, srcdstw: sljit_sw, ) -> sljit_s32

pub fn emit_simd_lane_replicate( &mut self, type_: sljit_s32, vreg: sljit_s32, src: sljit_s32, src_lane_index: sljit_s32, ) -> sljit_s32

pub fn emit_simd_extend( &mut self, type_: sljit_s32, vreg: sljit_s32, src: sljit_s32, srcw: sljit_sw, ) -> sljit_s32

pub fn emit_simd_sign( &mut self, type_: sljit_s32, vreg: sljit_s32, dst: sljit_s32, dstw: sljit_sw, ) -> sljit_s32

pub fn emit_simd_op2( &mut self, type_: sljit_s32, dst_vreg: sljit_s32, src1_vreg: sljit_s32, src2: sljit_s32, src2w: sljit_sw, ) -> sljit_s32

pub fn emit_atomic_load( &mut self, op: sljit_s32, dst_reg: sljit_s32, mem_reg: sljit_s32, ) -> sljit_s32

pub fn emit_atomic_store( &mut self, op: sljit_s32, src_reg: sljit_s32, mem_reg: sljit_s32, temp_reg: sljit_s32, ) -> sljit_s32

pub fn get_local_base( &mut self, dst: sljit_s32, dstw: sljit_sw, offset: sljit_sw, ) -> sljit_s32

pub fn emit_op_custom( &mut self, instruction: *mut c_void, size: sljit_u32, ) -> sljit_s32

pub fn serialize_compiler( &mut self, options: sljit_s32, size: *mut sljit_uw, ) -> *mut sljit_uw

pub fn emit_jump(&mut self, type_: sljit_s32) -> Jump

pub fn emit_call(&mut self, type_: sljit_s32, arg_types: sljit_s32) -> Jump

pub fn emit_cmp( &mut self, type_: sljit_s32, src1: sljit_s32, src1w: sljit_sw, src2: sljit_s32, src2w: sljit_sw, ) -> Jump

pub fn emit_fcmp( &mut self, type_: sljit_s32, src1: sljit_s32, src1w: sljit_sw, src2: sljit_s32, src2w: sljit_sw, ) -> Jump

pub fn emit_op2cmpz( &mut self, op: sljit_s32, dst: sljit_s32, dstw: sljit_sw, src1: sljit_s32, src1w: sljit_sw, src2: sljit_s32, src2w: sljit_sw, ) -> Jump

pub fn emit_op_addr( &mut self, op: sljit_s32, dst: sljit_s32, dstw: sljit_sw, ) -> Jump

pub fn get_first_jump(&mut self) -> Jump

Trait Implementations§

Source§

impl Default for Compiler

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Drop for Compiler

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl From<*mut sljit_compiler> for Compiler

Source§

fn from(value: *mut sljit_compiler) -> Self

Converts to this type from the input type.

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> 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, 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.