[][src]Struct llhd::ir::prelude::Entity

pub struct Entity {
    pub name: UnitName,
    pub sig: Signature,
    pub dfg: DataFlowGraph,
    pub layout: InstLayout,
}

An entity.

Fields

name: UnitNamesig: Signaturedfg: DataFlowGraphlayout: InstLayout

Methods

impl Entity[src]

pub fn new(name: UnitName, sig: Signature) -> Self[src]

Create a new entity.

Trait Implementations

impl Unit for Entity[src]

fn dump(&self) -> UnitDumper<&Self>[src]

Dump the unit in human-readable form.

fn is_function(&self) -> bool[src]

Check if this unit is a Function.

fn is_process(&self) -> bool[src]

Check if this unit is a Process.

fn is_entity(&self) -> bool[src]

Check if this unit is an Entity.

fn arg_value(&self, arg: Arg) -> Value[src]

Get the value of argument arg.

fn input_args<'a>(&'a self) -> Box<dyn Iterator<Item = Value> + 'a>[src]

Return an iterator over the unit's input arguments.

fn output_args<'a>(&'a self) -> Box<dyn Iterator<Item = Value> + 'a>[src]

Return an iterator over the unit's output arguments.

fn args<'a>(&'a self) -> Box<dyn Iterator<Item = Value> + 'a>[src]

Return an iterator over the unit's arguments.

fn input_arg(&self, pos: usize) -> Value[src]

Get the input argument at position pos.

fn output_arg(&self, pos: usize) -> Value[src]

Get the output argument at position pos.

fn has_result(&self, inst: Inst) -> bool[src]

Returns whether an instruction produces a result.

fn inst_result(&self, inst: Inst) -> Value[src]

Returns the result of an instruction.

fn value_type(&self, value: Value) -> Type[src]

Returns the type of a value.

fn extern_name(&self, ext: ExtUnit) -> &UnitName[src]

Return the name of an external unit.

fn extern_sig(&self, ext: ExtUnit) -> &Signature[src]

Return the signature of an external unit.

Auto Trait Implementations

impl Sync for Entity

impl Send for Entity

impl Unpin for Entity

impl RefUnwindSafe for Entity

impl UnwindSafe for Entity

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]