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

Lowers explicit IR into register-based bytecode. More...

#include <Bytecode.H>

Collaboration diagram for Aleph::Compiler_Bytecode_Lowering:
[legend]

Public Member Functions

 Compiler_Bytecode_Lowering (Compiler_Bytecode_Context &context) noexcept
 Builds a bytecode lowerer over context.
 
Compiler_Bytecode_Module * lower_module (const Compiler_IR_Module *module) const
 Lowers one IR module to bytecode.
 

Private Member Functions

Compiler_Bytecode_Function * lower_function (const Compiler_IR_Function &source, const bool top_level) const
 

Private Attributes

Compiler_Bytecode_Context * ctx = nullptr
 

Detailed Description

Lowers explicit IR into register-based bytecode.

Definition at line 580 of file Bytecode.H.

Constructor & Destructor Documentation

◆ Compiler_Bytecode_Lowering()

Aleph::Compiler_Bytecode_Lowering::Compiler_Bytecode_Lowering ( Compiler_Bytecode_Context &  context)
inlineexplicitnoexcept

Builds a bytecode lowerer over context.

Definition at line 759 of file Bytecode.H.

Member Function Documentation

◆ lower_function()

Compiler_Bytecode_Function * Aleph::Compiler_Bytecode_Lowering::lower_function ( const Compiler_IR_Function &  source,
const bool  top_level 
) const
inlineprivate

Definition at line 585 of file Bytecode.H.

References Aleph::DynArray< T >::access(), Aleph::DynArray< T >::append(), Aleph::Binary, Aleph::Compiler_IR_Function::blocks, Aleph::blossom_maximum_cardinality_matching(), Aleph::Branch, Aleph::Call, Aleph::Compiler_Bytecode_Detail::classify_constant(), Aleph::compiler_bytecode_invalid_id(), Aleph::compiler_ir_invalid_id(), Aleph::Compiler_SSA_Terminator::condition_value, Aleph::Constant, ctx, Aleph::Compiler_IR_Function::entry_block, Aleph::Exit, Aleph::Compiler_IR_Function::exit_block, Aleph::Compiler_Bytecode_Instruction::false_target_pc, Aleph::Function_Ref, Aleph::Halt, Aleph::Compiler_Bytecode_Block_Info::id, Aleph::Compiler_Bytecode_Function::id, Aleph::Compiler_IR_Function::id, Aleph::Compiler_SSA_Block::id, Aleph::Compiler_SSA_Block::instructions, Aleph::Compiler_Bytecode_Detail::intern_constant(), Aleph::DynArray< T >::is_empty(), Aleph::Jump, Aleph::Compiler_SSA_Terminator::kind, Aleph::Compiler_SSA_Block::label, Aleph::Load, Aleph::Load_Constant, Aleph::Load_Function, Aleph::Load_Global, Aleph::Load_Local, Aleph::Compiler_IR_Function::local_slots, Aleph::Compiler_Bytecode_Context::make(), Aleph::Compiler_IR_Function::name, Aleph::Compiler_IR_Function::next_value_id, Aleph::None, Aleph::Compiler_Bytecode_Instruction::opcode, Aleph::Compiler_Bytecode_Instruction::operands, Aleph::Compiler_Bytecode_Instruction::pc, Aleph::Return, Aleph::Compiler_SSA_Terminator::return_value, Aleph::DynArray< T >::size(), Aleph::Compiler_Bytecode_Instruction::span, Aleph::Compiler_IR_Function::span, Aleph::Compiler_SSA_Terminator::span, Aleph::Store, Aleph::Store_Global, Aleph::Store_Local, Aleph::Compiler_SSA_Terminator::successors, Aleph::Compiler_Bytecode_Instruction::target_pc, Aleph::Compiler_SSA_Block::terminator, Aleph::Trap, Aleph::Compiler_IR_Function::type_id, Aleph::Unary, and Aleph::Unreachable.

Referenced by lower_module().

◆ lower_module()

Compiler_Bytecode_Module * Aleph::Compiler_Bytecode_Lowering::lower_module ( const Compiler_IR_Module *  module) const
inline

Member Data Documentation

◆ ctx

Compiler_Bytecode_Context* Aleph::Compiler_Bytecode_Lowering::ctx = nullptr
private

Definition at line 582 of file Bytecode.H.

Referenced by lower_function(), and lower_module().


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