| Index: src/wasm/ast-decoder.cc
|
| diff --git a/src/wasm/ast-decoder.cc b/src/wasm/ast-decoder.cc
|
| index a2d0a3f0dea04fc42bdb79dda0fadcd0588ca982..af436f96debe25d259232cebee592174549cd3ff 100644
|
| --- a/src/wasm/ast-decoder.cc
|
| +++ b/src/wasm/ast-decoder.cc
|
| @@ -800,7 +800,8 @@ class WasmFullDecoder : public WasmDecoder {
|
| if (c->false_env != nullptr) {
|
| // End the true branch of a one-armed if.
|
| Goto(c->false_env, c->end_env);
|
| - if (ssa_env_->go() && stack_.size() != c->stack_depth) {
|
| + if (ssa_env_->go() &&
|
| + static_cast<int>(stack_.size()) != c->stack_depth) {
|
| error("end of if expected empty stack");
|
| stack_.resize(c->stack_depth);
|
| }
|
| @@ -1435,7 +1436,7 @@ class WasmFullDecoder : public WasmDecoder {
|
| // Unreachable code is essentially not typechecked.
|
| return {pc_, nullptr, kAstEnd};
|
| }
|
| - if (stack_depth == stack_.size()) {
|
| + if (stack_depth == static_cast<int>(stack_.size())) {
|
| Value val = {pc_, nullptr, kAstStmt};
|
| return val;
|
| } else {
|
| @@ -1460,8 +1461,7 @@ class WasmFullDecoder : public WasmDecoder {
|
| Goto(ssa_env_, c->end_env);
|
| } else {
|
| // Merge the value(s) into the end of the block.
|
| - if (static_cast<size_t>(c->stack_depth + c->merge.arity) >
|
| - stack_.size()) {
|
| + if (c->stack_depth + c->merge.arity > stack_.size()) {
|
| error(
|
| pc_, pc_,
|
| "expected at least %d values on the stack for br to @%d, found %d",
|
| @@ -1477,7 +1477,7 @@ class WasmFullDecoder : public WasmDecoder {
|
| if (!ssa_env_->go()) return;
|
| // Merge the value(s) into the end of the block.
|
| int arity = static_cast<int>(c->merge.arity);
|
| - if (c->stack_depth + arity != stack_.size()) {
|
| + if (c->stack_depth + arity != static_cast<int>(stack_.size())) {
|
| error(pc_, pc_, "expected %d elements on the stack for fallthru to @%d",
|
| arity, startrel(c->pc));
|
| return;
|
| @@ -1493,7 +1493,7 @@ class WasmFullDecoder : public WasmDecoder {
|
| if (!ssa_env_->go()) return;
|
| // Fallthru must match arity exactly.
|
| int arity = static_cast<int>(c->merge.arity);
|
| - if (c->stack_depth + arity != stack_.size()) {
|
| + if (c->stack_depth + arity != static_cast<int>(stack_.size())) {
|
| error(pc_, pc_, "expected %d elements on the stack for fallthru to @%d",
|
| arity, startrel(c->pc));
|
| return;
|
|
|