9 #include "../runner/common/Setup.h"
43 int32_t
Break(
const int32_t newPc);
46 int32_t
Continue(
const int32_t newPc);
70 std::shared_ptr<CodeBuffer> mCodeBuffer;
71 std::shared_ptr<CodeGenerator> mCodeGenerator;
73 static constexpr
size_t JumpChainTableSize = 20;
74 static constexpr
size_t JumpSwitchEntryStackSize = 256;
75 static constexpr
size_t JumpSwitchStackSize = 256;
82 int32_t continue_chain;
83 int32_t start_address;
85 std::array<JumpChainTable, JumpChainTableSize> mJumpChainTable;
86 int32_t mJumpChainTablePointer;
89 struct JumpSwitchEntry
91 std::shared_ptr<SyntaxNode> node;
96 JumpSwitchEntry mJumpSwitchEntryStack[JumpSwitchEntryStackSize];
99 JumpSwitchEntry* mJumpSwitchEntryStackPointer;
102 struct JumpSwitchStack
104 JumpSwitchEntry* stack_pointer;
105 std::shared_ptr<TypeDescriptor> type;
106 int32_t default_address;
108 std::array<JumpSwitchStack, JumpSwitchStackSize> mJumpSwitchStack;
111 int32_t mJumpSwitchStackPointer;
Definition: LocalAddressResolver.h:23
void CloseContinueOnly()
continueジャンプブロックの終了
Definition: LocalAddressResolver.cpp:69
int32_t Continue(const int32_t newPc)
continueの設定
Definition: LocalAddressResolver.cpp:49
void ResolveSwitchBlock(const std::shared_ptr< CodeGenerator > &codeGenerator)
switchブロックをバイナリーコードに変換
Definition: LocalAddressResolver.cpp:131
void RegistSwitchDefault()
defaultの登録
Definition: LocalAddressResolver.cpp:119
void OpenChain(const JumpChainStatus status)
ジャンプブロックの開始
Definition: LocalAddressResolver.cpp:23
void CloseSwitchBlock(void)
switchブロックの終了
Definition: LocalAddressResolver.cpp:180
JumpChainStatus
Definition: LocalAddressResolver.h:26
void RegistSwitchCase(const std::shared_ptr< SyntaxNode > &node)
caseの登録
Definition: LocalAddressResolver.cpp:99
void OpenSwitchBlock(const std::shared_ptr< TypeDescriptor > &type)
switchブロックの開始
Definition: LocalAddressResolver.cpp:91
~LocalAddressResolver()=default
void CloseChain()
ジャンプブロックの終了
Definition: LocalAddressResolver.cpp:78
LocalAddressResolver(const std::shared_ptr< CodeBuffer > &codeBuffer)
Definition: LocalAddressResolver.cpp:14
int32_t Break(const int32_t newPc)
breakの設定
Definition: LocalAddressResolver.cpp:32
Definition: CodeBuffer.cpp:12
Definition: Noncopyable.h:18