pub struct LLVMFunctionCodeGenerator<'ctx, 'a> {
Show 21 fields context: &'ctx Context, builder: Builder<'ctx>, alloca_builder: Builder<'ctx>, intrinsics: &'a Intrinsics<'ctx>, state: State<'ctx>, function: FunctionValue<'ctx>, locals: Vec<(BasicTypeEnum<'ctx>, PointerValue<'ctx>)>, ctx: CtxType<'ctx, 'a>, unreachable_depth: usize, memory_styles: &'a PrimaryMap<MemoryIndex, MemoryStyle>, _table_styles: &'a PrimaryMap<TableIndex, TableStyle>, module: &'a Module<'ctx>, module_translation: &'a ModuleTranslationState, wasm_module: &'a ModuleInfo, symbol_registry: &'a dyn SymbolRegistry, abi: &'a dyn Abi, config: &'a LLVM, tags_cache: HashMap<u32, BasicValueEnum<'ctx>>, exception_types_cache: HashMap<u32, StructType<'ctx>>, ptr_size: u32, binary_fmt: BinaryFormat,
}

Fields§

§context: &'ctx Context§builder: Builder<'ctx>§alloca_builder: Builder<'ctx>§intrinsics: &'a Intrinsics<'ctx>§state: State<'ctx>§function: FunctionValue<'ctx>§locals: Vec<(BasicTypeEnum<'ctx>, PointerValue<'ctx>)>§ctx: CtxType<'ctx, 'a>§unreachable_depth: usize§memory_styles: &'a PrimaryMap<MemoryIndex, MemoryStyle>§_table_styles: &'a PrimaryMap<TableIndex, TableStyle>§module: &'a Module<'ctx>§module_translation: &'a ModuleTranslationState§wasm_module: &'a ModuleInfo§symbol_registry: &'a dyn SymbolRegistry§abi: &'a dyn Abi§config: &'a LLVM§tags_cache: HashMap<u32, BasicValueEnum<'ctx>>§exception_types_cache: HashMap<u32, StructType<'ctx>>§ptr_size: u32§binary_fmt: BinaryFormat

Implementations§

source§

impl<'ctx, 'a> LLVMFunctionCodeGenerator<'ctx, 'a>

source

fn splat_vector( &self, value: BasicValueEnum<'ctx>, vec_ty: VectorType<'ctx>, ) -> Result<VectorValue<'ctx>, CompileError>

source

fn trunc_sat<T: FloatMathType<'ctx>>( &self, fvec_ty: T, ivec_ty: T::MathConvType, lower_bound: u64, upper_bound: u64, int_min_value: u64, int_max_value: u64, value: IntValue<'ctx>, ) -> Result<VectorValue<'ctx>, CompileError>

source

fn trunc_sat_into_int<T: FloatMathType<'ctx>>( &self, fvec_ty: T, ivec_ty: T::MathConvType, lower_bound: u64, upper_bound: u64, int_min_value: u64, int_max_value: u64, value: IntValue<'ctx>, ) -> Result<IntValue<'ctx>, CompileError>

source

fn trunc_sat_scalar( &self, int_ty: IntType<'ctx>, lower_bound: u64, upper_bound: u64, int_min_value: u64, int_max_value: u64, value: FloatValue<'ctx>, ) -> Result<IntValue<'ctx>, CompileError>

source

