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

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

Issue 1776813003: adjust for wasm-demo Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « src/wasm/ast-decoder.h ('k') | src/wasm/decoder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/ast-decoder.cc
diff --git a/src/wasm/ast-decoder.cc b/src/wasm/ast-decoder.cc
index 93129f6d2f419f5f63294836d366e04c9836a1f4..23162bb181a02dbfaba561b0422e68877d5247ec 100644
--- a/src/wasm/ast-decoder.cc
+++ b/src/wasm/ast-decoder.cc
@@ -21,14 +21,10 @@ namespace v8 {
namespace internal {
namespace wasm {
-#if DEBUG
#define TRACE(...) \
do { \
if (FLAG_trace_wasm_decoder) PrintF(__VA_ARGS__); \
} while (false)
-#else
-#define TRACE(...)
-#endif
// The root of a decoded tree.
struct Tree {
@@ -243,11 +239,14 @@ class WasmDecoder : public Decoder {
case kExprSelect:
return 3;
- case kExprBlock:
- case kExprLoop: {
+ case kExprBlock: {
BlockCountOperand operand(this, pc);
return operand.count;
}
+ case kExprLoop: {
+ LoopCountOperand operand(this, pc);
+ return operand.count;
+ }
case kExprCallFunction: {
FunctionIndexOperand operand(this, pc);
@@ -293,11 +292,14 @@ class WasmDecoder : public Decoder {
MemoryAccessOperand operand(this, pc);
return 1 + operand.length;
}
- case kExprBlock:
- case kExprLoop: {
+ case kExprBlock: {
BlockCountOperand operand(this, pc);
return 1 + operand.length;
}
+ case kExprLoop: {
+ LoopCountOperand operand(this, pc);
+ return 1 + operand.length;
+ }
case kExprBr:
case kExprBrIf: {
BreakDepthOperand operand(this, pc);
@@ -591,7 +593,7 @@ class LR_WasmDecoder : public WasmDecoder {
break;
}
case kExprLoop: {
- BlockCountOperand operand(this, pc_);
+ LoopCountOperand operand(this, pc_);
if (operand.count < 1) {
Leaf(kAstStmt);
} else {
« no previous file with comments | « src/wasm/ast-decoder.h ('k') | src/wasm/decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698