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
§exception_types_cache: HashMap<u32, StructType<'ctx>>
§ptr_size: u32
§binary_fmt: BinaryFormat
Implementations§
source§impl<'ctx, 'a> LLVMFunctionCodeGenerator<'ctx, 'a>
impl<'ctx, 'a> LLVMFunctionCodeGenerator<'ctx, 'a>
fn splat_vector( &self, value: BasicValueEnum<'ctx>, vec_ty: VectorType<'ctx>, ) -> Result<VectorValue<'ctx>, CompileError>
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>
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>
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>
fn trap_if_not_representable_as_int( &self, lower_bound: u64, upper_bound: u64, value: FloatValue<'_>, ) -> Result<(), CompileError>
fn trap_if_zero_or_overflow( &self, left: IntValue<'_>, right: IntValue<'_>, ) -> Result<(), CompileError>
fn trap_if_zero(&self, value: IntValue<'_>) -> Result<(), CompileError>
fn v128_into_int_vec( &self, value: BasicValueEnum<'ctx>, info: ExtraInfo, int_vec_ty: VectorType<'ctx>, ) -> Result<(VectorValue<'ctx>, ExtraInfo), CompileError>
fn v128_into_i8x16( &self, value: BasicValueEnum<'ctx>, info: ExtraInfo, ) -> Result<(VectorValue<'ctx>, ExtraInfo), CompileError>
fn v128_into_i16x8( &self, value: BasicValueEnum<'ctx>, info: ExtraInfo, ) -> Result<(VectorValue<'ctx>, ExtraInfo), CompileError>
fn v128_into_i32x4( &self, value: BasicValueEnum<'ctx>, info: ExtraInfo, ) -> Result<(VectorValue<'ctx>, ExtraInfo), CompileError>
fn v128_into_i64x2( &self, value: BasicValueEnum<'ctx>, info: ExtraInfo, ) -> Result<(VectorValue<'ctx>, ExtraInfo), CompileError>
fn v128_into_f32x4( &self, value: BasicValueEnum<'ctx>, info: ExtraInfo, ) -> Result<(VectorValue<'ctx>, ExtraInfo), CompileError>
fn v128_into_f64x2( &self, value: BasicValueEnum<'ctx>, info: ExtraInfo, ) -> Result<(VectorValue<'ctx>, ExtraInfo), CompileError>
fn apply_pending_canonicalization( &self, value: BasicValueEnum<'ctx>, info: ExtraInfo, ) -> Result<BasicValueEnum<'ctx>, CompileError>
fn canonicalize_nans( &self, value: BasicValueEnum<'ctx>, ) -> Result<BasicValueEnum<'ctx>, CompileError>
fn quiet_nan( &self, value: BasicValueEnum<'ctx>, ) -> Result<BasicValueEnum<'ctx>, CompileError>
fn mark_memaccess_nodelete( &mut self, memory_index: MemoryIndex, memaccess: InstructionValue<'ctx>, ) -> Result<(), CompileError>
fn annotate_user_memaccess( &mut self, memory_index: MemoryIndex, _memarg: &MemArg, alignment: u32, memaccess: InstructionValue<'ctx>, ) -> Result<(), CompileError>
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>
fn trap_if_misaligned( &self, _memarg: &MemArg, ptr: PointerValue<'ctx>, align: u8, ) -> Result<(), CompileError>
fn finalize(&mut self, wasm_fn_type: &FunctionType) -> Result<(), CompileError>
fn get_or_insert_global_tag(&mut self, tag: u32) -> BasicValueEnum<'ctx>
fn get_or_insert_exception_type( &mut self, tag: u32, signature: &FunctionType, ) -> Result<StructType<'ctx>, CompileError>
fn encode_tag(&self, tag: u32) -> usize
source§impl<'ctx, 'a> LLVMFunctionCodeGenerator<'ctx, 'a>
impl<'ctx, 'a> LLVMFunctionCodeGenerator<'ctx, 'a>
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§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.