[build] ozulis is no more linked to mugiwara
[ozulis.git] / src / compiler.hh
blob9059dc0820bdbda631bc77fb4e08220eb2b5cefc
1 #ifndef COMPILER_HH
2 # define COMPILER_HH
4 # include <vector>
5 # include <core/singleton.hh>
7 class TargetData;
8 class Task;
9 class ParseTask;
11 class Compiler : public core::Singleton<Compiler>
13 public:
14 Compiler();
15 ~Compiler();
17 void addTask(Task * task);
18 void compile();
20 void work(Task & task);
21 void work(ParseTask & task);
23 inline void enableAstDump(bool enable);
24 inline void enableAstDumpParse(bool enable);
25 inline void enableAstDumpTypeCheck(bool enable);
26 inline void enableAstDumpSimplify(bool enable);
27 inline const TargetData & targetData() const;
29 private:
30 std::vector<Task *> tasks_;
31 bool astDumpParse_;
32 bool astDumpTypeCheck_;
33 bool astDumpSimplify_;
34 const TargetData * targetData_;
37 extern template class core::Singleton<Compiler>;
38 extern template class std::vector<Task *>;
40 # include "compiler.hxx"
42 #endif /* !COMPILER_HH */