pub struct BytecodeLoader<R: Read> {
pub function_map: HashMap<Option<String>, Gs2BytecodeAddress>,
pub instructions: Vec<Instruction>,
pub block_address_to_function: HashMap<Gs2BytecodeAddress, Option<String>>,
/* private fields */
}
Expand description
A structure for loading bytecode from a reader.
Fields§
§function_map: HashMap<Option<String>, Gs2BytecodeAddress>
A map of function names to their addresses.
instructions: Vec<Instruction>
The instructions in the module.
block_address_to_function: HashMap<Gs2BytecodeAddress, Option<String>>
A map of block start addresses to their corresponding function name.
Implementations§
Source§impl<R: Read> BytecodeLoader<R>
impl<R: Read> BytecodeLoader<R>
Sourcepub fn get_function_name_for_address(
&self,
address: Gs2BytecodeAddress,
) -> Result<Option<String>, BytecodeLoaderError>
pub fn get_function_name_for_address( &self, address: Gs2BytecodeAddress, ) -> Result<Option<String>, BytecodeLoaderError>
Sourcepub fn is_instruction_reachable(&self, address: Gs2BytecodeAddress) -> bool
pub fn is_instruction_reachable(&self, address: Gs2BytecodeAddress) -> bool
Sourcepub fn find_block_start_address(
&self,
address: Gs2BytecodeAddress,
) -> Gs2BytecodeAddress
pub fn find_block_start_address( &self, address: Gs2BytecodeAddress, ) -> Gs2BytecodeAddress
Auto Trait Implementations§
impl<R> Freeze for BytecodeLoader<R>where
R: Freeze,
impl<R> RefUnwindSafe for BytecodeLoader<R>where
R: RefUnwindSafe,
impl<R> Send for BytecodeLoader<R>where
R: Send,
impl<R> Sync for BytecodeLoader<R>where
R: Sync,
impl<R> Unpin for BytecodeLoader<R>where
R: Unpin,
impl<R> UnwindSafe for BytecodeLoader<R>where
R: UnwindSafe,
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