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 3 // found in the LICENSE file. 4 5 #ifndef V8_WASM_S_EXPR_H_ 6 #define V8_WASM_S_EXPR_H_ 7 8 #include <cstdint> 9 #include <ostream> 10 #include <tuple> 11 #include <vector> 12 13 namespace v8 { 14 15 namespace debug { 16 struct WasmDisassemblyOffsetTableEntry; 17 } // namespace debug 18 19 namespace internal { 20 namespace wasm { 21 22 // Forward declaration. 23 struct WasmModule; 24 struct ModuleWireBytes; 25 26 // Generate disassembly according to official text format. 27 // Output disassembly to the given output stream, and optionally return an 28 // offset table of <byte offset, line, column> via the given pointer. 29 void PrintWasmText( 30 const WasmModule *module, const ModuleWireBytes &wire_bytes, 31 uint32_t func_index, std::ostream &os, 32 std::vector<debug::WasmDisassemblyOffsetTableEntry> *offset_table); 33 34 } // namespace wasm 35 } // namespace internal 36 } // namespace v8 37 38 #endif // V8_WASM_S_EXPR_H_ 39