[][src]Trait moore_svlog::QueryDatabase

pub trait QueryDatabase<'a> {
    type Context: Context<'a>;
    pub fn context(&self) -> &Self::Context;
pub fn storage(&self) -> &QueryStorage<'a>; pub fn handle_cycle(&self) -> ! { ... }
pub fn before_query(&self, tag: &QueryTag<'a>) { ... }
pub fn after_query(&self, tag: &QueryTag<'a>) { ... }
pub fn hir_of(&self, node_id: NodeId) -> Result<HirNode<'a>> { ... }
pub fn hir_of_module(&self, ast: &'a Module<'a>) -> Result<&'a Module<'a>> { ... }
pub fn hir_of_interface(
        &self,
        ast: &'a Interface<'a>
    ) -> Result<&'a Interface<'a>> { ... }
pub fn hir_of_expr(&self, arg0: Ref<'a, Expr<'a>>) -> Result<&'a Expr<'a>> { ... }
pub fn accessed_nodes(
        &self,
        node_id: NodeId,
        env: ParamEnv
    ) -> Result<Arc<AccessTable>> { ... }
pub fn inst_details(
        &self,
        arg0: Ref<'a, Inst<'a>>,
        env: ParamEnv
    ) -> Result<Arc<InstDetails<'a>>> { ... }
pub fn inst_target_details(
        &self,
        arg0: Ref<'a, InstTarget<'a>>,
        env: ParamEnv
    ) -> Result<Arc<InstTargetDetails<'a>>> { ... }
pub fn mir_assignment_from_procedural(
        &self,
        origin: NodeId,
        lhs: NodeId,
        rhs: NodeId,
        env: ParamEnv,
        span: Span,
        kind: AssignKind
    ) -> &'a Assignment<'a> { ... }
pub fn mir_assignment_from_concurrent(
        &self,
        arg0: Ref<'a, Assign>,
        env: ParamEnv
    ) -> &'a Assignment<'a> { ... }
pub fn mir_simplify_assignment(
        &self,
        arg0: Ref<'a, Assignment<'a>>
    ) -> Vec<&'a Assignment<'a>> { ... }
pub fn mir_lvalue(&self, expr_id: NodeId, env: ParamEnv) -> &'a Lvalue<'a> { ... }
pub fn mir_rvalue(&self, expr_id: NodeId, env: ParamEnv) -> &'a Rvalue<'a> { ... }
pub fn param_env(&self, src: ParamEnvSource<'a>) -> Result<ParamEnv> { ... }
pub fn map_pattern(
        &self,
        arg0: Ref<'a, Expr<'a>>,
        env: ParamEnv
    ) -> Result<Arc<PatternMapping<'a>>> { ... }
pub fn canonicalize_ports(
        &self,
        node: &'a dyn PortedNode<'a>
    ) -> &'a PortList<'a> { ... }
pub fn port_mapping(
        &self,
        node: &'a dyn PortedNode<'a>,
        outer_env: ParamEnv,
        inner_env: ParamEnv,
        arg3: Ref<'a, InstName<'a>>,
        pos: &'a [PosParam],
        named: &'a [NamedParam],
        has_wildcard_port: bool
    ) -> Result<Arc<PortMapping<'a>>> { ... }
pub fn local_rib(&self, node_id: NodeId) -> Result<&'a Rib> { ... }
pub fn hierarchical_rib(&self, node_id: NodeId) -> Result<&'a Rib> { ... }
pub fn resolve_upwards(
        &self,
        name: Name,
        start_at: NodeId
    ) -> Result<Option<NodeId>> { ... }
pub fn resolve_downwards(
        &self,
        name: Name,
        start_at: NodeId
    ) -> Result<Option<NodeId>> { ... }
pub fn resolve_node(&self, node_id: NodeId, env: ParamEnv) -> Result<NodeId> { ... }
pub fn struct_def(&self, node_id: NodeId) -> Result<Arc<StructDef>> { ... }
pub fn resolve_field_access(
        &self,
        node_id: NodeId,
        env: ParamEnv
    ) -> Result<(usize, &'a StructMember<'a>)> { ... }
pub fn generated_scope(&self, node: &'a dyn ScopedNode<'a>) -> &'a Scope<'a> { ... }
pub fn scope_location(&self, node: &'a dyn AnyNode<'a>) -> ScopeLocation<'a> { ... }
pub fn resolve_local(
        &self,
        name: Name,
        at: ScopeLocation<'a>,
        skip_imports: bool
    ) -> Result<Option<&'a Def<'a>>> { ... }
pub fn resolve_local_or_error(
        &self,
        name: Spanned<Name>,
        at: ScopeLocation<'a>,
        skip_imports: bool
    ) -> Result<&'a Def<'a>> { ... }
pub fn resolve_namespace(
        &self,
        name: Name,
        inside: &'a dyn ScopedNode<'a>
    ) -> Option<&'a Def<'a>> { ... }
pub fn resolve_namespace_or_error(
        &self,
        name: Spanned<Name>,
        inside: &'a dyn ScopedNode<'a>
    ) -> Result<&'a Def<'a>> { ... }
pub fn resolve_hierarchical(
        &self,
        name: Name,
        inside: &'a dyn ScopedNode<'a>
    ) -> Option<&'a Def<'a>> { ... }
pub fn resolve_hierarchical_or_error(
        &self,
        name: Spanned<Name>,
        inside: &'a dyn ScopedNode<'a>
    ) -> Result<&'a Def<'a>> { ... }
pub fn resolve_imported_scope(
        &self,
        node: &'a ImportItem<'a>
    ) -> Result<&'a dyn ScopedNode<'a>> { ... }
pub fn nameck(&self, node: &'a dyn AnyNode<'a>) -> bool { ... }
pub fn resolve_inst_target(
        &self,
        inst: &'a Inst<'a>
    ) -> Result<InstTarget<'a>> { ... }
pub fn disamb_kind(&self, arg0: Ref<'a, dyn AnyNode<'a>>) -> Kind { ... }
pub fn disamb_type_or_expr(
        &self,
        arg0: Ref<'a, TypeOrExpr<'a>>
    ) -> Result<&'a TypeOrExpr<'a>> { ... }
pub fn type_of(
        &self,
        node_id: NodeId,
        env: ParamEnv
    ) -> Result<&'a UnpackedType<'a>> { ... }
pub fn type_of_int_port(
        &self,
        arg0: Ref<'a, IntPort<'a>>,
        env: ParamEnv
    ) -> &'a UnpackedType<'a> { ... }
pub fn type_of_ext_port(
        &self,
        arg0: Ref<'a, ExtPort<'a>>,
        env: ParamEnv
    ) -> &'a UnpackedType<'a> { ... }
pub fn type_of_port_decl(
        &self,
        arg0: Ref<'a, VarDeclName<'a>>,
        env: ParamEnv
    ) -> &'a UnpackedType<'a> { ... }
pub fn type_of_var_decl(
        &self,
        arg0: Ref<'a, VarDeclName<'a>>,
        env: ParamEnv
    ) -> &'a UnpackedType<'a> { ... }
pub fn type_of_net_decl(
        &self,
        arg0: Ref<'a, VarDeclName<'a>>,
        env: ParamEnv
    ) -> &'a UnpackedType<'a> { ... }
pub fn type_of_struct_member(
        &self,
        arg0: Ref<'a, VarDeclName<'a>>,
        env: ParamEnv
    ) -> &'a UnpackedType<'a> { ... }
pub fn type_of_value_param(
        &self,
        arg0: Ref<'a, ParamValueDecl<'a>>,
        env: ParamEnv
    ) -> &'a UnpackedType<'a> { ... }
pub fn type_of_inst(
        &self,
        arg0: Ref<'a, Inst<'a>>,
        env: ParamEnv
    ) -> &'a UnpackedType<'a> { ... }
pub fn map_to_type(
        &self,
        arg0: Ref<'a, dyn AnyNode<'a>>,
        env: ParamEnv
    ) -> Option<&'a UnpackedType<'a>> { ... }
pub fn map_to_type_or_error(
        &self,
        ast: Ref<'a, dyn AnyNode<'a>>,
        env: ParamEnv
    ) -> &'a UnpackedType<'a> { ... }
pub fn packed_type_from_ast(
        &self,
        ast: Ref<'a, Type<'a>>,
        env: ParamEnv,
        implicit_default: Option<PackedCore<'a>>
    ) -> &'a UnpackedType<'a> { ... }
pub fn unpacked_type_from_ast(
        &self,
        ast_type: Ref<'a, Type<'a>>,
        arg1: Ref<'a, [TypeDim<'a>]>,
        env: ParamEnv,
        implicit_default: Option<PackedCore<'a>>
    ) -> &'a UnpackedType<'a> { ... }
pub fn type_of_expr(
        &self,
        expr: Ref<'a, Expr<'a>>,
        env: ParamEnv
    ) -> &'a UnpackedType<'a> { ... }
pub fn cast_type(
        &self,
        node_id: NodeId,
        env: ParamEnv
    ) -> Option<CastType<'a>> { ... }
pub fn cast_expr_type(
        &self,
        arg0: Ref<'a, Expr<'a>>,
        env: ParamEnv
    ) -> CastType<'a> { ... }
pub fn self_determined_type(
        &self,
        node_id: NodeId,
        env: ParamEnv
    ) -> Option<&'a UnpackedType<'a>> { ... }
pub fn need_self_determined_type(
        &self,
        node_id: NodeId,
        env: ParamEnv
    ) -> &'a UnpackedType<'a> { ... }
pub fn operation_type(
        &self,
        node_id: NodeId,
        env: ParamEnv
    ) -> Option<&'a UnpackedType<'a>> { ... }
pub fn need_operation_type(
        &self,
        node_id: NodeId,
        env: ParamEnv
    ) -> &'a UnpackedType<'a> { ... }
pub fn type_context(
        &self,
        onto: NodeId,
        env: ParamEnv
    ) -> Option<TypeContext<'a>> { ... }
pub fn need_type_context(
        &self,
        node_id: NodeId,
        env: ParamEnv
    ) -> TypeContext<'a> { ... }
pub fn constant_value_of(&self, node_id: NodeId, env: ParamEnv) -> Value<'a> { ... }
pub fn const_mir_rvalue_int(
        &self,
        mir: Ref<'a, Rvalue<'a>>
    ) -> Result<&'a BigInt> { ... }
pub fn const_mir_rvalue_string(
        &self,
        mir: Ref<'a, Rvalue<'a>>
    ) -> Result<&'a Vec<u8>> { ... }
pub fn const_mir_rvalue(&self, arg0: Ref<'a, Rvalue<'a>>) -> Value<'a> { ... }
pub fn is_constant(&self, node_id: NodeId) -> Result<bool> { ... }
pub fn type_default_value(&self, ty: &'a UnpackedType<'a>) -> Value<'a> { ... } }

A collection of compiler queries.

Associated Types

type Context: Context<'a>[src]

The type passed as first argument to compiler query implementations.

Loading content...

Required methods

pub fn context(&self) -> &Self::Context[src]

Get the context that is passed to compiler query implementations.

pub fn storage(&self) -> &QueryStorage<'a>[src]

Get the query caches and runtime data.

Loading content...

Provided methods

pub fn handle_cycle(&self) -> ![src]

Called when a query cycle is detected.

pub fn before_query(&self, tag: &QueryTag<'a>)[src]

Called before a query is executed.

pub fn after_query(&self, tag: &QueryTag<'a>)[src]

Called after a query is executed.

pub fn hir_of(&self, node_id: NodeId) -> Result<HirNode<'a>>[src]

Lower an AST node to HIR.

pub fn hir_of_module(&self, ast: &'a Module<'a>) -> Result<&'a Module<'a>>[src]

Lower a module to HIR.

pub fn hir_of_interface(
    &self,
    ast: &'a Interface<'a>
) -> Result<&'a Interface<'a>>
[src]

Lower an interface to HIR.

pub fn hir_of_expr(&self, arg0: Ref<'a, Expr<'a>>) -> Result<&'a Expr<'a>>[src]

Lower an AST expression to HIR.

pub fn accessed_nodes(
    &self,
    node_id: NodeId,
    env: ParamEnv
) -> Result<Arc<AccessTable>>
[src]

Determine the nodes accessed by another node.

pub fn inst_details(
    &self,
    arg0: Ref<'a, Inst<'a>>,
    env: ParamEnv
) -> Result<Arc<InstDetails<'a>>>
[src]

Compute the details of an instantiation.

pub fn inst_target_details(
    &self,
    arg0: Ref<'a, InstTarget<'a>>,
    env: ParamEnv
) -> Result<Arc<InstTargetDetails<'a>>>
[src]

Compute the details of an instantiated module or interface.

pub fn mir_assignment_from_procedural(
    &self,
    origin: NodeId,
    lhs: NodeId,
    rhs: NodeId,
    env: ParamEnv,
    span: Span,
    kind: AssignKind
) -> &'a Assignment<'a>
[src]

Lower a procedural assign statement.

pub fn mir_assignment_from_concurrent(
    &self,
    arg0: Ref<'a, Assign>,
    env: ParamEnv
) -> &'a Assignment<'a>
[src]

Lower a concurrent assign statement.

pub fn mir_simplify_assignment(
    &self,
    arg0: Ref<'a, Assignment<'a>>
) -> Vec<&'a Assignment<'a>>
[src]

Simplify an MIR assignment to potentially multiple simple MIR assignments.

This eliminates assignments to compound Lvalue objects, for example concatenations, and replaces them with multiple assignments to each of the individual concatenation fields.

pub fn mir_lvalue(&self, expr_id: NodeId, env: ParamEnv) -> &'a Lvalue<'a>[src]

Lower an expression to an lvalue in the MIR.

pub fn mir_rvalue(&self, expr_id: NodeId, env: ParamEnv) -> &'a Rvalue<'a>[src]

Lower an expression to an rvalue in the MIR.

pub fn param_env(&self, src: ParamEnvSource<'a>) -> Result<ParamEnv>[src]

Compute the parameter bindings for an instantiation.

pub fn map_pattern(
    &self,
    arg0: Ref<'a, Expr<'a>>,
    env: ParamEnv
) -> Result<Arc<PatternMapping<'a>>>
[src]

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

pub fn canonicalize_ports(
    &self,
    node: &'a dyn PortedNode<'a>
) -> &'a PortList<'a>
[src]

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

This is a fairly complex process due to the many degrees of freedom in SV. Mainly we identify if the item uses an ANSI or non-ANSI style and then go ahead and create the external and internal views of the ports.

pub fn port_mapping(
    &self,
    node: &'a dyn PortedNode<'a>,
    outer_env: ParamEnv,
    inner_env: ParamEnv,
    arg3: Ref<'a, InstName<'a>>,
    pos: &'a [PosParam],
    named: &'a [NamedParam],
    has_wildcard_port: bool
) -> Result<Arc<PortMapping<'a>>>
[src]

Compute the port assignments for an instantiation.

pub fn local_rib(&self, node_id: NodeId) -> Result<&'a Rib>[src]

Determine the local rib that applies to a node.

This will return either the rib the node itself generates, or the next rib up the hierarchy.

pub fn hierarchical_rib(&self, node_id: NodeId) -> Result<&'a Rib>[src]

Determine the hierarchical rib of a node.

This will return a rib containing the hierarchical names exposed by a node.

pub fn resolve_upwards(
    &self,
    name: Name,
    start_at: NodeId
) -> Result<Option<NodeId>>
[src]

Resolve a name upwards through the ribs.

This is equivalent to performing regular scoped namespace lookup.

pub fn resolve_downwards(
    &self,
    name: Name,
    start_at: NodeId
) -> Result<Option<NodeId>>
[src]

Resolve a name downwards.

This is equivalent to performing a hierarchical name lookup.

pub fn resolve_node(&self, node_id: NodeId, env: ParamEnv) -> Result<NodeId>[src]

Resolve a node to its target.

pub fn struct_def(&self, node_id: NodeId) -> Result<Arc<StructDef>>[src]

Obtain the details of a struct definition.

pub fn resolve_field_access(
    &self,
    node_id: NodeId,
    env: ParamEnv
) -> Result<(usize, &'a StructMember<'a>)>
[src]

Resolve the field name in a field access expression.

Returns the index of the field that is actually being accessed, and a reference to the member itself.

pub fn generated_scope(&self, node: &'a dyn ScopedNode<'a>) -> &'a Scope<'a>[src]

Determine the scope generated by a node.

pub fn scope_location(&self, node: &'a dyn AnyNode<'a>) -> ScopeLocation<'a>[src]

Determine the location of a node within its enclosing scope.

pub fn resolve_local(
    &self,
    name: Name,
    at: ScopeLocation<'a>,
    skip_imports: bool
) -> Result<Option<&'a Def<'a>>>
[src]

Resolve a local name in a scope.

This traverses up the scope tree until a definition with visibility LOCAL is found. Returns None if no such name exists.

pub fn resolve_local_or_error(
    &self,
    name: Spanned<Name>,
    at: ScopeLocation<'a>,
    skip_imports: bool
) -> Result<&'a Def<'a>>
[src]

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

Calls resolve_local. Either returns Ok if a node was found, or Err after emitting a diagnostic error message.

pub fn resolve_namespace(
    &self,
    name: Name,
    inside: &'a dyn ScopedNode<'a>
) -> Option<&'a Def<'a>>
[src]

Resolve a name in a scope as a namespace lookup.

This checks if the scope contains a definition with visibility NAMESPACE. Returns None if no such name exists.

pub fn resolve_namespace_or_error(
    &self,
    name: Spanned<Name>,
    inside: &'a dyn ScopedNode<'a>
) -> Result<&'a Def<'a>>
[src]

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

Calls resolve_namespace. Either returns Ok if a node was found, or Err after emitting a diagnostic error message.

pub fn resolve_hierarchical(
    &self,
    name: Name,
    inside: &'a dyn ScopedNode<'a>
) -> Option<&'a Def<'a>>
[src]

Resolve a name in a scope as a hierarchical lookup.

This checks if the scope contains a definition with visibility HIERARCHICAL. Returns None if no such name exists.

pub fn resolve_hierarchical_or_error(
    &self,
    name: Spanned<Name>,
    inside: &'a dyn ScopedNode<'a>
) -> Result<&'a Def<'a>>
[src]

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

Calls resolve_hierarchical. Either returns Ok if a node was found, or Err after emitting a diagnostic error message.

pub fn resolve_imported_scope(
    &self,
    node: &'a ImportItem<'a>
) -> Result<&'a dyn ScopedNode<'a>>
[src]

Resolve an import to the scope it imports.

This function emits a diagnostic if the target of the import has no scope. Being a query, this ensures that the error is only produced once.

pub fn nameck(&self, node: &'a dyn AnyNode<'a>) -> bool[src]

Recursively resolves names throughout the AST.

Returns true if all names resolved successfully, false otherwise. This function helps in triggering name resolution errors at a defined point in the compilation.

pub fn resolve_inst_target(&self, inst: &'a Inst<'a>) -> Result<InstTarget<'a>>[src]

Resolve the target of an instantiation.

pub fn disamb_kind(&self, arg0: Ref<'a, dyn AnyNode<'a>>) -> Kind[src]

Determine the kind of a node.

pub fn disamb_type_or_expr(
    &self,
    arg0: Ref<'a, TypeOrExpr<'a>>
) -> Result<&'a TypeOrExpr<'a>>
[src]

Disambiguate a type or expression.

pub fn type_of(
    &self,
    node_id: NodeId,
    env: ParamEnv
) -> Result<&'a UnpackedType<'a>>
[src]

Determine the type of a node.

pub fn type_of_int_port(
    &self,
    arg0: Ref<'a, IntPort<'a>>,
    env: ParamEnv
) -> &'a UnpackedType<'a>
[src]

Determine the type of an internal port.

pub fn type_of_ext_port(
    &self,
    arg0: Ref<'a, ExtPort<'a>>,
    env: ParamEnv
) -> &'a UnpackedType<'a>
[src]

Determine the type of an external port.

pub fn type_of_port_decl(
    &self,
    arg0: Ref<'a, VarDeclName<'a>>,
    env: ParamEnv
) -> &'a UnpackedType<'a>
[src]

Determine the type of a port declaration.

pub fn type_of_var_decl(
    &self,
    arg0: Ref<'a, VarDeclName<'a>>,
    env: ParamEnv
) -> &'a UnpackedType<'a>
[src]

Determine the type of a variable declaration.

pub fn type_of_net_decl(
    &self,
    arg0: Ref<'a, VarDeclName<'a>>,
    env: ParamEnv
) -> &'a UnpackedType<'a>
[src]

Determine the type of a net declaration.

pub fn type_of_struct_member(
    &self,
    arg0: Ref<'a, VarDeclName<'a>>,
    env: ParamEnv
) -> &'a UnpackedType<'a>
[src]

Determine the type of a struct member.

pub fn type_of_value_param(
    &self,
    arg0: Ref<'a, ParamValueDecl<'a>>,
    env: ParamEnv
) -> &'a UnpackedType<'a>
[src]

Determine the type of a value parameter.

pub fn type_of_inst(
    &self,
    arg0: Ref<'a, Inst<'a>>,
    env: ParamEnv
) -> &'a UnpackedType<'a>
[src]

Determine the type of an instance.

pub fn map_to_type(
    &self,
    arg0: Ref<'a, dyn AnyNode<'a>>,
    env: ParamEnv
) -> Option<&'a UnpackedType<'a>>
[src]

Map an AST node to the type it represents.

Returns None if the given AST node does not evaluate to a type.

pub fn map_to_type_or_error(
    &self,
    ast: Ref<'a, dyn AnyNode<'a>>,
    env: ParamEnv
) -> &'a UnpackedType<'a>
[src]

Map an AST node to the type it represents.

Returns None if the given AST node does not evaluate to a type.

pub fn packed_type_from_ast(
    &self,
    ast: Ref<'a, Type<'a>>,
    env: ParamEnv,
    implicit_default: Option<PackedCore<'a>>
) -> &'a UnpackedType<'a>
[src]

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

This is the first half of type computation, and is concerned with the type information that is usually carried on the left of a declaration name. In a separate step, the declarations extend this packed type with the unpacked dimensions provided on the right of the declaration name.

Note that this function nevertheless returns an UnpackedType, since the AST can contain types like string and event, which don't map to the PackedType struct.

If an implicit default is present, implicit types are expanded to that core type. Otherwise the mapping fails with a diagnostic.

pub fn unpacked_type_from_ast(
    &self,
    ast_type: Ref<'a, Type<'a>>,
    arg1: Ref<'a, [TypeDim<'a>]>,
    env: ParamEnv,
    implicit_default: Option<PackedCore<'a>>
) -> &'a UnpackedType<'a>
[src]

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

This is the second half of type computation. Maps the given type to a packed type first, then applies the given dimensions as unpacked dimensions.

If an implicit default is present, implicit types are expanded to that core type. Otherwise the mapping fails with a diagnostic.

pub fn type_of_expr(
    &self,
    expr: Ref<'a, Expr<'a>>,
    env: ParamEnv
) -> &'a UnpackedType<'a>
[src]

Determine the type of an expression.

pub fn cast_type(&self, node_id: NodeId, env: ParamEnv) -> Option<CastType<'a>>[src]

Get the cast type of a node.

pub fn cast_expr_type(
    &self,
    arg0: Ref<'a, Expr<'a>>,
    env: ParamEnv
) -> CastType<'a>
[src]

Get the cast type of an expression.

pub fn self_determined_type(
    &self,
    node_id: NodeId,
    env: ParamEnv
) -> Option<&'a UnpackedType<'a>>
[src]

Get the self-determined type of a node.

pub fn need_self_determined_type(
    &self,
    node_id: NodeId,
    env: ParamEnv
) -> &'a UnpackedType<'a>
[src]

Require a node to have a self-determined type.

Emits an error if the node has no self-determined type.

pub fn operation_type(
    &self,
    node_id: NodeId,
    env: ParamEnv
) -> Option<&'a UnpackedType<'a>>
[src]

Get the operation type of an expression.

pub fn need_operation_type(
    &self,
    node_id: NodeId,
    env: ParamEnv
) -> &'a UnpackedType<'a>
[src]

Require a node to have an operation type.

Emits an error if the node has no operation type.

pub fn type_context(
    &self,
    onto: NodeId,
    env: ParamEnv
) -> Option<TypeContext<'a>>
[src]

Get the type context of a node.

pub fn need_type_context(
    &self,
    node_id: NodeId,
    env: ParamEnv
) -> TypeContext<'a>
[src]

Get the type context of a node.

pub fn constant_value_of(&self, node_id: NodeId, env: ParamEnv) -> Value<'a>[src]

Determine the constant value of a node.

pub fn const_mir_rvalue_int(
    &self,
    mir: Ref<'a, Rvalue<'a>>
) -> Result<&'a BigInt>
[src]

Determine the constant integer value of an MIR rvalue.

Emits a diagnostic if the value is not an integer.

pub fn const_mir_rvalue_string(
    &self,
    mir: Ref<'a, Rvalue<'a>>
) -> Result<&'a Vec<u8>>
[src]

Determine the constant string value of an MIR rvalue.

Emits a diagnostic if the value is not a string.

pub fn const_mir_rvalue(&self, arg0: Ref<'a, Rvalue<'a>>) -> Value<'a>[src]

Determine the constant value of an MIR rvalue.

pub fn is_constant(&self, node_id: NodeId) -> Result<bool>[src]

Check if a node has a constant value.

pub fn type_default_value(&self, ty: &'a UnpackedType<'a>) -> Value<'a>[src]

Determine the default value of a type.

Loading content...

Implementors

impl<'gcx> QueryDatabase<'gcx> for GlobalContext<'gcx>[src]

type Context = Self

Loading content...