fn trap_if_not_representable_as_int( &self, lower_bound: u64, upper_bound: u64, value: FloatValue<'_>, ) -> Result<(), CompileError>

source

fn trap_if_zero_or_overflow( &self, left: IntValue<'_>, right: IntValue<'_>, ) -> Result<(), CompileError>

source

fn trap_if_zero(&self, value: IntValue<'_>) -> Result<(), CompileError>

source

fn v128_into_int_vec( &self, value: BasicValueEnum<'ctx>, info: ExtraInfo, int_vec_ty: VectorType<'ctx>, ) -> Result<(VectorValue<'ctx>, ExtraInfo), CompileError>

source

fn v128_into_i8x16( &self, value: BasicValueEnum<'ctx>, info: ExtraInfo, ) -> Result<(VectorValue<'ctx>, ExtraInfo), CompileError>

source

fn v128_into_i16x8( &self, value: BasicValueEnum<'ctx>, info: ExtraInfo, ) -> Result<(VectorValue<'ctx>, ExtraInfo), CompileError>

source

fn v128_into_i32x4( &self, value: BasicValueEnum<'ctx>, info: ExtraInfo, ) -> Result<(VectorValue<'ctx>, ExtraInfo), CompileError>

source

fn v128_into_i64x2( &self, value: BasicValueEnum<'ctx>, info: ExtraInfo, ) -> Result<(VectorValue<'ctx>, ExtraInfo), CompileError>

source

fn v128_into_f32x4( &self, value: BasicValueEnum<'ctx>, info: ExtraInfo, ) -> Result<(VectorValue<'ctx>, ExtraInfo), CompileError>

source

fn v128_into_f64x2( &self, value: BasicValueEnum<'ctx>, info: ExtraInfo, ) -> Result<(VectorValue<'ctx>, ExtraInfo), CompileError>

source

fn apply_pending_canonicalization( &self, value: BasicValueEnum<'ctx>, info: ExtraInfo, ) -> Result<BasicValueEnum<'ctx>, CompileError>

source

fn canonicalize_nans( &self, value: BasicValueEnum<'ctx>, ) -> Result<BasicValueEnum<'ctx>, CompileError>

source

fn quiet_nan( &self, value: BasicValueEnum<'ctx>, ) -> Result<BasicValueEnum<'ctx>, CompileError>

source

fn mark_memaccess_nodelete( &mut self, memory_index: MemoryIndex, memaccess: InstructionValue<'ctx>, ) -> Result<(), CompileError>

source

fn annotate_user_memaccess( &mut self, memory_index: MemoryIndex, _memarg: &MemArg, alignment: u32, memaccess: InstructionValue<'ctx>, ) -> Result<(), CompileError>

source

fn resolve_memory_ptr( &mut self, memory_index: MemoryIndex, memarg: &MemArg, ptr_ty: PointerType<'ctx>, var_offset: IntValue<'ctx>, value_size: usize, ) -> Result<PointerValue<'ctx>, CompileError>

source

fn trap_if_misaligned( &self, _memarg: &MemArg, ptr: PointerValue<'ctx>, align: u8, ) -> Result<(), CompileError>

source

fn finalize(&mut self, wasm_fn_type: &FunctionType) -> Result<(), CompileError>

source

fn get_or_insert_global_tag(&mut self, tag: u32) -> BasicValueEnum<'ctx>

source

fn get_or_insert_exception_type( &mut self, tag: u32, signature: &FunctionType, ) -> Result<StructType<'ctx>, CompileError>

source

fn encode_tag(&self, tag: u32) -> usize

source§

impl<'ctx, 'a> LLVMFunctionCodeGenerator<'ctx, 'a>

source

fn translate_operator( &mut self, op: Operator<'_>, _source_loc: u32, ) -> Result<(), CompileError>

Auto Trait Implementations§

§

impl<'ctx, 'a> !Freeze for LLVMFunctionCodeGenerator<'ctx, 'a>

§

impl<'ctx, 'a> !RefUnwindSafe for LLVMFunctionCodeGenerator<'ctx, 'a>

§

impl<'ctx, 'a> !Send for LLVMFunctionCodeGenerator<'ctx, 'a>

§

impl<'ctx, 'a> !Sync for LLVMFunctionCodeGenerator<'ctx, 'a>

§

impl<'ctx, 'a> Unpin for LLVMFunctionCodeGenerator<'ctx, 'a>

§

impl<'ctx, 'a> !UnwindSafe for LLVMFunctionCodeGenerator<'ctx, 'a>

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
§

impl<T> ArchivePointee for T

§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
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.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

source§

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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<T> LayoutRaw for T

§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Returns the layout of the type.
§

impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
where T: SharedNiching<N1, N2>, N1: Niching<T>, N2: Niching<T>,

§

unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool

Returns whether the given value has been niched. Read more
§

fn resolve_niched(out: Place<NichedOption<T, N1>>)

Writes data to out indicating that a T is niched.
§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Pointee for T

§

type Metadata = ()

The metadata type for pointers and references to this type.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

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

§

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

§

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

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more