9 #include "../runner/common/Setup.h"
31 const std::shared_ptr<CodeBuffer>& codeBuffer,
32 const std::shared_ptr<DataBuffer>& dataBuffer,
33 const std::shared_ptr<GlobalSemanticAnalyzer>& globalSemanticAnalyzer,
34 const std::shared_ptr<LocalSemanticAnalyzer>& localSemanticAnalyzer,
35 const std::shared_ptr<SymbolFactory>& symbolFactory,
36 const std::shared_ptr<TypeDescriptorFactory>& typeDescriptorFactory);
43 void GenerateCode(std::shared_ptr<SyntaxNode> node,
const int32_t enableLoad);
48 void Expression(
const std::shared_ptr<SyntaxNode>& tree,
const int32_t enableAssign);
60 void Dump(std::ofstream& output)
const;
63 void ResolveLoad(
const std::shared_ptr<SyntaxNode>& node)
const;
64 void ResolveStore(
const std::shared_ptr<SyntaxNode>& node)
const;
65 void Return(
const std::shared_ptr<Symbol>&
function,
const std::shared_ptr<SyntaxNode>& tree);
66 void Rollback(
const std::shared_ptr<SyntaxNode>& tree);
67 int32_t Argument(int32_t count,
const std::shared_ptr<Symbol>& param, std::shared_ptr<SyntaxNode> arg);
68 static int32_t CallArgumentSize(int32_t address,
const std::shared_ptr<Symbol>& param, std::shared_ptr<SyntaxNode> arg);
69 int32_t CallArgument(int32_t address,
const std::shared_ptr<Symbol>& param, std::shared_ptr<SyntaxNode> arg);
70 void Call(
const std::shared_ptr<SyntaxNode>& node);
71 int32_t CallPrintGenerateArgument(int32_t argc,
const std::shared_ptr<SyntaxNode>& node);
72 void CallPrint(
const std::shared_ptr<SyntaxNode>& node);
73 void ConditionCheck(
const std::shared_ptr<SyntaxNode>& tree);
74 address_t ConditionCore(
const std::shared_ptr<SyntaxNode>& tree);
75 address_t Condition(
const std::shared_ptr<SyntaxNode>& tree,
const bool match);
76 void GenerateConstantInteger(
const TypeDescriptor::Id typeId,
const int32_t value)
const;
80 std::shared_ptr<CodeBuffer> mCodeBuffer;
81 std::shared_ptr<DataBuffer> mDataBuffer;
82 std::shared_ptr<GlobalAddressResolver> mGlobalAddressResolver;
83 std::shared_ptr<GlobalSemanticAnalyzer> mGlobalSemanticAnalyzer;
84 std::shared_ptr<LocalAddressResolver> mLocalAddressResolver;
85 std::shared_ptr<LocalSemanticAnalyzer> mLocalSemanticAnalyzer;
86 std::shared_ptr<StringPool> mStringPool;
87 std::shared_ptr<SymbolFactory> mSymbolFactory;
88 std::shared_ptr<TypeDescriptorFactory> mTypeDescriptorFactory;
90 std::shared_ptr<Symbol> mActorSymbolEntryPointer;
91 std::shared_ptr<Symbol> mFunctionSymbolEntryPointer;
Definition: CodeGenerator.h:27
void GenerateCode(std::shared_ptr< SyntaxNode > node, const int32_t enableLoad)
Definition: CodeGenerator.cpp:555
const std::shared_ptr< GlobalAddressResolver > & GetGlobalAddressResolver()
Definition: CodeGenerator.cpp:1419
void Expression(const std::shared_ptr< SyntaxNode > &tree, const int32_t enableAssign)
Definition: CodeGenerator.cpp:500
void Dump(std::ofstream &output) const
Definition: CodeGenerator.cpp:1429
const std::shared_ptr< LocalAddressResolver > & GetLocalAddressResolver()
Definition: CodeGenerator.cpp:1424
Id
type identifier
Definition: TypeDescriptor.h:30
Definition: CodeBuffer.cpp:12
std::uint32_t address_t
Definition: Type.h:31
Definition: Noncopyable.h:18