| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_WASM_S_EXPR_H_ | 5 #ifndef V8_WASM_S_EXPR_H_ |
| 6 #define V8_WASM_S_EXPR_H_ | 6 #define V8_WASM_S_EXPR_H_ |
| 7 | 7 |
| 8 #include <cstdint> | 8 #include <cstdint> |
| 9 #include <ostream> | 9 #include <ostream> |
| 10 #include <tuple> | 10 #include <tuple> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 namespace v8 { | 13 namespace v8 { |
| 14 |
| 15 namespace debug { |
| 16 struct WasmDisassemblyOffsetTableEntry; |
| 17 } // namespace debug |
| 18 |
| 14 namespace internal { | 19 namespace internal { |
| 15 | |
| 16 namespace wasm { | 20 namespace wasm { |
| 17 | 21 |
| 18 // Forward declaration. | 22 // Forward declaration. |
| 19 struct WasmModule; | 23 struct WasmModule; |
| 20 struct ModuleWireBytes; | 24 struct ModuleWireBytes; |
| 21 | 25 |
| 22 // Generate disassembly according to official text format. | 26 // Generate disassembly according to official text format. |
| 23 // Output disassembly to the given output stream, and optionally return an | 27 // Output disassembly to the given output stream, and optionally return an |
| 24 // offset table of <byte offset, line, column> via the given pointer. | 28 // offset table of <byte offset, line, column> via the given pointer. |
| 25 void PrintWasmText(const WasmModule *module, const ModuleWireBytes &wire_bytes, | 29 void PrintWasmText( |
| 26 uint32_t func_index, std::ostream &os, | 30 const WasmModule *module, const ModuleWireBytes &wire_bytes, |
| 27 std::vector<std::tuple<uint32_t, int, int>> *offset_table); | 31 uint32_t func_index, std::ostream &os, |
| 32 std::vector<debug::WasmDisassemblyOffsetTableEntry> *offset_table); |
| 28 | 33 |
| 29 } // namespace wasm | 34 } // namespace wasm |
| 30 } // namespace internal | 35 } // namespace internal |
| 31 } // namespace v8 | 36 } // namespace v8 |
| 32 | 37 |
| 33 #endif // V8_WASM_S_EXPR_H_ | 38 #endif // V8_WASM_S_EXPR_H_ |
| OLD | NEW |