|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Lowers explicit IR into register-based bytecode. More...
#include <Bytecode.H>
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 |
Lowers explicit IR into register-based bytecode.
Definition at line 580 of file Bytecode.H.
|
inlineexplicitnoexcept |
Builds a bytecode lowerer over context.
Definition at line 759 of file Bytecode.H.
|
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().
|
inline |
Lowers one IR module to bytecode.
Definition at line 765 of file Bytecode.H.
References ah_runtime_error_unless, ctx, Aleph::Compiler_IR_Module::functions, Aleph::Compiler_Bytecode_Module::global_slots, lower_function(), Aleph::Compiler_Bytecode_Context::make(), and Aleph::Compiler_IR_Module::top_level.
|
private |
Definition at line 582 of file Bytecode.H.
Referenced by lower_function(), and lower_module().