Skip to main content

QCodeView

Trait QCodeView 

Source
pub trait QCodeView<'ctx, 'str>: Copy
where 'str: 'ctx,
{
Show 23 methods // Required methods fn shared(self) -> &'ctx Shared<'str>; fn interface(self, id: FunctionId) -> &'ctx FunctionInterface<'str>; fn function(self, id: FunctionId) -> &'ctx FunctionBody<'str>; // Provided methods fn owner(self) -> Option<FunctionId> { ... } fn instruction(self, id: InstructionId) -> &'ctx Instruction<'str> { ... } fn contains_instruction(self, id: InstructionId) -> bool { ... } fn block(self, id: BlockId) -> &'ctx BasicBlock<'str> { ... } fn contains_block(self, id: BlockId) -> bool { ... } fn block_param(self, id: BlockParamId) -> &'ctx BlockParam<'str> { ... } fn contains_block_param(self, id: BlockParamId) -> bool { ... } fn edge(self, function: FunctionId, id: EdgeId) -> &'ctx EdgeData { ... } fn temp_space(self, id: TempSpaceId) -> &'ctx TempSpace { ... } fn contains_temp_space(self, id: TempSpaceId) -> bool { ... } fn temp(self, id: TempId) -> &'ctx Temp<'str> { ... } fn contains_temp(self, id: TempId) -> bool { ... } fn type_of(self, id: ValueId) -> TypeId { ... } fn stored_type_of(self, id: ValueId) -> Option<TypeId> { ... } fn block_ref(self, id: BlockId) -> BlockRef<'str, 'ctx, Self> where Self: Sized { ... } fn insn_ref(self, id: InstructionId) -> InstructionRef<'str, 'ctx, Self> where Self: Sized { ... } fn param_ref(self, id: BlockParamId) -> BlockParamRef<'str, 'ctx, Self> where Self: Sized { ... } fn function_ref(self, id: FunctionId) -> FunctionRef<'str, 'ctx, Self> where Self: Sized { ... } fn temp_space_ref(self, id: TempSpaceId) -> TempSpaceRef<'str, 'ctx, Self> where Self: Sized { ... } fn temp_ref(self, id: TempId) -> TempRef<'str, 'ctx, Self> where Self: Sized { ... }
}
Expand description

Read-only resolution capability shared by module and single-body views.

The explicit lifetimes let provider-generic refs return data with the provider’s underlying borrow lifetime, rather than tying results to a short borrow of the thin provider value.

Required Methods§

Source

fn shared(self) -> &'ctx Shared<'str>

Source

fn interface(self, id: FunctionId) -> &'ctx FunctionInterface<'str>

Source

fn function(self, id: FunctionId) -> &'ctx FunctionBody<'str>

Provided Methods§

Source

fn owner(self) -> Option<FunctionId>

The single function this view is scoped to, if any. A whole-module view returns None (it may read every function); a function-pass BodyView returns its owner, so callers can avoid a cross-function read that the locality guard would panic on (e.g. rendering a foreign SymbolicRef::Block falls back to the numeric form instead of resolving its name).

Source

fn instruction(self, id: InstructionId) -> &'ctx Instruction<'str>

Source

fn contains_instruction(self, id: InstructionId) -> bool

Source

fn block(self, id: BlockId) -> &'ctx BasicBlock<'str>

Source

fn contains_block(self, id: BlockId) -> bool

Source

fn block_param(self, id: BlockParamId) -> &'ctx BlockParam<'str>

Source

fn contains_block_param(self, id: BlockParamId) -> bool

Source

fn edge(self, function: FunctionId, id: EdgeId) -> &'ctx EdgeData

Source

fn temp_space(self, id: TempSpaceId) -> &'ctx TempSpace

Source

fn contains_temp_space(self, id: TempSpaceId) -> bool

Source

fn temp(self, id: TempId) -> &'ctx Temp<'str>

Source

fn contains_temp(self, id: TempId) -> bool

Source

fn type_of(self, id: ValueId) -> TypeId

Source

fn stored_type_of(self, id: ValueId) -> Option<TypeId>

Source

fn block_ref(self, id: BlockId) -> BlockRef<'str, 'ctx, Self>
where Self: Sized,

Source

fn insn_ref(self, id: InstructionId) -> InstructionRef<'str, 'ctx, Self>
where Self: Sized,

Source

fn param_ref(self, id: BlockParamId) -> BlockParamRef<'str, 'ctx, Self>
where Self: Sized,

Source

fn function_ref(self, id: FunctionId) -> FunctionRef<'str, 'ctx, Self>
where Self: Sized,

Source

fn temp_space_ref(self, id: TempSpaceId) -> TempSpaceRef<'str, 'ctx, Self>
where Self: Sized,

Source

fn temp_ref(self, id: TempId) -> TempRef<'str, 'ctx, Self>
where Self: Sized,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'ctx, 'str: 'ctx> QCodeView<'ctx, 'str> for BodyView<'ctx, 'str>

Source§

impl<'ctx, 'str: 'ctx> QCodeView<'ctx, 'str> for ModuleView<'ctx, 'str>