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

Unified Diff: src/wasm/wasm-objects.h

Issue 2536373007: [wasm] Make DisassembleFunction a method of WasmCompiledModule (Closed)
Patch Set: Created 4 years 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/wasm/wasm-module.cc ('k') | src/wasm/wasm-objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-objects.h
diff --git a/src/wasm/wasm-objects.h b/src/wasm/wasm-objects.h
index 447c368642bd83af802f8956d36b0a0c9702c291..37875bde1610dc6f0ab806696cc4e165af1a7b7c 100644
--- a/src/wasm/wasm-objects.h
+++ b/src/wasm/wasm-objects.h
@@ -297,6 +297,14 @@ class WasmCompiledModule : public FixedArray {
static int GetAsmJsSourcePosition(Handle<WasmCompiledModule> debug_info,
uint32_t func_index, uint32_t byte_offset);
+ // 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.
+ // Returns an empty string and empty vector if the function index is invalid.
+ std::pair<std::string, std::vector<std::tuple<uint32_t, int, int>>>
+ DisassembleFunction(int func_index);
+
private:
void InitId();
« no previous file with comments | « src/wasm/wasm-module.cc ('k') | src/wasm/wasm-objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698