pub struct CompilationContext {
pub inserted_value_index: usize,
pub buffer: Vec<u8>,
pub inserted_values: Vec<ValueContainer>,
pub has_non_static_value: bool,
pub execution_mode: ExecutionMode,
/* private fields */
}Expand description
compilation context, created for each compiler call, even if compiling a script for the same scope
Fields§
§inserted_value_index: usize§buffer: Vec<u8>§inserted_values: Vec<ValueContainer>§has_non_static_value: boolthis flag is set to true if any non-static value is encountered
execution_mode: ExecutionModeImplementations§
Source§impl CompilationContext
impl CompilationContext
pub fn new( buffer: Vec<u8>, inserted_values: Vec<ValueContainer>, execution_mode: ExecutionMode, ) -> Self
pub fn buffer_index(&self) -> usize
pub fn external_slots(&self) -> Vec<VirtualSlot>
Sourcepub fn get_slot_byte_indices(&self, match_externals: bool) -> Vec<Vec<u32>>
pub fn get_slot_byte_indices(&self, match_externals: bool) -> Vec<Vec<u32>>
Gets all slots for either local or external slots depending on the value of external
pub fn remap_virtual_slots(&mut self)
pub fn insert_virtual_slot_address(&mut self, virtual_slot: VirtualSlot)
pub fn set_u32_at_index(&mut self, u32: u32, index: usize)
pub fn mark_has_non_static_value(&mut self)
pub fn append_instruction_code(&mut self, code: InstructionCode)
Source§impl CompilationContext
Compilation functions for type expressions.
impl CompilationContext
Compilation functions for type expressions.
pub fn append_type_instruction_code(&mut self, code: TypeInstructionCode)
pub fn insert_type_literal_integer(&mut self, integer: &Integer)
pub fn insert_type_literal_text(&mut self, text: &str)
Auto Trait Implementations§
impl Freeze for CompilationContext
impl !RefUnwindSafe for CompilationContext
impl !Send for CompilationContext
impl !Sync for CompilationContext
impl Unpin for CompilationContext
impl !UnwindSafe for CompilationContext
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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