pub struct ScoreContext<'lazy, 'sb: 'lazy, 'ast: 'sb, 'ctx: 'sb> {
    pub sess: &'lazy Session,
    pub global: &'lazy dyn GenericContext,
    pub sb: &'sb ScoreBoard<'ast, 'ctx>,
    pub lazy: &'lazy LazyPhaseTable<'sb, 'ast, 'ctx>,
}
Expand description

The VHDL context which holds information about the language scoreboard and the global scoreboard in its language-agnostic generic form. All useful operations are defined on this context rather than on the scoreboard directly, to decouple processing and ownership.

Fields

sess: &'lazy Session

The compiler session which carries the options and is used to emit diagnostics.

global: &'lazy dyn GenericContext

The global context.

sb: &'sb ScoreBoard<'ast, 'ctx>

The VHDL scoreboard.

lazy: &'lazy LazyPhaseTable<'sb, 'ast, 'ctx>

The table of scheduled operations.

Implementations

Unpack an AST expression.

Unpack an AST subtype indication.

Unpack a compound name as a type mark.

Unpack a compound name as a package name.

Unpack a compound name as a subprogram name.

Unpack a slice of AST declarative items into a list of items admissible in the declarative part of a block.

See IEEE 1076-2008 section 3.3.2.

Unpack a slice of AST declarative items into a list of items admissible in the declarative part of a process.

See IEEE 1076-2008 section 11.3.

Unpack a slice of AST declarative items into a list of items admissible in the declarative part of a subprogram.

See IEEE 1076-2008 section 4.3.

Unpack a slice of concurrent statements.

See IEEE 1076-2008 section 11.1.

Unpack a slice of sequential statements.

See IEEE 1076-2008 section 10.

Unpack a signal assignment target.

See IEEE 1076-2008 section 10.5.2.1.

Unpack a signal assignment mode.

See IEEE 1076-2008 section 10.5.

Unpack a delay mechanism.

See IEEE 1076-2008 section 10.5.2.1. If no mechanism is specified, inertial is assumed. Theoretically, the inertial transport mechanism is mapped to reject-inertial with the pulse rejection limit determined by the delay of the first element in the waveform. We don’t have that information readily available at this time, so we simply map to inertial and leave the resolution of this to stages further down the pipeline.

Unpack the the waves of a simple wave assignment.

Unpack a single waveform.

See IEEE 1076-2008 section 10.5.2.

Ensure that parenthesis contain only a list of expressions.

This is useful since the parser generally expects parenthesized expressions of the form (expr|expr|expr => expr, expr) even in palces where only (expr, expr) would be applicable. This function takes the parenthesized expression and ensures it is of the latter form.

Lower an AST subprogram specification to HIR.

Lower the name of an AST subprogram to HIR and perform checks.

Unpack generics from a list of interface declarations.

See IEEE 1076-2008 section 6.5.6.1.

Unpack a generic map from a parenthesized list of elements.

See IEEE 1076-2008 section 6.5.7.2.

Add a library of AST nodes. This function is called by the global scoreboard to add VHDL-specific AST nodes.

Obtain the span associated with a node ID.

Associate a span with a node ID.

Report a compiler bug associate with a node.

Obtain the AST node corresponding to a node reference. The AST node must have previously been added to the ast_table, otherwise this function panics.

Store an AST node in the scoreboard.

Obtain the HIR of a node, generating it if needed. Returns an error if the HIR cannot be generated.

Store the HIR of a node.

Obtain the HIR of a node. Returns an error if none exists.

Determine the HIR for a node.

If the HIR is already in the scoreboard, returns it immediately. Otherwise the lazy HIR table is triggered which will compute the HIR via the corresponding closure.

Determine the type of a node.

If called for the first time with the given id, calculates the type by calling self.make(id). Otherwise returns the existing information.

Check the type of a node.

If the node already had its type checked, immediately returns the result of that operation. Otherwise runs the task scheduled in the lazy table.

Determine the type of a node.

If the node already had its type determined, immediately returns the result of that operation. Otherwise runs the task scheduled in the lazy table.

Obtain the type context for an expression.

Returns None if no context information is available.

Obtain the type indicated by the type context for an expression.

Returns None if no context information is available.

Store a type context for an expression.

Upon type checking, the expression is likely to consult this context to determine its type.

Store a type context for an optional expression.

Upon type checking, the expression is likely to consult this context to determine its type. Does nothing if id.is_none().

Convert a primary name as it is present in the AST to a resolvable name that can be defined and resolved in a scope.

Resolve a name within a scope. Traverses to the parent scopes if nothing matching the name is found.

Resolve a compound name within a scope.

Get the builtin type standard.boolean.

Get the builtin type standard.time.

Get the builtin type standard.string.

Get the builtin type standard.severity.

Calculate the implicit default value for a type.

Internalize a constant.

See ScoreBoard::intern_const.

Internalize a type.

See ScoreBoard::intern_ty.

Map a VHDL type to the corresponding LLHD type.

Map a constant value to the LLHD counterpart.

Lookup a scope and perform an operation on it.

Create a subscope of another scope.

Define a new name in a scope.

Import a definition into a scope.

Import an entire scope into another scope.

Replace Ty::Named by the actual type definition recursively.

Trait Implementations

Emit a diagnostic message.

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Creates the node with the given ID. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.