diff options
author | Sam Clegg <sbc@chromium.org> | 2021-11-05 18:01:55 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-05 18:01:55 -0700 |
commit | 626008bbd59371c28c16a8b71c4469e288cd5c91 (patch) | |
tree | c3f5ab9c2500eacc686d66633725f2f714b898c0 /src/interp/binary-reader-interp.cc | |
parent | a49ed9a40c62c47eeb3e9b0a79b2b93afa17101f (diff) | |
download | wabt-626008bbd59371c28c16a8b71c4469e288cd5c91.tar.gz wabt-626008bbd59371c28c16a8b71c4469e288cd5c91.tar.bz2 wabt-626008bbd59371c28c16a8b71c4469e288cd5c91.zip |
Remove separate OnEndFunc vs OnEndExpr. (#1756)
We already have EndFunctionBody, and this extra distinction
doesn't seem like it is needed.
Diffstat (limited to 'src/interp/binary-reader-interp.cc')
-rw-r--r-- | src/interp/binary-reader-interp.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/interp/binary-reader-interp.cc b/src/interp/binary-reader-interp.cc index 53a996f5..11690322 100644 --- a/src/interp/binary-reader-interp.cc +++ b/src/interp/binary-reader-interp.cc @@ -1018,6 +1018,9 @@ Result BinaryReaderInterp::OnElseExpr() { } Result BinaryReaderInterp::OnEndExpr() { + if (label_stack_.size() == 1) { + return Result::Ok; + } SharedValidator::Label* label; CHECK_RESULT(validator_.GetLabel(0, &label)); LabelType label_type = label->label_type; |