@@ -23,7 +23,6 @@ namespace libscratchcpp
2323
2424class LLVMCompilerContext ;
2525class LLVMConstantRegister ;
26- class LLVMLoopScope ;
2726
2827class LLVMCodeBuilder : public ICodeBuilder
2928{
@@ -127,8 +126,6 @@ class LLVMCodeBuilder : public ICodeBuilder
127126 void createListMap ();
128127 void pushScopeLevel ();
129128 void popScopeLevel ();
130- void pushLoopScope (bool buildPhase);
131- void popLoopScope ();
132129
133130 std::string getMainFunctionName (BlockPrototype *procedurePrototype);
134131 llvm::FunctionType *getMainFunctionType (BlockPrototype *procedurePrototype);
@@ -159,7 +156,6 @@ class LLVMCodeBuilder : public ICodeBuilder
159156 LLVMRegister *createOp (LLVMInstruction::Type type, Compiler::StaticType retType, const Compiler::ArgTypes &argTypes = {}, const Compiler::Args &args = {});
160157 LLVMRegister *createOp (const LLVMInstruction &ins, Compiler::StaticType retType, Compiler::StaticType argType, const Compiler::Args &args);
161158 LLVMRegister *createOp (const LLVMInstruction &ins, Compiler::StaticType retType, const Compiler::ArgTypes &argTypes = {}, const Compiler::Args &args = {});
162- LLVMLoopScope *currentLoopScope () const ;
163159
164160 void createValueStore (LLVMRegister *reg, llvm::Value *targetPtr, Compiler::StaticType sourceType, Compiler::StaticType targetType);
165161 void createReusedValueStore (LLVMRegister *reg, llvm::Value *targetPtr, Compiler::StaticType sourceType, Compiler::StaticType targetType);
@@ -203,16 +199,10 @@ class LLVMCodeBuilder : public ICodeBuilder
203199 int m_defaultArgCount = 0 ;
204200 Compiler::CodeType m_codeType = Compiler::CodeType::Script;
205201
206- long m_loopScope = -1 ; // index
207- std::vector<std::shared_ptr<LLVMLoopScope>> m_loopScopes;
208- long m_loopScopeCounter = 0 ; // replacement for m_loopScopes size in build phase
209- std::vector<long > m_loopScopeTree;
210202 bool m_loopCondition = false ; // whether we're currently compiling a loop condition
211203 std::vector<LLVMInstruction *> m_variableInstructions;
212204 std::vector<LLVMInstruction *> m_listInstructions;
213205 std::vector<std::vector<llvm::Value *>> m_stringHeap; // scopes
214-
215- std::shared_ptr<ExecutableCode> m_output;
216206};
217207
218208} // namespace libscratchcpp
0 commit comments