[][src]Struct gf::isa::Isa

pub struct Isa { /* fields omitted */ }

Instruction set architecture, e.g. RV64.

Methods

impl Isa[src]

pub fn new(module: Sealed<Module>) -> Self[src]

Create an empty ISA with the given associated Pivot module.

pub fn module(&self) -> &Sealed<Module>[src]

Return the associated Pivot module.

pub fn feature(&self, id: FeatureId) -> Option<&Feature>[src]

Return a shared reference to a feature.

pub fn feature_mut(&mut self, id: FeatureId) -> Option<&mut Feature>[src]

Return a mutable reference to a feature.

pub fn morpheme(&self, id: MorphemeId) -> Option<&Morpheme>[src]

Return a shared reference to a morpheme.

pub fn morpheme_mut(&mut self, id: MorphemeId) -> Option<&mut Morpheme>[src]

Return a mutable reference to a morpheme.

pub fn operand_mode(&self, id: OperandModeId) -> Option<&OperandMode>[src]

Return a shared reference to an operand mode.

pub fn operand_mode_mut(
    &mut self,
    id: OperandModeId
) -> Option<&mut OperandMode>
[src]

Return a mutable reference to an operand mode.

pub fn rule(&self, id: RuleId) -> Option<&Rule>[src]

Return a shared reference to a rule.

pub fn rule_mut(&mut self, id: RuleId) -> Option<&mut Rule>[src]

Return a mutable reference to a rule.

pub fn enumerate_features(&self) -> impl Iterator<Item = (FeatureId, &Feature)>[src]

Return an iterator over features and their IDs.

pub fn enumerate_morphemes(
    &self
) -> impl Iterator<Item = (MorphemeId, &Morpheme)>
[src]

Return an iterator over morphemes and their ID.

pub fn enumerate_operand_modes(
    &self
) -> impl Iterator<Item = (OperandModeId, &OperandMode)>
[src]

Return an iterator over operand modes and their ID.

pub fn enumerate_rules(&self) -> impl Iterator<Item = (RuleId, &Rule)>[src]

Return an iterator over rules and their IDs.

pub fn find_morpheme(&self, name: &str) -> Option<MorphemeId>[src]

Find morpheme by name.

pub fn find_operand_mode(&self, name: &str) -> Option<OperandModeId>[src]

Find operand mode by name.

pub fn find_rule(&self, name: &str) -> Option<RuleId>[src]

Find rule by name.

pub fn add_feature(&mut self, feature: Feature) -> FeatureId[src]

Add a new feature to the ISA and return its assigned ID.

pub fn add_morpheme(&mut self, morpheme: Morpheme) -> MorphemeId[src]

Add a new morpheme to the ISA and return its assigned ID.

pub fn add_operand_mode(&mut self, operand_mode: OperandMode) -> OperandModeId[src]

Add a new operand mode to the ISA and return its assigned ID.

pub fn add_rule(&mut self, rule: Rule) -> RuleId[src]

Add a new rule to the ISA and return its assigned ID.

pub fn remove_feature(&mut self, id: FeatureId) -> Option<Feature>[src]

Remove a feature from the ISA, returning its data.

pub fn remove_morpheme(&mut self, id: MorphemeId) -> Option<Morpheme>[src]

Remove a morpheme from the ISA, returning its data.

pub fn remove_operand_mode(&mut self, id: OperandModeId) -> Option<OperandMode>[src]

Remove an operand mode from the ISA, returning its data.

pub fn remove_rule(&mut self, id: RuleId) -> Option<Rule>[src]

Remove a rule from the ISA, returning its data.

Trait Implementations

impl Seal for Isa[src]

impl Clone for Isa[src]

impl Debug for Isa[src]

Auto Trait Implementations

impl Send for Isa

impl Sync for Isa

impl Unpin for Isa

impl UnwindSafe for Isa

impl RefUnwindSafe for Isa

Blanket Implementations

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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> Borrow<T> for T where
    T: ?Sized
[src]

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

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