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

Unified Diff: src/wasm/ast-decoder.cc

Issue 1890803002: [wasm] Generate source position information (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@wasm-throw-error
Patch Set: some doc and fixes Created 4 years, 8 months 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
Index: src/wasm/ast-decoder.cc
diff --git a/src/wasm/ast-decoder.cc b/src/wasm/ast-decoder.cc
index 0d0c6e0fb0f3e83433895e408b02ee0a376cc938..f1cb79240101c4edb0575d4e244144195857fb07 100644
--- a/src/wasm/ast-decoder.cc
+++ b/src/wasm/ast-decoder.cc
@@ -635,6 +635,10 @@ class SR_WasmDecoder : public WasmDecoder {
continue; // back to decoding loop.
}
+ DCHECK_EQ(pc_ - start_, static_cast<int>(pc_ - start_));
+ if (builder_)
+ builder_->SetCurrentSourcePosition(static_cast<int>(pc_ - start_));
+
switch (opcode) {
case kExprNop:
Leaf(kAstStmt);

Powered by Google App Engine
This is Rietveld 408576698