Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::Compiler_IR_Instruction Struct Reference

One instruction producing an optional explicit result value. More...

#include <Compiler_IR_Model.H>

Collaboration diagram for Aleph::Compiler_IR_Instruction:
[legend]

Public Attributes

Compiler_IR_Instruction_Kind kind = Compiler_IR_Instruction_Kind::Constant
 Instruction category.
 
Compiler_IR_Value_Id result_id = 0
 Produced value id, or 0 for void instructions.
 
Compiler_Type_Id type_id = 0
 Result type or stored value type.
 
Source_Span span
 Source region associated with the instruction.
 
Compiler_Operator_Kind op = Compiler_Operator_Kind::Invalid
 Unary/binary operator kind, when relevant.
 
Compiler_IR_Local_Slot_Id local_slot_id = compiler_ir_invalid_id()
 Referenced local/parameter slot, when relevant.
 
Compiler_IR_Global_Slot_Id global_slot_id = compiler_ir_invalid_id()
 Referenced global slot, when relevant.
 
Compiler_IR_Function_Id function_id = compiler_ir_invalid_id()
 Referenced function id, when relevant.
 
DynArray< Compiler_IR_Value_Id > operands
 Input values in deterministic order.
 
std::string text
 Constant spelling or debug payload.
 
bool bool_value = false
 Decoded boolean payload for bool constants.
 

Detailed Description

One instruction producing an optional explicit result value.

Definition at line 178 of file Compiler_IR_Model.H.

Member Data Documentation

◆ bool_value

bool Aleph::Compiler_IR_Instruction::bool_value = false

Decoded boolean payload for bool constants.

Definition at line 195 of file Compiler_IR_Model.H.

◆ function_id

Compiler_IR_Function_Id Aleph::Compiler_IR_Instruction::function_id = compiler_ir_invalid_id()

Referenced function id, when relevant.

Definition at line 191 of file Compiler_IR_Model.H.

◆ global_slot_id

Compiler_IR_Global_Slot_Id Aleph::Compiler_IR_Instruction::global_slot_id = compiler_ir_invalid_id()

Referenced global slot, when relevant.

Definition at line 189 of file Compiler_IR_Model.H.

Referenced by Aleph::Compiler_IR_Lowering::Module_Builder::lower_expr(), and Aleph::Compiler_IR_Lowering::Module_Builder::lower_stmt().

◆ kind

◆ local_slot_id

Compiler_IR_Local_Slot_Id Aleph::Compiler_IR_Instruction::local_slot_id = compiler_ir_invalid_id()

Referenced local/parameter slot, when relevant.

Definition at line 187 of file Compiler_IR_Model.H.

Referenced by Aleph::Compiler_IR_Lowering::Module_Builder::lower_expr(), and Aleph::Compiler_IR_Lowering::Module_Builder::lower_stmt().

◆ op

Compiler_Operator_Kind Aleph::Compiler_IR_Instruction::op = Compiler_Operator_Kind::Invalid

Unary/binary operator kind, when relevant.

Definition at line 185 of file Compiler_IR_Model.H.

◆ operands

DynArray<Compiler_IR_Value_Id> Aleph::Compiler_IR_Instruction::operands

◆ result_id

Compiler_IR_Value_Id Aleph::Compiler_IR_Instruction::result_id = 0

Produced value id, or 0 for void instructions.

Definition at line 182 of file Compiler_IR_Model.H.

Referenced by Aleph::Compiler_IR_Lowering::Module_Builder::lower_expr().

◆ span

Source_Span Aleph::Compiler_IR_Instruction::span

Source region associated with the instruction.

Definition at line 184 of file Compiler_IR_Model.H.

Referenced by Aleph::Compiler_IR_Lowering::Module_Builder::lower_expr(), and Aleph::Compiler_IR_Lowering::Module_Builder::lower_stmt().

◆ text

std::string Aleph::Compiler_IR_Instruction::text

Constant spelling or debug payload.

Definition at line 194 of file Compiler_IR_Model.H.

◆ type_id

Compiler_Type_Id Aleph::Compiler_IR_Instruction::type_id = 0

The documentation for this struct was generated from the following file: