OLD | NEW |
1 //===- subzero/src/WasmTranslator.cpp - WASM to Subzero Translation -------===// | 1 //===- subzero/src/WasmTranslator.cpp - WASM to Subzero Translation -------===// |
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 /// \brief Defines a driver for translating Wasm bitcode into PNaCl bitcode. | 11 /// \brief Defines a driver for translating Wasm bitcode into PNaCl bitcode. |
12 /// | 12 /// |
13 /// The translator uses V8's WebAssembly decoder to handle the binary Wasm | 13 /// The translator uses V8's WebAssembly decoder to handle the binary Wasm |
14 /// format but replaces the usual TurboFan builder with a new PNaCl builder. | 14 /// format but replaces the usual TurboFan builder with a new PNaCl builder. |
15 /// | 15 /// |
16 //===----------------------------------------------------------------------===// | 16 //===----------------------------------------------------------------------===// |
17 | 17 |
| 18 #if ALLOW_WASM |
| 19 |
18 #include "llvm/Support/StreamingMemoryObject.h" | 20 #include "llvm/Support/StreamingMemoryObject.h" |
19 | 21 |
20 #include "WasmTranslator.h" | 22 #include "WasmTranslator.h" |
21 | 23 |
22 #include "src/wasm/module-decoder.h" | 24 #include "src/wasm/module-decoder.h" |
23 #include "src/wasm/wasm-opcodes.h" | 25 #include "src/wasm/wasm-opcodes.h" |
24 #include "src/zone.h" | 26 #include "src/zone.h" |
25 | 27 |
26 #include "IceCfgNode.h" | 28 #include "IceCfgNode.h" |
27 #include "IceGlobalInits.h" | 29 #include "IceGlobalInits.h" |
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
806 Buffer.get() + Fn.code_start_offset, | 808 Buffer.get() + Fn.code_start_offset, |
807 Buffer.get() + Fn.code_end_offset); | 809 Buffer.get() + Fn.code_end_offset); |
808 Func->setFunctionName(Ctx->getGlobalString(NewName)); | 810 Func->setFunctionName(Ctx->getGlobalString(NewName)); |
809 | 811 |
810 Ctx->optQueueBlockingPush(makeUnique<CfgOptWorkItem>(std::move(Func))); | 812 Ctx->optQueueBlockingPush(makeUnique<CfgOptWorkItem>(std::move(Func))); |
811 LOG(out << "done.\n"); | 813 LOG(out << "done.\n"); |
812 } | 814 } |
813 | 815 |
814 return; | 816 return; |
815 } | 817 } |
| 818 |
| 819 #endif // ALLOW_WASM |
OLD | NEW |