OLD | NEW |
---|---|
(Empty) | |
1 #pragma once | |
JF
2016/03/28 18:17:14
Copyright notice for the file.
Also, pragma once?
Eric Holk
2016/03/29 19:54:12
Done.
| |
2 | |
3 #include "IceGlobalContext.h" | |
4 #include "IceTranslator.h" | |
5 | |
6 #include "llvm/Support/StreamingMemoryObject.h" | |
7 | |
8 namespace v8::internal { | |
John
2016/03/28 18:44:10
we tend to do
namespace v8 {
namespace internal {
John
2016/03/28 18:44:10
I would just #include the files defining these...
Eric Holk
2016/03/29 19:54:12
Done.
Eric Holk
2016/03/29 19:54:12
I decided to keep it as is, at least for now. The
| |
9 class Zone; | |
John
2016/03/28 18:44:10
no spaces? make sure clang-format is happy here.
Eric Holk
2016/03/29 19:54:12
This was what `make format` did.
| |
10 namespace wasm { | |
11 class FunctionEnv; | |
12 } | |
John
2016/03/28 18:44:10
// end of namespace wasm
| |
13 } | |
John
2016/03/28 18:44:10
// end of namespace v8::internal
| |
14 | |
15 namespace Ice { | |
16 | |
17 class WasmTranslator : public Translator { | |
18 WasmTranslator() = delete; | |
19 WasmTranslator(const WasmTranslator &) = delete; | |
20 WasmTranslator &operator=(const WasmTranslator &) = delete; | |
21 | |
22 template <typename F = std::function<void(Ostream &)>> void log(F Fn) { | |
23 if (BuildDefs::dump() && (Ctx->getFlags().getVerbose() & IceV_Wasm)) { | |
24 Fn(Ctx->getStrDump()); | |
25 Ctx->getStrDump().flush(); | |
26 } | |
27 } | |
28 | |
29 public: | |
30 explicit WasmTranslator(GlobalContext *Ctx) : Translator(Ctx) {} | |
31 ~WasmTranslator() override = default; | |
32 | |
33 void translate(const std::string &IRFilename, | |
34 std::unique_ptr<llvm::DataStreamer> &&InputStream); | |
John
2016/03/28 18:44:10
std::unique_ptr<> InputStream (i.e., no r-value re
Eric Holk
2016/03/29 19:54:12
Done.
| |
35 | |
36 std::unique_ptr<Cfg> translateFunction(v8::internal::Zone *zone, | |
37 v8::internal::wasm::FunctionEnv *env, | |
38 const uint8_t *base, | |
39 const uint8_t *start, | |
40 const uint8_t *end); | |
41 }; | |
42 } | |
John
2016/03/28 18:44:10
// end of namespace Ice
| |
OLD | NEW |