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

CFG representation of a single function or top-level body. More...

#include <Compiler_CFG.H>

Collaboration diagram for Aleph::Compiler_CFG_Function:
[legend]

Public Member Functions

bool is_top_level () const noexcept
 Checks if this CFG represents the global top-level script.
 

Public Attributes

std::string name
 Function or script name.
 
Source_Span span
 Overall source span.
 
Compiler_Type_Id type_id = 0
 Return type or function type ID.
 
const Compiler_HIR_Function * source_function = nullptr
 Pointer to original HIR (null for top-level).
 
DynArray< Compiler_CFG_Block > blocks
 All basic blocks belonging to this function.
 
Compiler_CFG_Block_Id entry_block = compiler_cfg_invalid_block_id()
 Starting block ID.
 
Compiler_CFG_Block_Id exit_block = compiler_cfg_invalid_block_id()
 Canonical exit block ID.
 

Detailed Description

CFG representation of a single function or top-level body.

Organizes basic blocks into a directed graph.

Definition at line 162 of file Compiler_CFG.H.

Member Function Documentation

◆ is_top_level()

bool Aleph::Compiler_CFG_Function::is_top_level ( ) const
inlinenoexcept

Checks if this CFG represents the global top-level script.

Definition at line 173 of file Compiler_CFG.H.

References source_function.

Member Data Documentation

◆ blocks

DynArray<Compiler_CFG_Block> Aleph::Compiler_CFG_Function::blocks

◆ entry_block

◆ exit_block

◆ name

std::string Aleph::Compiler_CFG_Function::name

◆ source_function

const Compiler_HIR_Function* Aleph::Compiler_CFG_Function::source_function = nullptr

Pointer to original HIR (null for top-level).

Definition at line 167 of file Compiler_CFG.H.

Referenced by is_top_level(), and Aleph::Compiler_CFG_Lowering::lower_statement_sequence().

◆ span

Source_Span Aleph::Compiler_CFG_Function::span

◆ type_id

Compiler_Type_Id Aleph::Compiler_CFG_Function::type_id = 0

Return type or function type ID.

Definition at line 166 of file Compiler_CFG.H.

Referenced by Aleph::compiler_dump_cfg_function(), and Aleph::Compiler_CFG_Lowering::lower_statement_sequence().


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