Skip to main content

cinsn_t

Struct cinsn_t 

pub struct cinsn_t { /* private fields */ }
Expand description

Ctree item: statement. Depending on the exact statement type, various fields of the union are used.

Implementations§

§

impl cinsn_t

pub unsafe fn new_insn<'a>( self: Pin<&'a mut Self>, insn_ea: c_ulonglong, ) -> Pin<&'a mut cinsn_t>

Create a new statement. The current statement must be a block. The new statement will be appended to it. \param insn_ea statement address

pub unsafe fn create_if<'a>( self: Pin<&'a mut Self>, cnd: *mut cexpr_t, ) -> Pin<&'a mut cif_t>

Create a new if-statement. The current statement must be a block. The new statement will be appended to it. \param cnd if condition. It will be deleted after being copied.

pub unsafe fn is_ordinary_flow(&self) -> bool

Check if the statement passes execution to the next statement. \return false if the statement breaks the control flow (like goto, return, etc)

pub unsafe fn collect_free_breaks( self: Pin<&mut Self>, breaks: *mut qvector_cinsn_t_AutocxxConcrete, ) -> bool

Collect free \c break statements. This function finds all free \c break statements within the current statement. A \c break statement is free if it does not have a loop or switch parent that that is also within the current statement. \param breaks pointer to the variable where the vector of all found free \c break statements is returned. This argument can be nullptr. \return true if some free \c break statements have been found

pub unsafe fn collect_free_continues( self: Pin<&mut Self>, continues: *mut qvector_cinsn_t_AutocxxConcrete, ) -> bool

Collect free \c continue statements. This function finds all free \c continue statements within the current statement. A \c continue statement is free if it does not have a loop parent that that is also within the current statement. \param continues pointer to the variable where the vector of all found free \c continue statements is returned. This argument can be nullptr. \return true if some free \c continue statements have been found

pub unsafe fn contains_free_break(&self) -> bool

Check if the statement has free \c break statements.

pub unsafe fn contains_free_continue(&self) -> bool

Check if the statement has free \c continue statements.

§

impl cinsn_t

pub unsafe fn swap(self: Pin<&mut cinsn_t>, r: Pin<&mut cinsn_t>)

pub unsafe fn compare(self: &cinsn_t, r: &cinsn_t) -> c_int

pub unsafe fn replace_by(self: Pin<&mut cinsn_t>, r: *mut cinsn_t)

Replace the statement. The children of the statement are abandoned (not freed). The statement pointed by ‘r’ is moved to ‘this’ statement \param r the source statement. It is deleted after being copied

pub unsafe fn cleanup(self: Pin<&mut cinsn_t>)

Cleanup the statement. This function properly deletes all children and sets the item type to cit_empty.

pub unsafe fn zero(self: Pin<&mut cinsn_t>)

Overwrite with zeroes without cleaning memory or deleting children

pub unsafe fn print( self: &cinsn_t, indent: c_int, vp: Pin<&mut vc_printer_t>, use_curly: use_curly_t, )

Print the statement into many lines. \param indent indention (number of spaces) for the statement \param vp printer helper class which will receive the generated text. \param use_curly if the statement is a block, how should curly braces be printed.

pub unsafe fn print1( self: &cinsn_t, vout: *mut qstring_char_AutocxxConcrete, func: *const cfunc_t, )

Print the statement into one line. Currently this function is not available. \param vout output buffer \param func parent function. This argument is used to find out the referenced variable names.

pub unsafe fn contains_insn( self: &cinsn_t, type_: ctype_t, times: c_int, ) -> bool

Check if the statement contains a statement of the specified type. \param type statement opcode to look for \param times how many times TYPE should be present \return true if the statement has at least TIMES children with opcode == TYPE

pub unsafe fn dstr(self: &cinsn_t) -> *const c_char

pub unsafe fn new() -> impl New<Output = Self>

Trait Implementations§

§

impl AsRef<citem_t> for cinsn_t

§

fn as_ref(self: &cinsn_t) -> &citem_t

Converts this type into a shared reference of the (usually inferred) input type.
§

impl CopyNew for cinsn_t

§

unsafe fn copy_new(r: &cinsn_t, this: Pin<&mut MaybeUninit<cinsn_t>>)

Copy-construct src into this, effectively re-pinning it at a new location. Read more
§

impl Drop for cinsn_t

§

fn drop(self: &mut cinsn_t)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
§

impl ExternType for cinsn_t

§

type Id = (c, i, n, s, n, __, t)

A type-level representation of the type’s C++ namespace and type name. Read more
§

type Kind = Opaque

§

impl MakeCppStorage for cinsn_t

§

unsafe fn allocate_uninitialized_cpp_storage() -> *mut cinsn_t

Allocates heap space for this type in C++ and return a pointer to that space, but do not initialize that space (i.e. do not yet call a constructor). Read more
§

unsafe fn free_uninitialized_cpp_storage(arg0: *mut cinsn_t)

Frees a C++ allocation which has not yet had a constructor called. Read more
§

impl SharedPtrTarget for cinsn_t

§

impl UniquePtrTarget for cinsn_t

§

impl WeakPtrTarget for cinsn_t

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