Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Unified Diff: src/debug/debug-interface.h

Issue 2529383002: [inspector] Split off interface-types.h (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/api.cc ('k') | src/inspector/wasm-translation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « src/api.cc ('k') | src/inspector/wasm-translation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698