pub(crate) struct JitBackend<'ctx, 'b> {
pub(crate) ctx: &'ctx Context,
pub(crate) builder: &'b Builder<'ctx>,
pub(crate) function: FunctionValue<'ctx>,
pub(crate) buf_param: PointerValue<'ctx>,
pub(crate) now_param: FloatValue<'ctx>,
pub(crate) i8_type: IntType<'ctx>,
pub(crate) i32_type: IntType<'ctx>,
pub(crate) i64_type: IntType<'ctx>,
pub(crate) f64_type: FloatType<'ctx>,
pub(crate) bool_type: IntType<'ctx>,
pub(crate) intrinsics: Intrinsics<'ctx>,
}Fields§
§ctx: &'ctx Context§builder: &'b Builder<'ctx>§function: FunctionValue<'ctx>§buf_param: PointerValue<'ctx>§now_param: FloatValue<'ctx>§i8_type: IntType<'ctx>§i32_type: IntType<'ctx>§i64_type: IntType<'ctx>§f64_type: FloatType<'ctx>§bool_type: IntType<'ctx>§intrinsics: Intrinsics<'ctx>Implementations§
Source§impl<'ctx, 'b> JitBackend<'ctx, 'b>
impl<'ctx, 'b> JitBackend<'ctx, 'b>
pub(crate) fn new( environment: &JitEnvironment<'ctx, 'b>, entry: &JitEntry<'ctx>, intrinsics: Intrinsics<'ctx>, ) -> Self
pub(crate) fn pack_result( &self, kind: u8, action_id: u32, payload: u32, ) -> IntValue<'ctx>
fn gep(&self, offset: usize) -> PointerValue<'ctx>
fn cond_return( &mut self, cond: IntValue<'ctx>, ret: IntValue<'ctx>, label: &str, )
Trait Implementations§
Source§impl<'ctx> RotationBackend for JitBackend<'ctx, '_>
impl<'ctx> RotationBackend for JitBackend<'ctx, '_>
type Bool = IntValue<'ctx>
type Int = IntValue<'ctx>
type Float = FloatValue<'ctx>
fn const_bool(&mut self, v: bool) -> Self::Bool
fn const_i32(&mut self, v: i32) -> Self::Int
fn const_i64(&mut self, v: i64) -> Self::Int
fn const_f64(&mut self, v: f64) -> Self::Float
fn load_bool(&mut self, offset: usize) -> Self::Bool
fn load_i32(&mut self, offset: usize) -> Self::Int
fn load_i64(&mut self, offset: usize) -> Self::Int
fn load_f64(&mut self, offset: usize) -> Self::Float
fn store_bool(&mut self, offset: usize, v: Self::Bool)
fn store_i32(&mut self, offset: usize, v: Self::Int)
fn store_f64(&mut self, offset: usize, v: Self::Float)
fn now(&mut self) -> Self::Float
fn add_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Float
fn sub_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Float
fn mul_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Float
Source§fn safe_div_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Float
fn safe_div_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Float
Returns 0.0 for any /0 (mirrors
wowlab_types::numeric::safe_div).Source§fn true_mod_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Float
fn true_mod_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Float
Mirrors
wowlab_types::numeric::true_mod.fn min_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Float
fn max_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Float
fn floor_f(&mut self, v: Self::Float) -> Self::Float
fn ceil_f(&mut self, v: Self::Float) -> Self::Float
fn abs_f(&mut self, v: Self::Float) -> Self::Float
fn cmp_gt_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Bool
fn cmp_gte_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Bool
fn cmp_lt_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Bool
fn cmp_lte_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Bool
Source§fn cmp_eq_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Bool
fn cmp_eq_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Bool
Epsilon-aware (mirrors
wowlab_types::numeric::float_eq).Source§fn cmp_ne_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Bool
fn cmp_ne_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Bool
Epsilon-aware (mirrors
wowlab_types::numeric::float_ne).fn cmp_eq_i(&mut self, a: Self::Int, b: Self::Int) -> Self::Bool
fn cmp_ne_i(&mut self, a: Self::Int, b: Self::Int) -> Self::Bool
fn cmp_gt_i(&mut self, a: Self::Int, b: Self::Int) -> Self::Bool
fn cmp_gte_i(&mut self, a: Self::Int, b: Self::Int) -> Self::Bool
fn cmp_lt_i(&mut self, a: Self::Int, b: Self::Int) -> Self::Bool
fn cmp_lte_i(&mut self, a: Self::Int, b: Self::Int) -> Self::Bool
fn and_b(&mut self, a: Self::Bool, b: Self::Bool) -> Self::Bool
fn or_b(&mut self, a: Self::Bool, b: Self::Bool) -> Self::Bool
fn not_b(&mut self, a: Self::Bool) -> Self::Bool
fn bool_to_float(&mut self, v: Self::Bool) -> Self::Float
fn bool_to_int(&mut self, v: Self::Bool) -> Self::Int
fn int_to_float(&mut self, v: Self::Int) -> Self::Float
fn int_to_bool(&mut self, v: Self::Int) -> Self::Bool
Source§fn float_to_bool(&mut self, v: Self::Float) -> Self::Bool
fn float_to_bool(&mut self, v: Self::Float) -> Self::Bool
Exact
v != 0.0.Source§fn float_to_int(&mut self, v: Self::Float) -> Self::Int
fn float_to_int(&mut self, v: Self::Float) -> Self::Int
v as i64 (truncates).fn select_f( &mut self, cond: Self::Bool, t: Self::Float, f: Self::Float, ) -> Self::Float
fn select_i( &mut self, cond: Self::Bool, t: Self::Int, f: Self::Int, ) -> Self::Int
fn select_b( &mut self, cond: Self::Bool, t: Self::Bool, f: Self::Bool, ) -> Self::Bool
fn return_none_if(&mut self, cond: Self::Bool)
fn return_cast_if(&mut self, cond: Self::Bool, spell_id: u32, empower_rank: u8)
fn return_wait_if(&mut self, cond: Self::Bool, seconds: f32)
fn return_pool_if(&mut self, cond: Self::Bool, target: f32)
fn return_use_item_if( &mut self, cond: Self::Bool, gear_slot: u8, empower_rank: u8, )
fn return_none(&mut self)
fn record_action(&mut self, _record: ActionRecord<'_>)
fn record_action_guarded( &mut self, _list_id: &str, _action_index: usize, _action: &RotationAction, _is_terminator: bool, _guard_held: Self::Bool, _failing: &Condition, )
fn begin_list_recording(&mut self, _list_id: &str)
fn end_list_recording(&mut self)
Auto Trait Implementations§
impl<'ctx, 'b> Freeze for JitBackend<'ctx, 'b>
impl<'ctx, 'b> !RefUnwindSafe for JitBackend<'ctx, 'b>
impl<'ctx, 'b> !Send for JitBackend<'ctx, 'b>
impl<'ctx, 'b> !Sync for JitBackend<'ctx, 'b>
impl<'ctx, 'b> Unpin for JitBackend<'ctx, 'b>
impl<'ctx, 'b> UnsafeUnpin for JitBackend<'ctx, 'b>
impl<'ctx, 'b> !UnwindSafe for JitBackend<'ctx, 'b>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more