diff options
author | Wouter van Oortmerssen <aardappel@gmail.com> | 2020-07-23 13:38:27 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-23 13:38:27 -0700 |
commit | 5140e96ea42eca9dafd28bb43ca1e93a604a08c2 (patch) | |
tree | 7b57548125f520192708b7e0d74957978bbdd953 /src/decompiler.cc | |
parent | efee26853b4c7a3278b014db2fa0db13922f9e21 (diff) | |
download | wabt-5140e96ea42eca9dafd28bb43ca1e93a604a08c2.tar.gz wabt-5140e96ea42eca9dafd28bb43ca1e93a604a08c2.tar.bz2 wabt-5140e96ea42eca9dafd28bb43ca1e93a604a08c2.zip |
[decompiler] fixed blocks with params. (#1497)
It would previously assume the blocktype is "simple" (at most a single result value), but now also supports function signatures.
Also fixed it ignoring the validator result.
Diffstat (limited to 'src/decompiler.cc')
-rw-r--r-- | src/decompiler.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/decompiler.cc b/src/decompiler.cc index 93e0043e..2de695c2 100644 --- a/src/decompiler.cc +++ b/src/decompiler.cc @@ -661,7 +661,7 @@ struct Decompiler { std::string InitExp(const ExprList &el) { assert(!el.empty()); AST ast(mc, nullptr); - ast.Construct(el, 1, false); + ast.Construct(el, 1, 0, false); auto val = DecompileExpr(ast.exp_stack[0], nullptr); assert(ast.exp_stack.size() == 1 && val.v.size() == 1); return std::move(val.v[0]); @@ -764,7 +764,7 @@ struct Decompiler { AST ast(mc, f); cur_ast = * if (!is_import) { - ast.Construct(f->exprs, f->GetNumResults(), true); + ast.Construct(f->exprs, f->GetNumResults(), 0, true); lst.Track(ast.exp_stack[0]); lst.CheckLayouts(); } |