[−][src]Struct open_vaf::ir::hir::Hir
An High level (tree) IR representing a Verilog-AMS project; It provides stable indicies for every Node because the entire Tree is immutable once created; It uses preallocated constant size arrays for better performance Compared to an AST all references are resolved to their respective ids here and unnecessary constructs like blocks are ignored
Fields
parameters: IndexVec<ParameterId, AttributeNode<Parameter>>
branches: IndexVec<BranchId, AttributeNode<BranchDeclaration>>
nets: IndexVec<NetId, AttributeNode<Net>>
ports: IndexVec<PortId, Port>
variables: IndexVec<VariableId, AttributeNode<Variable>>
modules: IndexVec<ModuleId, AttributeNode<Module>>
functions: IndexVec<FunctionId, AttributeNode<Function>>
disciplines: IndexVec<DisciplineId, AttributeNode<Discipline>>
natures: IndexVec<NatureId, AttributeNode<Nature>>
expressions: IndexVec<ExpressionId, Node<Expression>>
attributes: IndexVec<AttributeId, Attribute>
statements: IndexVec<StatementId, Statement>
Implementations
impl Hir
[src]
pub fn lower(
self
) -> (Result<Mir, (Vec<Error<Type>>, Hir)>, Vec<Error<WarningType>>)
[src]
self
) -> (Result<Mir, (Vec<Error<Type>>, Hir)>, Vec<Error<WarningType>>)
Folds an hir to an mir by adding and checking type information Returns any errors that occur
pub fn lower_and_print_errors(
self,
source_map: &SourceMap,
translate_line: bool
) -> Option<Mir>
[src]
self,
source_map: &SourceMap,
translate_line: bool
) -> Option<Mir>
Folds an hir to an mir by adding and checking type information Prints any errors that occur
Trait Implementations
impl Index<AttributeId> for Hir
[src]
type Output = Attribute
The returned type after indexing.
fn index(&self, index: AttributeId) -> &Self::Output
[src]
impl Index<BranchId> for Hir
[src]
type Output = AttributeNode<BranchDeclaration>
The returned type after indexing.
fn index(&self, index: BranchId) -> &Self::Output
[src]
impl Index<DisciplineId> for Hir
[src]
type Output = AttributeNode<Discipline>
The returned type after indexing.
fn index(&self, index: DisciplineId) -> &Self::Output
[src]
impl Index<ExpressionId> for Hir
[src]
type Output = Node<Expression>
The returned type after indexing.
fn index(&self, index: ExpressionId) -> &Self::Output
[src]
impl Index<FunctionId> for Hir
[src]
type Output = AttributeNode<Function>
The returned type after indexing.
fn index(&self, index: FunctionId) -> &Self::Output
[src]
impl Index<IdRange<AttributeId>> for Hir
[src]
type Output = IndexSlice<AttributeId, [Attribute]>
The returned type after indexing.
fn index(&self, range: IdRange<AttributeId>) -> &Self::Output
[src]
impl Index<IdRange<BranchId>> for Hir
[src]
type Output = IndexSlice<BranchId, [AttributeNode<BranchDeclaration>]>
The returned type after indexing.
fn index(&self, range: IdRange<BranchId>) -> &Self::Output
[src]
impl Index<IdRange<DisciplineId>> for Hir
[src]
type Output = IndexSlice<DisciplineId, [AttributeNode<Discipline>]>
The returned type after indexing.
fn index(&self, range: IdRange<DisciplineId>) -> &Self::Output
[src]
impl Index<IdRange<ExpressionId>> for Hir
[src]
type Output = IndexSlice<ExpressionId, [Node<Expression>]>
The returned type after indexing.
fn index(&self, range: IdRange<ExpressionId>) -> &Self::Output
[src]
impl Index<IdRange<FunctionId>> for Hir
[src]
type Output = IndexSlice<FunctionId, [AttributeNode<Function>]>
The returned type after indexing.
fn index(&self, range: IdRange<FunctionId>) -> &Self::Output
[src]
impl Index<IdRange<ModuleId>> for Hir
[src]
type Output = IndexSlice<ModuleId, [AttributeNode<Module>]>
The returned type after indexing.
fn index(&self, range: IdRange<ModuleId>) -> &Self::Output
[src]
impl Index<IdRange<NatureId>> for Hir
[src]
type Output = IndexSlice<NatureId, [AttributeNode<Nature>]>
The returned type after indexing.
fn index(&self, range: IdRange<NatureId>) -> &Self::Output
[src]
impl Index<IdRange<NetId>> for Hir
[src]
type Output = IndexSlice<NetId, [AttributeNode<Net>]>
The returned type after indexing.
fn index(&self, range: IdRange<NetId>) -> &Self::Output
[src]
impl Index<IdRange<ParameterId>> for Hir
[src]
type Output = IndexSlice<ParameterId, [AttributeNode<Parameter>]>
The returned type after indexing.
fn index(&self, range: IdRange<ParameterId>) -> &Self::Output
[src]
impl Index<IdRange<PortId>> for Hir
[src]
type Output = IndexSlice<PortId, [Port]>
The returned type after indexing.
fn index(&self, range: IdRange<PortId>) -> &Self::Output
[src]
impl Index<IdRange<StatementId>> for Hir
[src]
type Output = IndexSlice<StatementId, [Statement]>
The returned type after indexing.
fn index(&self, range: IdRange<StatementId>) -> &Self::Output
[src]
impl Index<IdRange<VariableId>> for Hir
[src]
type Output = IndexSlice<VariableId, [AttributeNode<Variable>]>
The returned type after indexing.
fn index(&self, range: IdRange<VariableId>) -> &Self::Output
[src]
impl Index<ModuleId> for Hir
[src]
type Output = AttributeNode<Module>
The returned type after indexing.
fn index(&self, index: ModuleId) -> &Self::Output
[src]
impl Index<NatureId> for Hir
[src]
type Output = AttributeNode<Nature>
The returned type after indexing.
fn index(&self, index: NatureId) -> &Self::Output
[src]
impl Index<NetId> for Hir
[src]
type Output = AttributeNode<Net>
The returned type after indexing.
fn index(&self, index: NetId) -> &Self::Output
[src]
impl Index<ParameterId> for Hir
[src]
type Output = AttributeNode<Parameter>
The returned type after indexing.
fn index(&self, index: ParameterId) -> &Self::Output
[src]
impl Index<PortId> for Hir
[src]
type Output = Port
The returned type after indexing.
fn index(&self, index: PortId) -> &Self::Output
[src]
impl Index<Range<AttributeId>> for Hir
[src]
type Output = IndexSlice<AttributeId, [Attribute]>
The returned type after indexing.
fn index(&self, range: Range<AttributeId>) -> &Self::Output
[src]
impl Index<Range<BranchId>> for Hir
[src]
type Output = IndexSlice<BranchId, [AttributeNode<BranchDeclaration>]>
The returned type after indexing.
fn index(&self, range: Range<BranchId>) -> &Self::Output
[src]
impl Index<Range<DisciplineId>> for Hir
[src]
type Output = IndexSlice<DisciplineId, [AttributeNode<Discipline>]>
The returned type after indexing.
fn index(&self, range: Range<DisciplineId>) -> &Self::Output
[src]
impl Index<Range<ExpressionId>> for Hir
[src]
type Output = IndexSlice<ExpressionId, [Node<Expression>]>
The returned type after indexing.
fn index(&self, range: Range<ExpressionId>) -> &Self::Output
[src]
impl Index<Range<FunctionId>> for Hir
[src]
type Output = IndexSlice<FunctionId, [AttributeNode<Function>]>
The returned type after indexing.
fn index(&self, range: Range<FunctionId>) -> &Self::Output
[src]
impl Index<Range<ModuleId>> for Hir
[src]
type Output = IndexSlice<ModuleId, [AttributeNode<Module>]>
The returned type after indexing.
fn index(&self, range: Range<ModuleId>) -> &Self::Output
[src]
impl Index<Range<NatureId>> for Hir
[src]
type Output = IndexSlice<NatureId, [AttributeNode<Nature>]>
The returned type after indexing.
fn index(&self, range: Range<NatureId>) -> &Self::Output
[src]
impl Index<Range<NetId>> for Hir
[src]
type Output = IndexSlice<NetId, [AttributeNode<Net>]>
The returned type after indexing.
fn index(&self, range: Range<NetId>) -> &Self::Output
[src]
impl Index<Range<ParameterId>> for Hir
[src]
type Output = IndexSlice<ParameterId, [AttributeNode<Parameter>]>
The returned type after indexing.
fn index(&self, range: Range<ParameterId>) -> &Self::Output
[src]
impl Index<Range<PortId>> for Hir
[src]
type Output = IndexSlice<PortId, [Port]>
The returned type after indexing.
fn index(&self, range: Range<PortId>) -> &Self::Output
[src]
impl Index<Range<StatementId>> for Hir
[src]
type Output = IndexSlice<StatementId, [Statement]>
The returned type after indexing.
fn index(&self, range: Range<StatementId>) -> &Self::Output
[src]
impl Index<Range<VariableId>> for Hir
[src]
type Output = IndexSlice<VariableId, [AttributeNode<Variable>]>
The returned type after indexing.
fn index(&self, range: Range<VariableId>) -> &Self::Output
[src]
impl Index<StatementId> for Hir
[src]
type Output = Statement
The returned type after indexing.
fn index(&self, index: StatementId) -> &Self::Output
[src]
impl Index<VariableId> for Hir
[src]
type Output = AttributeNode<Variable>
The returned type after indexing.
fn index(&self, index: VariableId) -> &Self::Output
[src]
impl IndexMut<AttributeId> for Hir
[src]
fn index_mut(&mut self, index: AttributeId) -> &mut Self::Output
[src]
impl IndexMut<BranchId> for Hir
[src]
impl IndexMut<DisciplineId> for Hir
[src]
fn index_mut(&mut self, index: DisciplineId) -> &mut Self::Output
[src]
impl IndexMut<ExpressionId> for Hir
[src]
fn index_mut(&mut self, index: ExpressionId) -> &mut Self::Output
[src]
impl IndexMut<FunctionId> for Hir
[src]
fn index_mut(&mut self, index: FunctionId) -> &mut Self::Output
[src]
impl IndexMut<IdRange<AttributeId>> for Hir
[src]
fn index_mut(&mut self, range: IdRange<AttributeId>) -> &mut Self::Output
[src]
impl IndexMut<IdRange<BranchId>> for Hir
[src]
impl IndexMut<IdRange<DisciplineId>> for Hir
[src]
fn index_mut(&mut self, range: IdRange<DisciplineId>) -> &mut Self::Output
[src]
impl IndexMut<IdRange<ExpressionId>> for Hir
[src]
fn index_mut(&mut self, range: IdRange<ExpressionId>) -> &mut Self::Output
[src]
impl IndexMut<IdRange<FunctionId>> for Hir
[src]
fn index_mut(&mut self, range: IdRange<FunctionId>) -> &mut Self::Output
[src]
impl IndexMut<IdRange<ModuleId>> for Hir
[src]
impl IndexMut<IdRange<NatureId>> for Hir
[src]
impl IndexMut<IdRange<NetId>> for Hir
[src]
impl IndexMut<IdRange<ParameterId>> for Hir
[src]
fn index_mut(&mut self, range: IdRange<ParameterId>) -> &mut Self::Output
[src]
impl IndexMut<IdRange<PortId>> for Hir
[src]
impl IndexMut<IdRange<StatementId>> for Hir
[src]
fn index_mut(&mut self, range: IdRange<StatementId>) -> &mut Self::Output
[src]
impl IndexMut<IdRange<VariableId>> for Hir
[src]
fn index_mut(&mut self, range: IdRange<VariableId>) -> &mut Self::Output
[src]
impl IndexMut<ModuleId> for Hir
[src]
impl IndexMut<NatureId> for Hir
[src]
impl IndexMut<NetId> for Hir
[src]
impl IndexMut<ParameterId> for Hir
[src]
fn index_mut(&mut self, index: ParameterId) -> &mut Self::Output
[src]
impl IndexMut<PortId> for Hir
[src]
impl IndexMut<Range<AttributeId>> for Hir
[src]
fn index_mut(&mut self, range: Range<AttributeId>) -> &mut Self::Output
[src]
impl IndexMut<Range<BranchId>> for Hir
[src]
impl IndexMut<Range<DisciplineId>> for Hir
[src]
fn index_mut(&mut self, range: Range<DisciplineId>) -> &mut Self::Output
[src]
impl IndexMut<Range<ExpressionId>> for Hir
[src]
fn index_mut(&mut self, range: Range<ExpressionId>) -> &mut Self::Output
[src]
impl IndexMut<Range<FunctionId>> for Hir
[src]
fn index_mut(&mut self, range: Range<FunctionId>) -> &mut Self::Output
[src]
impl IndexMut<Range<ModuleId>> for Hir
[src]
impl IndexMut<Range<NatureId>> for Hir
[src]
impl IndexMut<Range<NetId>> for Hir
[src]
impl IndexMut<Range<ParameterId>> for Hir
[src]
fn index_mut(&mut self, range: Range<ParameterId>) -> &mut Self::Output
[src]
impl IndexMut<Range<PortId>> for Hir
[src]
impl IndexMut<Range<StatementId>> for Hir
[src]
fn index_mut(&mut self, range: Range<StatementId>) -> &mut Self::Output
[src]
impl IndexMut<Range<VariableId>> for Hir
[src]
fn index_mut(&mut self, range: Range<VariableId>) -> &mut Self::Output
[src]
impl IndexMut<StatementId> for Hir
[src]
fn index_mut(&mut self, index: StatementId) -> &mut Self::Output
[src]
impl IndexMut<VariableId> for Hir
[src]
fn index_mut(&mut self, index: VariableId) -> &mut Self::Output
[src]
Auto Trait Implementations
impl RefUnwindSafe for Hir
impl Send for Hir
impl Sync for Hir
impl Unpin for Hir
impl UnwindSafe for Hir
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,