Skip to main content

BytecodeBuilder

Struct BytecodeBuilder 

Source
pub struct BytecodeBuilder { /* private fields */ }

Implementations§

Source§

impl BytecodeBuilder

Source

pub fn add_child_function(&mut self, fid: u32) -> i16

Source§

impl BytecodeBuilder

Source

pub fn add_class_shape(&mut self, shape: ClassShape) -> i32

Source§

impl BytecodeBuilder

Source

pub fn add_constant(&mut self, key: ConstantKey, value: Constant) -> i32

Source§

impl BytecodeBuilder

Source

pub fn add_constant_boolean(&mut self, value: bool) -> i32

Source§

impl BytecodeBuilder

Source

pub fn add_constant_closure(&mut self, fid: u32) -> i32

Source§

impl BytecodeBuilder

Source

pub fn add_constant_integer(&mut self, value: i64) -> i32

Source§

impl BytecodeBuilder

Source

pub fn add_constant_nil(&mut self) -> i32

Source§

impl BytecodeBuilder

Source

pub fn add_constant_number(&mut self, value: f64) -> i32

Source§

impl BytecodeBuilder

Source

pub fn add_constant_string(&mut self, value: StringRef) -> i32

Source§

impl BytecodeBuilder

Source

pub fn add_constant_table(&mut self, shape: &TableShape) -> i32

Source§

impl BytecodeBuilder

Source

pub fn add_constant_vector(&mut self, x: f32, y: f32, z: f32, w: f32) -> i32

Source§

impl BytecodeBuilder

Source

