summaryrefslogtreecommitdiff
path: root/src/wasm-s-parser.h
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2019-11-11 14:27:53 -0800
committerGitHub <noreply@github.com>2019-11-11 14:27:53 -0800
commit63ddbc04cf75a45a05a2b1f11564563915ebdbec (patch)
tree4a449c0c53642aa803f48ce33d55155e9771dc8f /src/wasm-s-parser.h
parent4ad7a2cfd0b3ac14fbe767d50e4994f8297d37f6 (diff)
downloadbinaryen-63ddbc04cf75a45a05a2b1f11564563915ebdbec.tar.gz
binaryen-63ddbc04cf75a45a05a2b1f11564563915ebdbec.tar.bz2
binaryen-63ddbc04cf75a45a05a2b1f11564563915ebdbec.zip
Fix catch parsing (#2428)
- When a catch body is a block, call its `finalize` function with the correct type - Don't create a block when there's one instruction in a catch body - Remove `makeCatch` from gen-s-parser.py; it's not necessary - Fix a test case that has a `catch` without `try`
Diffstat (limited to 'src/wasm-s-parser.h')
-rw-r--r--src/wasm-s-parser.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h
index c7d43b581..924c1d968 100644
--- a/src/wasm-s-parser.h
+++ b/src/wasm-s-parser.h
@@ -224,7 +224,7 @@ private:
Expression* makeBreakTable(Element& s);
Expression* makeReturn(Element& s);
Expression* makeTry(Element& s);
- Expression* makeCatch(Element& s);
+ Expression* makeCatch(Element& s, Type type);
Expression* makeThrow(Element& s);
Expression* makeRethrow(Element& s);
Expression* makeBrOnExn(Element& s);