|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Bytecode for one lowered function or top-level body. More...
#include <Bytecode.H>
Public Member Functions | |
| bool | is_top_level () const noexcept |
| Returns whether this bytecode function represents the top-level body. | |
Public Attributes | |
| Compiler_Bytecode_Function_Id | id = compiler_bytecode_invalid_id() |
| Stable function id within the module. | |
| std::string | name |
| Debug/source name. | |
| bool | top_level = false |
| Whether this function represents the top-level body. | |
| Source_Span | span |
| Source span of the function/body. | |
| Compiler_Type_Id | type_id = 0 |
| Full function type, when known. | |
| const Compiler_IR_Function * | source_function = nullptr |
| Original non-bytecode IR function. | |
| DynArray< Compiler_IR_Slot > | local_slots |
| Local/parameter slot metadata preserved for the VM. | |
| DynArray< Compiler_Bytecode_Constant > | constants |
| Per-function constant pool. | |
| DynArray< Compiler_Bytecode_Block_Info > | blocks |
| Debug mapping from blocks to PCs. | |
| DynArray< Compiler_Bytecode_Instruction > | code |
| Linear bytecode stream. | |
| Compiler_Bytecode_PC | entry_pc = compiler_bytecode_invalid_id() |
| Entry PC used to start execution. | |
| Compiler_Bytecode_PC | exit_pc = compiler_bytecode_invalid_id() |
| PC of the canonical exit instruction. | |
| size_t | register_count = 0 |
| Number of virtual registers required by the function. | |
Bytecode for one lowered function or top-level body.
Definition at line 221 of file Bytecode.H.
|
inlinenoexcept |
Returns whether this bytecode function represents the top-level body.
Definition at line 238 of file Bytecode.H.
References top_level.
| DynArray<Compiler_Bytecode_Block_Info> Aleph::Compiler_Bytecode_Function::blocks |
Debug mapping from blocks to PCs.
Definition at line 231 of file Bytecode.H.
Referenced by Aleph::compiler_dump_bytecode_function(), and Aleph::validate_bytecode_function().
| DynArray<Compiler_Bytecode_Instruction> Aleph::Compiler_Bytecode_Function::code |
Linear bytecode stream.
Definition at line 232 of file Bytecode.H.
Referenced by Aleph::compiler_dump_bytecode_function(), and Aleph::validate_bytecode_function().
| DynArray<Compiler_Bytecode_Constant> Aleph::Compiler_Bytecode_Function::constants |
Per-function constant pool.
Definition at line 230 of file Bytecode.H.
Referenced by Aleph::compiler_dump_bytecode_function().
| Compiler_Bytecode_PC Aleph::Compiler_Bytecode_Function::entry_pc = compiler_bytecode_invalid_id() |
Entry PC used to start execution.
Definition at line 233 of file Bytecode.H.
Referenced by Aleph::compiler_dump_bytecode_function(), Aleph::Compiler_Bytecode_VM::push_frame(), and Aleph::validate_bytecode_function().
| Compiler_Bytecode_PC Aleph::Compiler_Bytecode_Function::exit_pc = compiler_bytecode_invalid_id() |
PC of the canonical exit instruction.
Definition at line 234 of file Bytecode.H.
Referenced by Aleph::compiler_dump_bytecode_function(), and Aleph::validate_bytecode_function().
| Compiler_Bytecode_Function_Id Aleph::Compiler_Bytecode_Function::id = compiler_bytecode_invalid_id() |
Stable function id within the module.
Definition at line 223 of file Bytecode.H.
Referenced by Aleph::Compiler_Bytecode_Lowering::lower_function().
| DynArray<Compiler_IR_Slot> Aleph::Compiler_Bytecode_Function::local_slots |
Local/parameter slot metadata preserved for the VM.
Definition at line 229 of file Bytecode.H.
Referenced by Aleph::compiler_dump_bytecode_function(), and Aleph::Compiler_Bytecode_VM::push_frame().
| std::string Aleph::Compiler_Bytecode_Function::name |
Debug/source name.
Definition at line 224 of file Bytecode.H.
Referenced by Aleph::compiler_dump_bytecode_function(), Aleph::Compiler_Bytecode_VM::push_frame(), and Aleph::validate_bytecode_function().
| size_t Aleph::Compiler_Bytecode_Function::register_count = 0 |
Number of virtual registers required by the function.
Definition at line 235 of file Bytecode.H.
Referenced by Aleph::compiler_dump_bytecode_function(), and Aleph::Compiler_Bytecode_VM::push_frame().
| const Compiler_IR_Function* Aleph::Compiler_Bytecode_Function::source_function = nullptr |
Original non-bytecode IR function.
Definition at line 228 of file Bytecode.H.
| Source_Span Aleph::Compiler_Bytecode_Function::span |
Source span of the function/body.
Definition at line 226 of file Bytecode.H.
Whether this function represents the top-level body.
Definition at line 225 of file Bytecode.H.
Referenced by is_top_level().
| Compiler_Type_Id Aleph::Compiler_Bytecode_Function::type_id = 0 |
Full function type, when known.
Definition at line 227 of file Bytecode.H.
Referenced by Aleph::compiler_dump_bytecode_function().