pub fn add_debug_remark(&mut self, args: Arguments<'_>)

Source§

impl BytecodeBuilder

Source

pub fn add_fb_slot(&mut self, t: LuauFeedbackType) -> u32

Source§

impl BytecodeBuilder

Source

pub fn add_import(&mut self, iid: u32) -> i32

Source§

impl BytecodeBuilder

Source

pub fn add_string_table_entry(&mut self, value: StringRef) -> u32

Source§

impl BytecodeBuilder

Source

pub fn add_userdata_type(&mut self, name: &str) -> u32

Source§

impl BytecodeBuilder

Source

pub fn annotate_instruction(&self, result: &mut String, fid: u32, instpos: u32)

Source§

impl BytecodeBuilder

Source

pub fn begin_function(&mut self, numparams: u8, isvararg: bool) -> u32

Source§

impl BytecodeBuilder

Source

pub fn new(encoder: Option<*mut dyn BytecodeEncoder>) -> Self

Source§

impl BytecodeBuilder

Source

pub fn decompose_import_id( ids: u32, id0: &mut i32, id1: &mut i32, id2: &mut i32, ) -> i32

Source§

impl BytecodeBuilder

Source

pub fn dump_constant(&self, result: &mut String, k: i32, detailed: bool)

Source§

impl BytecodeBuilder

Source

pub fn dump_current_function(&self, dumpinstoffs: &mut Vec<i32>) -> String

Source§

impl BytecodeBuilder

Source

pub fn dump_everything(&self) -> String

Source§

impl BytecodeBuilder

Source

pub fn dump_function(&self, id: u32) -> String

Source§

impl BytecodeBuilder

Source

pub fn dump_instruction( &self, code: &[u32], result: &mut String, target_label: i32, ) -> usize

Source§

impl BytecodeBuilder

Source§

impl BytecodeBuilder

Source

pub fn dump_type_info(&self) -> String

Source§

impl BytecodeBuilder

Source

pub fn emit_abc(&mut self, op: LuauOpcode, a: u8, b: u8, c: u8)

Source§

impl BytecodeBuilder

Source

pub fn emit_ad(&mut self, op: LuauOpcode, a: u8, d: i16)

Source§

impl BytecodeBuilder

Source

pub fn emit_aux(&mut self, aux: u32)

Source§

impl BytecodeBuilder

Source

pub fn emit_e(&mut self, op: LuauOpcode, e: i32)

Source§

impl BytecodeBuilder

Source

pub fn emit_label(&self) -> usize

Source§

impl BytecodeBuilder

Source

pub fn end_function(&mut self, maxstacksize: u8, numupvalues: u8, flags: u8)

Source§

impl BytecodeBuilder

Source

pub fn expand_jumps(&mut self)

Source§

impl BytecodeBuilder

Source

pub fn finalize(&mut self)

Source§

impl BytecodeBuilder

Source

pub fn fold_jumps(&mut self)

Source§

impl BytecodeBuilder

Source

pub fn get_bytecode(&self) -> &String

Source§

impl BytecodeBuilder

Source

pub fn get_debug_pc(&self) -> u32

Source§

impl BytecodeBuilder

Source

pub fn get_error(message: &str) -> String

Source§

impl BytecodeBuilder

Source

pub fn get_function_data(&self, id: u32) -> String

Source§

impl BytecodeBuilder

Source

pub fn get_import_id(id0: i32) -> u32

Source

pub fn get_import_id2(id0: i32, id1: i32) -> u32

Source

pub fn get_import_id3(id0: i32, id1: i32, id2: i32) -> u32

Source§

impl BytecodeBuilder

Source

pub fn get_import_id_i32_i32(id0: i32, id1: i32) -> u32

Source§

impl BytecodeBuilder

Source

pub fn get_import_id_i32_i32_i32(id0: i32, id1: i32, id2: i32) -> u32

Source§

impl BytecodeBuilder

Source§

impl BytecodeBuilder

Source

pub fn get_string_table(&self) -> Vec<&str>

Source§

impl BytecodeBuilder

Source§

impl BytecodeBuilder

Source§

impl BytecodeBuilder

Source

pub fn get_version(&self) -> u8

Source§

impl BytecodeBuilder

Source§

impl BytecodeBuilder

Source

pub fn patch_aux(&mut self, target_aux: usize, new_value: i32)

Source§

impl BytecodeBuilder

Source

pub fn patch_jump_d(&mut self, jump_label: usize, target_label: usize) -> bool

Source§

impl BytecodeBuilder

Source

pub fn patch_skip_c(&mut self, jump_label: usize, target_label: usize) -> bool

Source§

impl BytecodeBuilder

Source

pub fn push_debug_local( &mut self, name: StringRef, reg: u8, startpc: u32, endpc: u32, )

Source§

impl BytecodeBuilder

Source

pub fn push_debug_upval(&mut self, name: StringRef)

Source§

impl BytecodeBuilder

Source

pub fn push_local_type_info( &mut self, type: LuauBytecodeType, reg: u8, startpc: u32, endpc: u32, )

Source§

impl BytecodeBuilder

Source§

impl BytecodeBuilder

Source§

impl BytecodeBuilder

Source

pub fn set_debug_function_name(&mut self, name: StringRef)

Source§

impl BytecodeBuilder

Source

pub fn set_debug_line(&mut self, line: i32)

Source§

impl BytecodeBuilder

Source

pub fn set_dump_flags(&mut self, flags: u32)

Source§

impl BytecodeBuilder

Source

pub fn set_dump_source(&mut self, source: &str)

Source§

impl BytecodeBuilder

Source

pub fn set_function_type_info(&mut self, value: String)

Source§

impl BytecodeBuilder

Source

pub fn set_main_function(&mut self, fid: u32)

Source§

impl BytecodeBuilder

Source§

impl BytecodeBuilder

Source

pub fn undo_emit(&mut self, op: LuauOpcode)

Source§

impl BytecodeBuilder

Source

pub fn use_userdata_type(&mut self, index: u32)

Source§

impl BytecodeBuilder

Source

pub fn validate(&self)

Source§

impl BytecodeBuilder

Source§

impl BytecodeBuilder

Source§

impl BytecodeBuilder

Source

pub fn write_class_shape(&self, ss: &mut String, cs: &ClassShape)

Source§

impl BytecodeBuilder

Source

pub fn write_function(&mut self, ss: &mut String, id: u32, flags: u8)

Source§

impl BytecodeBuilder

Source

pub fn write_line_info(&self, ss: &mut String)

Source§

impl BytecodeBuilder

Trait Implementations§

Source§

impl Clone for BytecodeBuilder

Source§

fn clone(&self) -> BytecodeBuilder

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for BytecodeBuilder

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for BytecodeBuilder

Source§

fn default() -> Self

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

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.