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

Unified Diff: src/wasm/wasm-text.cc

Issue 2529383002: [inspector] Split off interface-types.h (Closed)
Patch Set: Rebase 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
« src/debug/interface-types.h ('K') | « src/wasm/wasm-text.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-text.cc
diff --git a/src/wasm/wasm-text.cc b/src/wasm/wasm-text.cc
index 36a46448d7ddef7eb31a620ae78e860fec8c345c..c95ab0600a0f34fb96cc315aee1861c3c024c307 100644
--- a/src/wasm/wasm-text.cc
+++ b/src/wasm/wasm-text.cc
@@ -4,6 +4,7 @@
#include "src/wasm/wasm-text.h"
+#include "src/debug/interface-types.h"
#include "src/ostreams.h"
#include "src/vector.h"
#include "src/wasm/ast-decoder.h"
@@ -11,6 +12,7 @@
#include "src/wasm/wasm-opcodes.h"
#include "src/zone/zone.h"
+using namespace v8;
using namespace v8::internal;
using namespace v8::internal::wasm;
@@ -127,10 +129,10 @@ bool IsValidFunctionName(const Vector<const char> &name) {
} // namespace
-void wasm::PrintWasmText(
- const WasmModule *module, const ModuleWireBytes &wire_bytes,
- uint32_t func_index, std::ostream &os,
- std::vector<std::tuple<uint32_t, int, int>> *offset_table) {
+void wasm::PrintWasmText(const WasmModule *module,
+ const ModuleWireBytes &wire_bytes, uint32_t func_index,
+ std::ostream &os,
+ debug::WasmDisassembly::OffsetTable *offset_table) {
DCHECK_NOT_NULL(module);
DCHECK_GT(module->functions.size(), func_index);
const WasmFunction *fun = &module->functions[func_index];
@@ -188,8 +190,8 @@ void wasm::PrintWasmText(
const int kMaxIndentation = 64;
int indentation = std::min(kMaxIndentation, 2 * control_depth);
if (offset_table) {
- offset_table->push_back(
- std::make_tuple(i.pc_offset(), line_nr, indentation));
+ offset_table->push_back(debug::WasmDisassemblyOffsetTableEntry(
+ i.pc_offset(), line_nr, indentation));
}
// 64 whitespaces
« src/debug/interface-types.h ('K') | « src/wasm/wasm-text.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698