OLD | NEW |
1 //===- subzero/src/IceBrowserCompileServer.cpp - Browser compile server ---===// | 1 //===- subzero/src/IceBrowserCompileServer.cpp - Browser compile server ---===// |
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 // This file defines the browser-based compile server. | 10 // This file defines the browser-based compile server. |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 // We could also try to pthread_kill all other worker threads, but | 111 // We could also try to pthread_kill all other worker threads, but |
112 // pthread_kill / raising signals is not supported by NaCl. | 112 // pthread_kill / raising signals is not supported by NaCl. |
113 // We'll have to assume that the worker/emitter threads will be well behaved | 113 // We'll have to assume that the worker/emitter threads will be well behaved |
114 // after a fatal error in other threads, and either get stuck waiting | 114 // after a fatal error in other threads, and either get stuck waiting |
115 // on input from a previous stage, or also call report_fatal_error. | 115 // on input from a previous stage, or also call report_fatal_error. |
116 pthread_exit(0); | 116 pthread_exit(0); |
117 } | 117 } |
118 | 118 |
119 } // end of anonymous namespace | 119 } // end of anonymous namespace |
120 | 120 |
121 BrowserCompileServer::~BrowserCompileServer() {} | 121 BrowserCompileServer::~BrowserCompileServer() = default; |
122 | 122 |
123 void BrowserCompileServer::run() { | 123 void BrowserCompileServer::run() { |
124 gCompileServer = this; | 124 gCompileServer = this; |
125 getIRTInterfaces(); | 125 getIRTInterfaces(); |
126 gIRTFuncs.serve_translate_request(&SubzeroCallbacks); | 126 gIRTFuncs.serve_translate_request(&SubzeroCallbacks); |
127 } | 127 } |
128 | 128 |
129 void BrowserCompileServer::getParsedFlags(uint32_t NumThreads, int argc, | 129 void BrowserCompileServer::getParsedFlags(uint32_t NumThreads, int argc, |
130 char **argv) { | 130 char **argv) { |
131 ClFlags::parseFlags(argc, argv); | 131 ClFlags::parseFlags(argc, argv); |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 this->getCompiler().run(ExtraFlags, *Ctx.get(), | 189 this->getCompiler().run(ExtraFlags, *Ctx.get(), |
190 // Retain original reference, but the compiler | 190 // Retain original reference, but the compiler |
191 // (LLVM's MemoryObject) wants to handle deletion. | 191 // (LLVM's MemoryObject) wants to handle deletion. |
192 std::unique_ptr<llvm::DataStreamer>(InputStream)); | 192 std::unique_ptr<llvm::DataStreamer>(InputStream)); |
193 }); | 193 }); |
194 } | 194 } |
195 | 195 |
196 } // end of namespace Ice | 196 } // end of namespace Ice |
197 | 197 |
198 #endif // PNACL_BROWSER_TRANSLATOR | 198 #endif // PNACL_BROWSER_TRANSLATOR |
OLD | NEW |