Struct moore_svlog::GlobalContext[][src]

pub struct GlobalContext<'gcx> {
    pub sess: &'gcx Session,
    pub arena: &'gcx GlobalArenas<'gcx>,
    // some fields omitted
}
Expand description

The central data structure of the compiler. It stores references to various arenas and tables that store the results of the various computations that have been performed.

Fields

sess: &'gcx Session

The global compiler session.

arena: &'gcx GlobalArenas<'gcx>

The arena that owns all references.

Implementations

Create a new global context.

Add an AST root to the context for processing.

Use the find_global_item function afterwards to look up the id of modules that were added.

Add an AST root with a series of source files to the context for processing.

Find a module in the AST.

Get an iterator over all modules in the AST.

Find a package in the AST.

Get an iterator over all root imports in the AST.

Trait Implementations

Get the global context.

Get the compiler session.

Access the arena into which values are to be allocated.

Access the tables.

Emit an internal compiler error that a node is not implemented.

Emit an internal compiler error and message that a node is not implemented. Same as [unimp], but the caller can provide a message prefix. Read more

Allocate a new node id. Read more

Return the diagnostic span associated with a ndoe id.

Associate a span with a node id.

Associate an AST node with a node id.

Allocate a node id for an AST node and associate that id with the node.

Call [map_ast] and [set_parent].

Obtain the AST node associated with a node id.

Register an ast::AnyNode for later retrieval by ID.

Obtain an ast::AnyNode associated with a node id.

Internalize an HIR node.

Internalize an HIR node.

Lookup an internalized HIR node.

Lookup an internalized HIR node.

Internalize a value.

Internalize a parameter environment.

Get the ParamEnvData associated with a ParamEnv.

Get the default parameter environment. Read more

Associate a context with a param env. Read more

Get the contexts associated with a parameter environment. Read more

Associate a parent with a node. Read more

Find the parent node of a node. Read more

Check if a node is the parent of another.

Resolve a name upwards or emit a diagnostic if nothing is found.

Resolve a name downwards or emit a diagnostic if nothing is found.

Set a lowering hint on a node.

Get a lowering hint on a node.

Compute the constant value of a node and make sure it is an integer.

Emit a diagnostic message.

Get the type storage.

The type passed as first argument to compiler query implementations. Read more

Get the context that is passed to compiler query implementations. Read more

Get the query caches and runtime data.

Called when a query cycle is detected.

Called before a query is executed.

Called after a query is executed.

Lower an AST node to HIR.

Lower a module to HIR.

Lower an interface to HIR.

Lower an AST expression to HIR.

Determine the nodes accessed by another node.

Compute the details of an instantiation.

Compute the details of an instantiated module or interface.

Lower a procedural assign statement.

Lower a concurrent assign statement.

Simplify an MIR assignment to potentially multiple simple MIR assignments. Read more

Lower an expression to an lvalue in the MIR.

Lower an expression to an rvalue in the MIR.

Compute the parameter bindings for an instantiation.

Determine the mapping of a named or positional '{...} pattern.

Resolve the ports of a module or interface to a canonical list. Read more

Compute the port assignments for an instantiation.

Determine the local rib that applies to a node. Read more

Determine the hierarchical rib of a node. Read more

Resolve a name upwards through the ribs. Read more

Resolve a name downwards. Read more

Resolve a node to its target.

Obtain the details of a struct definition.

Resolve the field name in a field access expression. Read more

Determine the scope generated by a node.

Determine the location of a node within its enclosing scope.

Resolve a local name in a scope. Read more

Resolve a local name in a scope or emit an error. Read more

Resolve a name in a scope as a namespace lookup. Read more

Resolve a name in a scope as a namespace lookup or emit an error. Read more

Resolve a name in a scope as a hierarchical lookup. Read more

Resolve a name in a scope as a hierarchical lookup or emit an error. Read more

Resolve an import to the scope it imports. Read more

Recursively resolves names throughout the AST. Read more

Resolve the target of an instantiation.

Determine the kind of a node.

Disambiguate a type or expression.

Determine the type of a node.

Determine the type of an internal port.

Determine the type of an external port.

Determine the type of a port declaration.

Determine the type of a variable declaration.

Determine the type of a net declaration.

Determine the type of a struct member.

Determine the type of a value parameter.

Determine the type of an instance.

Map an AST node to the type it represents. Read more

Map an AST node to the type it represents. Read more

Map a type node in the AST to an packed type. Read more

Map a type node and unpacked dimensions in the AST to an unpacked type. Read more

Determine the type of an expression.

Get the cast type of a node.

Get the cast type of an expression.

Get the self-determined type of a node.

Require a node to have a self-determined type. Read more

Get the operation type of an expression.

Require a node to have an operation type. Read more

Get the type context of a node.

Get the type context of a node.

Determine the constant value of a node.

Determine the constant integer value of an MIR rvalue. Read more

Determine the constant string value of an MIR rvalue. Read more

Determine the constant value of an MIR rvalue.

Check if a node has a constant value.

Determine the default value of a type.

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.

Internalize a packed type.

Internalize an unpacked type.