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 { |