summaryrefslogtreecommitdiff
path: root/src/wasm-s-parser.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm-s-parser.h')
-rw-r--r--src/wasm-s-parser.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h
index 25efd1fc1..9fb9d4389 100644
--- a/src/wasm-s-parser.h
+++ b/src/wasm-s-parser.h
@@ -238,13 +238,16 @@ private:
Expression* makeLoop(Element& s);
Expression* makeCall(Element& s, bool isReturn);
Expression* makeCallIndirect(Element& s, bool isReturn);
- template<class T>
- void parseCallOperands(Element& s, Index i, Index j, T* call) {
+ template<class T> void parseOperands(Element& s, Index i, Index j, T& list) {
while (i < j) {
- call->operands.push_back(parseExpression(s[i]));
+ list.push_back(parseExpression(s[i]));
i++;
}
}
+ template<class T>
+ void parseCallOperands(Element& s, Index i, Index j, T* call) {
+ parseOperands(s, i, j, call->operands);
+ }
enum class LabelType { Break, Exception };
Name getLabel(Element& s, LabelType labelType = LabelType::Break);
Expression* makeBreak(Element& s);