| OLD | NEW | 
|---|
| 1 //===- subzero/src/IceCompileServer.h - Compile server ----------*- C++ -*-===// | 1 //===- subzero/src/IceCompileServer.h - Compile server ----------*- C++ -*-===// | 
| 2 // | 2 // | 
| 3 //                        The Subzero Code Generator | 3 //                        The Subzero Code Generator | 
| 4 // | 4 // | 
| 5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source | 
| 6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. | 
| 7 // | 7 // | 
| 8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// | 
| 9 /// | 9 /// | 
| 10 /// \file | 10 /// \file | 
| 11 /// This file declares the compile server. Given a compiler implementation, | 11 /// This file declares the compile server. Given a compiler implementation, it | 
| 12 /// it dispatches compile requests to the implementation. | 12 /// dispatches compile requests to the implementation. | 
| 13 /// | 13 /// | 
| 14 //===----------------------------------------------------------------------===// | 14 //===----------------------------------------------------------------------===// | 
| 15 | 15 | 
| 16 #ifndef SUBZERO_SRC_ICECOMPILESERVER_H | 16 #ifndef SUBZERO_SRC_ICECOMPILESERVER_H | 
| 17 #define SUBZERO_SRC_ICECOMPILESERVER_H | 17 #define SUBZERO_SRC_ICECOMPILESERVER_H | 
| 18 | 18 | 
| 19 #include "IceCompiler.h" | 19 #include "IceCompiler.h" | 
| 20 #include "IceDefs.h" | 20 #include "IceDefs.h" | 
| 21 #include "IceGlobalContext.h" | 21 #include "IceGlobalContext.h" | 
| 22 | 22 | 
| 23 namespace llvm { | 23 namespace llvm { | 
| 24 class DataStreamer; | 24 class DataStreamer; | 
| 25 class raw_fd_ostream; | 25 class raw_fd_ostream; | 
| 26 } | 26 } | 
| 27 | 27 | 
| 28 namespace Ice { | 28 namespace Ice { | 
| 29 | 29 | 
| 30 /// A CompileServer awaits compile requests, and dispatches the requests | 30 /// A CompileServer awaits compile requests, and dispatches the requests to a | 
| 31 /// to a given Compiler. Each request is paired with an input stream, | 31 /// given Compiler. Each request is paired with an input stream, a context | 
| 32 /// a context (which has the output stream), and a set of arguments. | 32 /// (which has the output stream), and a set of arguments. The CompileServer | 
| 33 /// The CompileServer takes over the current thread to listen to requests, | 33 /// takes over the current thread to listen to requests, and compile requests | 
| 34 /// and compile requests are handled on separate threads. | 34 /// are handled on separate threads. | 
| 35 /// | 35 /// | 
| 36 /// Currently, this only handles a single request. | 36 /// Currently, this only handles a single request. | 
| 37 /// | 37 /// | 
| 38 /// When run on the commandline, it receives and therefore dispatches | 38 /// When run on the commandline, it receives and therefore dispatches the | 
| 39 /// the request immediately.  When run in the browser, it blocks waiting | 39 /// request immediately. When run in the browser, it blocks waiting for a | 
| 40 /// for a request. | 40 /// request. | 
| 41 class CompileServer { | 41 class CompileServer { | 
| 42   CompileServer() = delete; | 42   CompileServer() = delete; | 
| 43   CompileServer(const CompileServer &) = delete; | 43   CompileServer(const CompileServer &) = delete; | 
| 44   CompileServer &operator=(const CompileServer &) = delete; | 44   CompileServer &operator=(const CompileServer &) = delete; | 
| 45 | 45 | 
| 46 public: | 46 public: | 
| 47   explicit CompileServer(Compiler &Comp) : Comp(Comp) {} | 47   explicit CompileServer(Compiler &Comp) : Comp(Comp) {} | 
| 48 | 48 | 
| 49   virtual ~CompileServer() = default; | 49   virtual ~CompileServer() = default; | 
| 50 | 50 | 
| (...skipping 25 matching lines...) Expand all  Loading... | 
| 76 | 76 | 
| 77 private: | 77 private: | 
| 78   int argc; | 78   int argc; | 
| 79   char **argv; | 79   char **argv; | 
| 80   std::unique_ptr<GlobalContext> Ctx; | 80   std::unique_ptr<GlobalContext> Ctx; | 
| 81 }; | 81 }; | 
| 82 | 82 | 
| 83 } // end of namespace Ice | 83 } // end of namespace Ice | 
| 84 | 84 | 
| 85 #endif // SUBZERO_SRC_ICECOMPILESERVER_H | 85 #endif // SUBZERO_SRC_ICECOMPILESERVER_H | 
| OLD | NEW | 
|---|