Index: src/debug/debug-interface.h |
diff --git a/src/debug/debug-interface.h b/src/debug/debug-interface.h |
index 11172eb03dddfd3d39d2bf467084d0bfaf61a934..d80ba163d407fddb8a9a79b1754cc582b3436959 100644 |
--- a/src/debug/debug-interface.h |
+++ b/src/debug/debug-interface.h |
@@ -202,14 +202,25 @@ class DebugInterface { |
PersistentValueVector<Script>& scripts); |
/** |
+ * The result of disassembling a wasm function. |
+ * Consists of the disassembly string and an offset table mapping wasm byte |
+ * offsets to line and column in the disassembly. |
+ * The offset table consists of entries <byte_offset, line, column> and is |
+ * guaranteed to be ordered by the byte_offset. |
+ */ |
+ struct WasmDisassembly { |
+ using offset_table_entry = std::tuple<uint32_t, int, int>; |
kozy
2016/11/29 23:52:44
Could we replace this tuple with struct as well?
|
+ std::string disassembly; |
+ std::vector<offset_table_entry> offset_table; |
+ }; |
+ |
+ /** |
* Compute the disassembly of a wasm function. |
- * Returns the disassembly string and a list of <byte_offset, line, column> |
- * entries, mapping wasm byte offsets to line and column in the disassembly. |
- * The list is guaranteed to be ordered by the byte_offset. |
*/ |
- static std::pair<std::string, std::vector<std::tuple<uint32_t, int, int>>> |
- DisassembleWasmFunction(Isolate* isolate, v8::Local<v8::Object> script, |
- int function_index); |
+ static WasmDisassembly DisassembleWasmFunction(Isolate* isolate, |
+ v8::Local<v8::Object> script, |
+ int function_index); |
+ |
static MaybeLocal<UnboundScript> CompileInspectorScript(Isolate* isolate, |
Local<String> source); |
}; |