|
Mana
|
#include <CodeGenerator.h>
Public Member Functions | |
| CodeGenerator ()=delete | |
| CodeGenerator (const std::shared_ptr< CodeBuffer > &codeBuffer, const std::shared_ptr< DataBuffer > &dataBuffer, const std::shared_ptr< GlobalSemanticAnalyzer > &globalSemanticAnalyzer, const std::shared_ptr< LocalSemanticAnalyzer > &localSemanticAnalyzer, const std::shared_ptr< SymbolFactory > &symbolFactory, const std::shared_ptr< TypeDescriptorFactory > &typeDescriptorFactory) | |
| void | GenerateCode (std::shared_ptr< SyntaxNode > node, const int32_t enableLoad) |
| void | Expression (const std::shared_ptr< SyntaxNode > &tree, const int32_t enableAssign) |
| const std::shared_ptr< GlobalAddressResolver > & | GetGlobalAddressResolver () |
| const std::shared_ptr< LocalAddressResolver > & | GetLocalAddressResolver () |
| void | Dump (std::ofstream &output) const |
コード生成クラス
|
delete |
|
explicit |
| void mana::CodeGenerator::Dump | ( | std::ofstream & | output | ) | const |
| void mana::CodeGenerator::Expression | ( | const std::shared_ptr< SyntaxNode > & | tree, |
| const int32_t | enableAssign | ||
| ) |
ノードを巡りながら指揮を中間言語に翻訳します
式の評価
| tree | 式のSyntaxNode |
| enableAssign | trueならば代入式、falseならばそれ以外 |
| void mana::CodeGenerator::GenerateCode | ( | std::shared_ptr< SyntaxNode > | node, |
| const int32_t | enableLoad | ||
| ) |
ノードを辿りながら中間言語に翻訳します
| node | ノード |
| enableLoad | trueならばload命令は有効、falseならばload命令は無効 |
| const std::shared_ptr< GlobalAddressResolver > & mana::CodeGenerator::GetGlobalAddressResolver | ( | ) |
グローバルアドレスを解決する
| const std::shared_ptr< LocalAddressResolver > & mana::CodeGenerator::GetLocalAddressResolver | ( | ) |
ローカルアドレスを解決する